diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index bb10cd78e21d..52d601e3318a 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1361,13 +1361,6 @@ pom import - - com.google.cloud - google-cloud-vertexai-bom - 1.49.0-SNAPSHOT - pom - import - com.google.cloud google-cloud-video-intelligence-bom diff --git a/generate-readme.py b/generate-readme.py index 82eb4f955402..f64d08697b79 100644 --- a/generate-readme.py +++ b/generate-readme.py @@ -116,7 +116,8 @@ def client_for_module(module) -> Optional[CloudClient]: 'java-notification', 'java-shared-config', 'java-shared-dependencies', - 'java-samples' + 'java-samples', + 'java-vertexai' ] LIBRARIES_IN_MONOREPO = glob("java-*") diff --git a/generation/check_non_release_please_versions.sh b/generation/check_non_release_please_versions.sh index e00226bcf9df..74b00dcd0771 100755 --- a/generation/check_non_release_please_versions.sh +++ b/generation/check_non_release_please_versions.sh @@ -18,6 +18,7 @@ for pomFile in $(find . -mindepth 2 -name pom.xml | sort ); do [[ "${pomFile}" =~ .*google-auth-library-java.* ]] || \ [[ "${pomFile}" =~ .*java-storage.* ]] || \ [[ "${pomFile}" =~ .*java-storage-nio.* ]] || \ + [[ "${pomFile}" =~ .*java-vertexai.* ]] || \ [[ "${pomFile}" =~ .*.github*. ]]; then continue fi diff --git a/java-vertexai/.cloud/main.tf b/java-vertexai/.cloud/main.tf deleted file mode 100644 index 80d1b1696cce..000000000000 --- a/java-vertexai/.cloud/main.tf +++ /dev/null @@ -1,11 +0,0 @@ -terraform { - required_providers { - google = { source = "hashicorp/google" } - } -} -resource "google_project_service" "aiplatform" { - service = "aiplatform.googleapis.com" - project = var.inputs.project_id - count = var.inputs.should_enable_apis_on_apply ? 1 : 0 - disable_on_destroy = var.inputs.should_disable_apis_on_destroy -} diff --git a/java-vertexai/.cloud/variables.tf b/java-vertexai/.cloud/variables.tf deleted file mode 100644 index f78a8e9f648c..000000000000 --- a/java-vertexai/.cloud/variables.tf +++ /dev/null @@ -1,7 +0,0 @@ -variable "inputs" { - type = object({ - project_id = string - should_enable_apis_on_apply = bool - should_disable_apis_on_destroy = bool - }) -} \ No newline at end of file diff --git a/java-vertexai/.repo-metadata.json b/java-vertexai/.repo-metadata.json deleted file mode 100644 index 6e8ecac50072..000000000000 --- a/java-vertexai/.repo-metadata.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "api_shortname": "vertexai", - "name_pretty": "VertexAI API", - "product_documentation": "https://cloud.google.com/vertex-ai/docs", - "api_description": "Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.", - "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/overview", - "release_level": "stable", - "transport": "both", - "language": "java", - "repo": "googleapis/google-cloud-java", - "repo_short": "java-vertexai", - "distribution_name": "com.google.cloud:google-cloud-vertexai", - "api_id": "vertexai.googleapis.com", - "library_type": "GAPIC_COMBO", - "requires_billing": true -} diff --git a/java-vertexai/CHANGELOG.md b/java-vertexai/CHANGELOG.md deleted file mode 100644 index 456af7109404..000000000000 --- a/java-vertexai/CHANGELOG.md +++ /dev/null @@ -1,335 +0,0 @@ -# Changelog - -## 1.48.0 (None) - -* No change - - -## 1.47.0 (2026-03-11) - -* No change - - -## 1.46.0 (2026-02-25) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.57.0 ([#11956](https://github.com/googleapis/google-cloud-java/issues/11956)) ([62b97e1](https://github.com/googleapis/google-cloud-java/commit/62b97e108eee0f8649c53cef400774f4fca4ffab)) - - -## 1.43.0 (2026-01-29) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.56.0 ([#11879](https://github.com/googleapis/google-cloud-java/issues/11879)) ([ac1f018](https://github.com/googleapis/google-cloud-java/commit/ac1f0182ac5b405ca164ac867c8c042322736bef)) - - -## 1.42.0 (2026-01-15) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.55.1 ([#11863](https://github.com/googleapis/google-cloud-java/issues/11863)) ([50cda6e](https://github.com/googleapis/google-cloud-java/commit/50cda6ec7be56bf1900737a6aaf12fc494be20c2)) - - -## 1.41.0 (2025-12-16) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.54.2 ([#11819](https://github.com/googleapis/google-cloud-java/issues/11819)) ([f32924a](https://github.com/googleapis/google-cloud-java/commit/f32924af0899a0b34646e88ffa8c527163b3bb24)) - - -## 1.38.0 (2025-10-21) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.53.0 ([#11776](https://github.com/googleapis/google-cloud-java/issues/11776)) ([e4a2892](https://github.com/googleapis/google-cloud-java/commit/e4a2892c8f7d51e3c3bec551f922b42f70a880d8)) - - -## 1.37.0 (2025-10-13) - -* No change - - -## 1.36.0 (2025-10-07) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.52.3 ([#11755](https://github.com/googleapis/google-cloud-java/issues/11755)) ([b117bc3](https://github.com/googleapis/google-cloud-java/commit/b117bc3d8d04ccc3c1f5586b73e1718ff46b23e6)) - - -## 1.35.0 (2025-09-22) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.52.2 ([#11747](https://github.com/googleapis/google-cloud-java/issues/11747)) ([deb0ed9](https://github.com/googleapis/google-cloud-java/commit/deb0ed92d7c3279e0e26ba8b22463cb77131fa10)) - - -## 1.34.0 (2025-09-11) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.52.1 ([#11738](https://github.com/googleapis/google-cloud-java/issues/11738)) ([b17cf6d](https://github.com/googleapis/google-cloud-java/commit/b17cf6de63b9cabcd44b6fc21b57c187b321ae8f)) - - -## 1.33.0 (2025-08-25) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#11727](https://github.com/googleapis/google-cloud-java/issues/11727)) ([31d8698](https://github.com/googleapis/google-cloud-java/commit/31d86980d0e27e0a948727d778cf46fbcf227239)) - - -## 1.32.0 (2025-08-13) - -* No change - - -## 1.31.0 (2025-08-08) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.51.0 ([#11695](https://github.com/googleapis/google-cloud-java/issues/11695)) ([b82ce00](https://github.com/googleapis/google-cloud-java/commit/b82ce005c30551b8714099b7219b71bda85aa3a5)) - - -## 1.30.0 (2025-07-30) - -* No change - - -## 1.29.0 (2025-07-28) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.50.2 ([#11680](https://github.com/googleapis/google-cloud-java/issues/11680)) ([d1b99a7](https://github.com/googleapis/google-cloud-java/commit/d1b99a706daa10c487b56edbb5170b41530628ca)) - - -## 1.28.0 (2025-07-11) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.50.1 ([#11655](https://github.com/googleapis/google-cloud-java/issues/11655)) ([9b34528](https://github.com/googleapis/google-cloud-java/commit/9b34528f85043049e3349fffc30bb2dbfe01836c)) - - -## 1.27.0 (2025-06-25) - -### Bug Fixes - -* Add deprecation note in README and pom ([#11638](https://github.com/googleapis/google-cloud-java/issues/11638)) ([8cc7c69](https://github.com/googleapis/google-cloud-java/commit/8cc7c693055c29428bb022c762cf4023a2cfacd2)) -* Add deprecation notice for generativeai package ([033b5f4](https://github.com/googleapis/google-cloud-java/commit/033b5f4eef7ecf31543f848dac86f758643d13ca)) -* Add deprecation notice for generativeai package ([#11637](https://github.com/googleapis/google-cloud-java/issues/11637)) ([033b5f4](https://github.com/googleapis/google-cloud-java/commit/033b5f4eef7ecf31543f848dac86f758643d13ca)) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.50.0 ([#11624](https://github.com/googleapis/google-cloud-java/issues/11624)) ([a19f457](https://github.com/googleapis/google-cloud-java/commit/a19f457d10f15437ac26ce379048ff8b3cc6be5d)) - - -## 1.25.0 (2025-06-16) - -* No change - - -## 1.24.0 (2025-06-04) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.49.0 ([#11603](https://github.com/googleapis/google-cloud-java/issues/11603)) ([3ea506d](https://github.com/googleapis/google-cloud-java/commit/3ea506d86a54fae209e9971af7b4a8aa1f5997b9)) - - -## 1.22.0 (2025-05-06) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.46.3 ([#11531](https://github.com/googleapis/google-cloud-java/issues/11531)) ([5f9a9e7](https://github.com/googleapis/google-cloud-java/commit/5f9a9e73df5e44ae38a8d18780873b7896d31c04)) -* update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 ([#11561](https://github.com/googleapis/google-cloud-java/issues/11561)) ([9e84230](https://github.com/googleapis/google-cloud-java/commit/9e842300aa2e3e654785cc929aef0d6bb9a1a0a9)) - - -## 1.19.0 (2025-02-26) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.44.0 ([#11456](https://github.com/googleapis/google-cloud-java/issues/11456)) ([6b0ad6f](https://github.com/googleapis/google-cloud-java/commit/6b0ad6f8243cc60de7ee608237fa61445f0b0526)) - - -## 1.18.0 (2025-02-11) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.43.0 ([#11426](https://github.com/googleapis/google-cloud-java/issues/11426)) ([afdc294](https://github.com/googleapis/google-cloud-java/commit/afdc2944304a077ce4cbdd8c7675f1ca707b2be0)) - - -## 1.17.0 (2025-01-29) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 ([#11410](https://github.com/googleapis/google-cloud-java/issues/11410)) ([34dfd0d](https://github.com/googleapis/google-cloud-java/commit/34dfd0dc9c5ca042aca0778e8d34b2ca072bfeb1)) - - -## 1.16.0 (2025-01-09) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.41.1 ([#11382](https://github.com/googleapis/google-cloud-java/issues/11382)) ([a4fd23c](https://github.com/googleapis/google-cloud-java/commit/a4fd23ce1dfa364959de1e97e3b769996f3c7d0d)) - - -## 1.15.0 (2024-12-13) - -### Dependencies - -* update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 ([#11349](https://github.com/googleapis/google-cloud-java/issues/11349)) ([9bb6334](https://github.com/googleapis/google-cloud-java/commit/9bb6334458fdec53ba9fdec501de534d6516f102)) - - -## 1.14.0 (2024-11-18) - -* No change - - -## 1.13.0 (2024-10-28) - -* No change - - -## 1.12.0 (2024-10-09) - -* No change - - -## 1.10.0 (2024-09-26) - -* No change - - -## 1.9.0 (2024-09-11) - -### Features - -* add util class SchemaMaker to create Schema from JsonString or JsonObject ([#11118](https://github.com/googleapis/google-cloud-java/issues/11118)) ([22f9fe3](https://github.com/googleapis/google-cloud-java/commit/22f9fe3c46b004bf856ba62f5c3d4eafcb41af42)) -* update gapic library to the latest version ([#11129](https://github.com/googleapis/google-cloud-java/issues/11129)) ([711cd72](https://github.com/googleapis/google-cloud-java/commit/711cd7250f5c420a8d721952b43e05076e5ba130)) - - - -## 1.8.0 (2024-08-21) - -### Features - -* add custom headers support in VertexAI ([#11085](https://github.com/googleapis/google-cloud-java/issues/11085)) ([5bed284](https://github.com/googleapis/google-cloud-java/commit/5bed2849157e35c737eeff34fb749a84639f4f66)) - - - -## 1.7.0 (2024-07-31) - -* No change - - -## 1.6.0 (2024-06-27) - -### Features - -* add AutomaticFunctionCallingResponder class ([#10896](https://github.com/googleapis/google-cloud-java/issues/10896)) ([a97ac3d](https://github.com/googleapis/google-cloud-java/commit/a97ac3d71c92db934d566df0f8a24a20e8479aa9)) -* add FunctionDeclarationMaker.fromFunc to create FunctionDeclaration from a Java static method ([#10915](https://github.com/googleapis/google-cloud-java/issues/10915)) ([5a10656](https://github.com/googleapis/google-cloud-java/commit/5a10656cf56ff8bcfdf276434d617e7384eab9ac)) -* allow setting ToolConfig and SystemInstruction in ChatSession ([#10953](https://github.com/googleapis/google-cloud-java/issues/10953)) ([5ebfc33](https://github.com/googleapis/google-cloud-java/commit/5ebfc33afaf473c847389f9ef8adc58ee41f6a29)) -* enable AutomaticFunctionCallingResponder in ChatSession ([#10913](https://github.com/googleapis/google-cloud-java/issues/10913)) ([4db0d1d](https://github.com/googleapis/google-cloud-java/commit/4db0d1dfa6069e6d917f12b625cb7cc9319323e4)) -* infer location and project when user doesn't specify them. ([#10868](https://github.com/googleapis/google-cloud-java/issues/10868)) ([14f9825](https://github.com/googleapis/google-cloud-java/commit/14f98251ee1f81d10bd23a21b515a34d2af1f98f)) -* support ToolConfig in GenerativeModel ([#10950](https://github.com/googleapis/google-cloud-java/issues/10950)) ([0801812](https://github.com/googleapis/google-cloud-java/commit/08018121c0d1284d7dd0cd0d288f40d0a11e5506)) -* Update gapic to include ToolConfig ([#10920](https://github.com/googleapis/google-cloud-java/issues/10920)) ([782f21b](https://github.com/googleapis/google-cloud-java/commit/782f21b5836d3b56bf58cc81026ab326e260b16c)) - - - -## 1.5.0 (None) - -* No change - - -## 1.4.0 (2024-05-23) - -### Features - -* Allow tuned model to be used. ([#10825](https://github.com/googleapis/google-cloud-java/issues/10825)) ([9081269](https://github.com/googleapis/google-cloud-java/commit/9081269c26399a008498fbb605ef6c7d1b0c770b)) - - - -## 1.3.0 (2024-05-08) - -### Features - -* adding system instruction support ([#10775](https://github.com/googleapis/google-cloud-java/issues/10775)) ([b90c291](https://github.com/googleapis/google-cloud-java/commit/b90c291ed20702162bd7b231d548b4a15e67b1c5)) - - - -## 1.2.0 (2024-04-25) - -### Features - -* Update gapic to include system instruction ([#10733](https://github.com/googleapis/google-cloud-java/issues/10733)) ([8340a49](https://github.com/googleapis/google-cloud-java/commit/8340a49755a3c1504765b83f244099a5fbb1cd46)) -* check null and empty values for input String ([#10658](https://github.com/googleapis/google-cloud-java/issues/10658)) ([949889d](https://github.com/googleapis/google-cloud-java/commit/949889dd71175601ab5d099f65b1f7656205177e)) - - - -## 1.1.0 (2024-04-04) - -* No change - - -## 0.8.0 (2024-03-28) - -* No change - - -## 0.7.0 (2024-03-22) - -### Features - -* Change the unmodifiable list to immutable list for getHistory -* do not allow null values in Builder's setter and remove model's setters. -* remove GenerateContentConfig -* Make ChatSession and GenerativeModel final -* remove deprecated methods in GenerativeModel and ChatSession -* make client getters in VertexAI private -* remove Transport from GenerativeModel -* Remove vararg scopes in VertexAI -* add fluent API in ChatSession ([#10597](https://github.com/googleapis/google-cloud-java/issues/10597)) ([5c3d93e](https://github.com/googleapis/google-cloud-java/commit/5c3d93eafe76c97e50fc174678743fe59be699af)) -* add fluent API in GenerativeModel ([#10585](https://github.com/googleapis/google-cloud-java/issues/10585)) ([8bc8adb](https://github.com/googleapis/google-cloud-java/commit/8bc8adbf0dae047d508ca591c659bfb91dfc02f0)) -* Add FunctionDeclarationMaker ([#10592](https://github.com/googleapis/google-cloud-java/issues/10592)) ([a8aa591](https://github.com/googleapis/google-cloud-java/commit/a8aa591431ea79008aa92bba3c68b7dcda038ab6)) -* add generateContentAsync methods to GenerativeModel ([#10599](https://github.com/googleapis/google-cloud-java/issues/10599)) ([17b01c6](https://github.com/googleapis/google-cloud-java/commit/17b01c6527090be5553c63986c1dd64caf818187)) -* Update Gapic client. ([#10574](https://github.com/googleapis/google-cloud-java/issues/10574)) ([bedcddf](https://github.com/googleapis/google-cloud-java/commit/bedcddfea33aeee8f3d813a0c3250380bb988838)) -* make a copy of the list in `ChatSession.setHistory()` ([#10608](https://github.com/googleapis/google-cloud-java/issues/10608)) ([3e3e35a](https://github.com/googleapis/google-cloud-java/commit/3e3e35a5c1184a486f904858f3647c9313bd5b23)) -* Update README ([#10607](https://github.com/googleapis/google-cloud-java/issues/10607)) ([05275be](https://github.com/googleapis/google-cloud-java/commit/05275be1b35530c65ac930cdc58096972c275df9)) -* Change the unmodifiable list to immutable list for getHistory ([3f68001](https://github.com/googleapis/google-cloud-java/commit/3f68001f3bc85f12d9d801ddb05d18c4790d6689)) -* do not allow null values in Builder's setter and remove model's setters. ([a2407ab](https://github.com/googleapis/google-cloud-java/commit/a2407ab756ef22c57c1378d50b55e8920c7b34ae)) -* Make ChatSession and GenerativeModel final ([80495ad](https://github.com/googleapis/google-cloud-java/commit/80495ada838c38f42f8aa397b1e57681f46103bb)) -* make client getters in VertexAI private ([e8994c7](https://github.com/googleapis/google-cloud-java/commit/e8994c798037a50b5bb0f43f59f08aba37a330f4)) -* remove deprecated methods in GenerativeModel and ChatSession ([c54eaa9](https://github.com/googleapis/google-cloud-java/commit/c54eaa9dd86d1ddcdd86110aab468039c3aad903)) -* remove GenerateContentConfig ([31f5e12](https://github.com/googleapis/google-cloud-java/commit/31f5e12e889ac03d510de4a5b3dcdae0b2b27d0a)) -* remove Transport from GenerativeModel ([f024111](https://github.com/googleapis/google-cloud-java/commit/f024111a400b4409d87871322b866c7611dda63c)) -* Remove vararg scopes in VertexAI ([afc367f](https://github.com/googleapis/google-cloud-java/commit/afc367ff21b2bdd60977709bbee4b4a7a22c2fbf)) - - - -## 0.6.0 (2024-03-06) - -### Features - -* add GenerateContentConfig class ([#10413](https://github.com/googleapis/google-cloud-java/issues/10413)) ([04e9574](https://github.com/googleapis/google-cloud-java/commit/04e9574a223cd9c42615bfde18aa6ad3dc551251)) -* add GenerateContentConfig to generateContent method ([#10425](https://github.com/googleapis/google-cloud-java/issues/10425)) ([903abf3](https://github.com/googleapis/google-cloud-java/commit/903abf39cae4810be41f2475c63a0fcb0b238bc1)) -* add GenerateContentConfig to generateContentStream method ([#10424](https://github.com/googleapis/google-cloud-java/issues/10424)) ([ec9dd00](https://github.com/googleapis/google-cloud-java/commit/ec9dd001c4058871ecf7ff7e3b91633aac3bf17b)) -* add GenerateContentConfig to sendMessage method ([#10436](https://github.com/googleapis/google-cloud-java/issues/10436)) ([25d00c7](https://github.com/googleapis/google-cloud-java/commit/25d00c7c4f1a68e45e491715b0d2c07f2ac4618d)) -* Mark generateContent variants with GenerationConfig and List<SafetySetting> as deprecated. ([#10474](https://github.com/googleapis/google-cloud-java/issues/10474)) ([7cf463b](https://github.com/googleapis/google-cloud-java/commit/7cf463b7e2d8fe7c3ed467ad8fe2e5dae2904ee7)) - - - -## 0.5.0 (2024-02-20) - -### Features - -* make setApiEndpoint effective for LlmUtilityServiceClient. ([#10385](https://github.com/googleapis/google-cloud-java/issues/10385)) ([b4ec244](https://github.com/googleapis/google-cloud-java/commit/b4ec2449f092e6dca1c9cd169421311579b67777)) - - - -## 0.4.0 (2024-02-09) - -### Features - -* add fromFunctionResponse in PartMaker ([#10272](https://github.com/googleapis/google-cloud-java/issues/10272)) ([20c8252](https://github.com/googleapis/google-cloud-java/commit/20c8252dcc4b093f6d699753ad39f0cdbef1d8ed)) -* Remove 'preview' namespace and start using @BetaApi ([#10330](https://github.com/googleapis/google-cloud-java/issues/10330)) ([29b2a36](https://github.com/googleapis/google-cloud-java/commit/29b2a3674bf8f387ecc30d94fdcdc7843cde8e15)) -* deprecate varargs scopes in VertexAI ([#10328](https://github.com/googleapis/google-cloud-java/issues/10328)) ([12f9a3c](https://github.com/googleapis/google-cloud-java/commit/12f9a3ce9521cb9ce92db71f21356eaf4519db07)) -* Add README section about function-calling ([#10320](https://github.com/googleapis/google-cloud-java/issues/10320)) ([ed92f0d](https://github.com/googleapis/google-cloud-java/commit/ed92f0d295070a598f70b6c19f10b3ffcc04e65c)) -* Update javadoc of VertexAI and Transport. ([#10296](https://github.com/googleapis/google-cloud-java/issues/10296)) ([2729b0b](https://github.com/googleapis/google-cloud-java/commit/2729b0b0f82b8bf069707cc3ecac52a6f497c8f5)) - diff --git a/java-vertexai/CONTRIBUTING.md b/java-vertexai/CONTRIBUTING.md deleted file mode 100644 index 3abd0830176e..000000000000 --- a/java-vertexai/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code Reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## Community Guidelines - -This project follows [Google's Open Source Community -Guidelines](https://opensource.google/conduct/). \ No newline at end of file diff --git a/java-vertexai/LICENSE b/java-vertexai/LICENSE deleted file mode 100644 index 7a4a3ea2424c..000000000000 --- a/java-vertexai/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.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. \ No newline at end of file diff --git a/java-vertexai/README.md b/java-vertexai/README.md index 683c23526465..25be19af1146 100644 --- a/java-vertexai/README.md +++ b/java-vertexai/README.md @@ -8,819 +8,4 @@ > [the migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java) > for details. -Java idiomatic SDK for [Vertex AI][product-docs]. - -[![Maven][maven-version-image]][maven-version-link] -![Stability][stability-image] - -- [Product Documentation][product-docs] - - -## Add dependency - -If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: - -```xml - - - - com.google.cloud - libraries-bom - 26.78.0 - pom - import - - - - - - - com.google.cloud - google-cloud-vertexai - -``` - -If you're using Maven without the BOM, add the following to your dependencies: - - - -```xml - - com.google.cloud - google-cloud-vertexai - 1.48.0 - -``` - -If you are using Gradle without BOM, add this to your dependencies: - -```Groovy -implementation 'com.google.cloud:google-cloud-vertexai:1.48.0' -``` - -If you are using SBT, add this to your dependencies: - -```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vertexai" % "1.48.0" -``` - - -## Authentication - -To learn how to authenticate to the API, see the [Authentication][authentication]. - -## Authorization - -When a client application makes a call to the Vertex AI API, the application -must be granted the [authorization scopes][auth-scopes] that are required for -the API. Additionally, the authenticated principal must have the -[IAM role(s)][predefined-iam-roles] that are required to access the Google Cloud -resources being called. - -## Getting Started - -Follow the instructions in this section to get started using the Vertex AI SDK for Java. - -### Prerequisites - -To use the Vertex AI SDK for Java, you must have completed the following: - -* [Create a Google Cloud project][create-project]. -* [Enable the Vertex AI API][enable-api] for your project. -* [Enable billing][enable-billing] for your project. -* [Install the Google Cloud Command Line Interface][cloud-cli] and run the - following commands in command line: - - ```sh - gcloud auth login && - gcloud config set project PROJECT_ID - ``` - -To acquire user credentials to use for [Application Default Credentials][adc], -run `gcloud auth application-default login`. - -### Install and setup the SDK - -You must install the `google-cloud-vertexai` library. See the -[Add Dependency](#add-dependency) section -to learn how to add `google-cloud-vertexai` as a dependency in your code. - -### Use the Vertex AI SDK for Java - -The following sections show you how to perform common tasks by using the -Vertex AI SDK for Java. - -#### Basic Text Generation -Vertex AI SDK allows you to access the service programmatically. The following code snippet is the most basic usage of SDK - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - GenerateContentResponse response = model.generateContent("How are you?"); - // Do something with the response - } - } -} -``` - -#### Stream generated output - -To get a streamed output, you can use the `generateContentStream` method: - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - ResponseStream responseStream = model.generateContentStream("How are you?"); - // Do something with the ResponseStream, which is an iterable. - } - } -} -``` - -#### Text Generation with Async -To get a future response, you can use the `generateContentAsync` method - -```java -package - -import com.google.api.core.ApiFuture; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - ApiFuture future = model.generateContentAsync("How are you?"); - - // Do something else. - - // Get the response from Future - GenerateContentResponse response = future.get(); - - // Do something with the response. - } - } -} -``` - -#### Generate text from multi-modal input - -To generate text from a prompt that contains multiple modalities of data, use -`ContentMaker` to make a `Content`: - -```java -package ; - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import com.google.cloud.vertexai.generativeai.ContentMaker; -import com.google.cloud.vertexai.generativeai.PartMaker; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.util.Arrays; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - private static final String IMAGE_URI = - - public static void main(String[] args) throws Exception { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION); ) { - // Vision model must be used for multi-modal input - GenerativeModel model = new GenerativeModel("gemini-pro-vision", vertexAi); - - ResponseStream stream = - model.generateContentStream(ContentMaker.fromMultiModalData( - "Please describe this image", - PartMaker.fromMimeTypeAndData("image/jpeg", IMAGE_URI) - )); - // Do something with the ResponseStream, which is an iterable. - } - } -} -``` - -#### Role Change for Multi-turn Conversation -For a multi-turn conversation, one needs to make a `Content` list to represent the whole conversation between two roles: "user" and "model". - -```java -package ; - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.generativeai.ContentMaker; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - private static final String MODEL_NAME = "gemini-pro"; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION); ) { - GenerativeModel model = - new GenerativeModel(MODEL_NAME, vertexAi); - - // Put all the contents in a Content list - List contents = - Arrays.asList( - ContentMaker.fromString("Hi!"), - ContentMaker.forRole("model") - .fromString("Hello! How may I assist you?"), - ContentMaker.fromString( - "Can you explain quantum mechanis as well in only a few sentences?")); - - // generate the result - GenerateContentResponse response = model.generateContent(contents); - - // ResponseHandler.getText is a helper function to retrieve the text part of the answer. - System.out.println("\nPrint response: "); - System.out.println(ResponseHandler.getText(response)); - System.out.println("\n"); - } - } -} -``` - -#### Use `ChatSession` for multi-turn chat - -The Vertex AI SDK for Java provides a `ChatSession` class that lets you easily -chat with the model: - -```java -package ; - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ChatSession; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION); ) { - GenerativeModel model = - new GenerativeModel("gemini-pro", vertexAi); - ChatSession chat = model.startChat(); - - // Send the first message. - // ChatSession also has two versions of sendMessage, stream and non-stream - ResponseStream response = chat.sendMessageStream("Hi!"); - - // Do something with the output stream, possibly with ResponseHandler - - // Now send another message. The history will be remembered by the ChatSession. - // Note: the stream needs to be consumed before you send another message - // or fetch the history. - ResponseStream anotherResponse = chat.sendMessageStream("Can you explain quantum mechanis as well in a few sentences?"); - - // Do something with the second response - - // See the whole history. Make sure you have consumed the stream. - List history = chat.getHistory(); - } - } -} -``` - -#### Update configurations - -The Vertex AI SDK for Java provides configurations for customizing content -generation. You can configure options like -[GenerationConfig][generationconfig-ref], [SafetySetting][safetysetting-ref], and -[system instructions][system-instruction], or add [Tool][tool-ref] for function -calling. - -You can choose between two configuration approaches: 1) set configurations -during model instantiation for consistency across all text generations, or 2) -adjust them on a per-request basis for fine-grained control. - -##### Model level configurations - -Below is an example of configure `GenerationConfig` for a `GenerativeModel`: -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - // Build a GenerationConfig instance. - GenerationConfig generationConfig = - GenerationConfig.newBuilder().setMaxOutputTokens(50).build(); - - // Use the builder to instantialize the model with the configuration. - GenerativeModel model = - new GenerativeModel.Builder() - .setModelName("gemino-pro") - .setVertexAi(vertexAi) - .setGenerationConfig(generationConfig) - .build(); - - // Generate the response. - GenerateContentResponse response = model.generateContent("Please explain LLM?"); - - // Do something with the response. - } - } -} -``` - -And an example of configuring preambles as a [system instruction][system-instruction]. -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.ContentMaker; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - - GenerativeModel model = - new GenerativeModel.Builder() - .setModelName("gemino-pro") - .setVertexAi(vertexAi) - .setSystemInstruction( - ContentMaker.fromString( - "You're a helpful assistant that starts all its answers with: \"COOL\"") - ) - .build(); - - GenerateContentResponse response = model.generateContent("How are you?"); - // Do something with the response - } - } -} -``` - - -##### Update request-level configurations - -The Vertex AI SDK for Java provides fluent APIs to control request-level -configurations. - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.HarmCategory; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold; -import com.google.cloud.vertexai.generativeai.GenerateContentConfig; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import java.io.IOException; -import java.util.Arrays; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION); ) { - // Build a SafetySetting instance. - SafetySetting safetySetting = - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT) - .setThreshold(HarmBlockThreshold.BLOCK_LOW_AND_ABOVE) - .build(); - - // Generate the response with the fluent API `withSafetySetting`. - GenerateContentResponse response = - model - .withSafetySetting(Arrays.asList(SafetySetting)) - .generateContent("Please explain LLM?"); - - // Do something with the response. - } - } -} -``` - -#### Configurations for ChatSession - -When a chat session is started (`ChatSesson chat = model.startChat()`), -it inherits all configurations from the model. You can also use fluent APIs -to update these settings during the chat. - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.generativeai.ChatSession; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION);) { - // Instantiate a model with GenerationConfig - GenerationConfig generationConfig = - GenerationConfig.newBuilder().setMaxOutputTokens(50).build(); - GenerativeModel model = - new GenerativeModel.Builder() - .setModelName("gemino-pro") - .setVertexAi(vertexAi) - .setGenerationConfig(generationConfig) - .build(); - - // Start a chat session - ChatSession chat = model.startChat(); - - // Send a message. The model level GenerationConfig will be applied here - GenerateContentResponse response = chat.sendMessage("Please explain LLM?"); - - // Do something with the response - - // Send another message, using Fluent API to update the GenerationConfig - response = - chat.withGenerationConfig(GenerationConfig.getDefaultInstance()) - .sendMessage("Tell me more about what you can do."); - - // Do something with the response - } - } -} -``` - - -#### Use ChatSession for function calling - -You can perfrom a function call in a `ChatSession` as follows: - -```java -package ; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.ChatSession; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ""; - private static final String LOCATION = ""; - private static final String MODEL_NAME = "gemini-pro"; - private static final String TEXT = "What's the weather in Vancouver?"; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI(PROJECT_ID, LOCATION); ) { - // Declare a function to be used in a request. - // We construct a jsonString that corresponds to the following function - // declaration. - // { - // "name": "getCurrentWeather", - // "description": "Get the current weather in a given location", - // "parameters": { - // "type": "OBJECT", - // "properties": { - // "location": { - // "type": "STRING", - // "description": "location" - // } - // } - // } - // } - // With JDK 15 and above, you can do - // - // String jsonString = """ - // { - // "name": "getCurrentWeather", - // "description": "Get the current weather in a given location", - // "parameters": { - // "type": "OBJECT", - // "properties": { - // "location": { - // "type": "STRING", - // "description": "location" - // } - // } - // } - // } - // """ - String jsonString = - "{\n" - + " \"name\": \"getCurrentWeather\",\n" - + " \"description\": \"Get the current weather in a given location\",\n" - + " \"parameters\": {\n" - + " \"type\": \"OBJECT\", \n" - + " \"properties\": {\n" - + " \"location\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"location\"\n" - + " }\n" - + " }\n" - + " }\n" - + "}"; - Tool tool = - Tool.newBuilder() - .addFunctionDeclarations( - FunctionDeclarationMaker.fromJsonString(jsonString) - ) - .build(); - - // Start a chat session from a model, with the use of the declared - // function. - GenerativeModel model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setTools(Arrays.asList(tool)) - .build(); - ChatSession chat = model.startChat(); - - System.out.println(String.format("Ask the question: %s", TEXT)); - GenerateContentResponse response = chat.sendMessage(TEXT); - - // The model will most likely return a function call to the declared - // function `getCurrentWeather` with "Vancouver" as the value for the - // argument `location`. - System.out.println("\nPrint response: "); - System.out.println(ResponseHandler.getContent(response)); - System.out.println("\n"); - - // Provide an answer to the model so that it knows what the result of a - // "function call" is. - Content content = - ContentMaker.fromMultiModalData( - PartMaker.fromFunctionResponse( - "getCurrentWeather", Collections.singletonMap("currentWeather", "snowing"))); - System.out.println("Provide the function response: "); - System.out.println(content); - System.out.println("\n"); - response = chat.sendMessage(content); - - // See what the model replies now - System.out.println("\nPrint response: "); - System.out.println(ResponseHandler.getText(response)); - System.out.println("\n"); - } - } -} -``` - -See the [Vertex AI SDK docs][javadocs] to learn more about how to use this Vertex AI SDK in more advanced ways. - -## Troubleshooting - -To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. - -## Other Configurations -### Vertex-scoped Configurations -#### Transport - -Vertex AI uses gRPC and rest for the transport layer. By default, we use gRPC transport. To use rest, passing a `Transport.REST` to the `VertexAI` constructor as the example below: - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.Transport; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI.Builder() - .setProjectId(PROJECT_ID) - .setLocation(LOCATION) - .setTransport(Transport.REST);) { - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - GenerateContentResponse response = model.generateContent("How are you?"); - // Do something with the response - } - } -} -``` - -#### Change API endpoints - -To use a different API endpoint, specify the endpoint that you want to use when -you instantiate `VertexAI`: - -```java -package - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.io.IOException; - -public class Main { - private static final String PROJECT_ID = ; - private static final String LOCATION = ; - - public static void main(String[] args) throws IOException { - try (VertexAI vertexAi = new VertexAI.Builder() - .setProjectId(PROJECT_ID) - .setLocation(LOCATION) - .setApiEndpoint();) { - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - GenerateContentResponse response = model.generateContent("How are you?"); - // Do something with the response - } - } -} -``` - - -## 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/). - - - -## Contribute to this library - - -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/vertex-ai/docs -[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/overview -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg -[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-vertexai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vertexai/0.0.1 -[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/google-cloud-java/blob/main/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/google-cloud-java/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=aiplatform.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 -[aiplatform-client-libraries]: https://cloud.google.com/java/docs/reference/google-cloud-aiplatform/latest/overview -[adc]: https://cloud.google.com/docs/authentication/application-default-credentials -[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 -[generative-ai-studio]: https://cloud.google.com/generative-ai-studio?hl=en -[generationconfig-ref]: https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/com.google.cloud.vertexai.api.GenerationConfig.Builder -[safetysetting-ref]: https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/com.google.cloud.vertexai.api.SafetySetting.Builder -[tool-ref]: https://cloud.google.com/java/docs/reference/google-cloud-vertexai/latest/com.google.cloud.vertexai.api.Tool.Builder -[system-instruction]: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions +This project has been moved to a new repository. Please refer to [googleapis/java-vertexai](https://github.com/googleapis/java-vertexai) for the source code and to report issues. diff --git a/java-vertexai/google-cloud-vertexai-bom/pom.xml b/java-vertexai/google-cloud-vertexai-bom/pom.xml deleted file mode 100644 index d6c780194c26..000000000000 --- a/java-vertexai/google-cloud-vertexai-bom/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-vertexai-bom - 1.49.0-SNAPSHOT - pom - - - com.google.cloud - google-cloud-pom-parent - 1.83.0-SNAPSHOT - ../../google-cloud-pom-parent/pom.xml - - - Google VertexAI API BOM - - BOM for VertexAI API - - - - true - - - - - - com.google.cloud - google-cloud-vertexai - 1.49.0-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - - - - diff --git a/java-vertexai/google-cloud-vertexai/pom.xml b/java-vertexai/google-cloud-vertexai/pom.xml deleted file mode 100644 index e4865bb000fa..000000000000 --- a/java-vertexai/google-cloud-vertexai/pom.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-vertexai - 1.49.0-SNAPSHOT - jar - Google VertexAI API - Vertex AI is an integrated suite of machine learning tools and services - for building and using ML models with AutoML or custom code. It offers both novices and experts - the best workbench for the entire machine learning development lifecycle. - - -------------------------------------------------------------------------------------- - DEPRECATION NOTICE: - The 'com.google.cloud.vertexai.generativeai' package and its classes are deprecated as of - June 24, 2025 and will be removed on June 24, 2026. - - Please transition to the Google Gen AI SDK (com.google.genai:google-genai) - for GenAI functionality. - - A detailed migration guide is available at: - https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java - -------------------------------------------------------------------------------------- - - - com.google.cloud - google-cloud-vertexai-parent - 1.49.0-SNAPSHOT - - - google-cloud-vertexai - - - - 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-vertexai-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 - - - org.mockito - mockito-core - test - - - org.mockito - mockito-inline - test - - - com.google.truth - truth - test - - - - com.google.api.grpc - grpc-google-cloud-vertexai-v1 - 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Constants.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Constants.java deleted file mode 100644 index f81cc129cf56..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Constants.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai; - -/** A class that holds all constants for vertexai. */ -public final class Constants { - // Constants for VertexAI class - public static final String USER_AGENT_HEADER = "model-builder"; - static final String DEFAULT_LOCATION = "us-central1"; - static final String GOOGLE_CLOUD_REGION = "GOOGLE_CLOUD_REGION"; - static final String CLOUD_ML_REGION = "CLOUD_ML_REGION"; - static final String GOOGLE_CLOUD_PROJECT = "GOOGLE_CLOUD_PROJECT"; - - private Constants() {} -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Transport.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Transport.java deleted file mode 100644 index 67efcb597bde..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/Transport.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai; - -/** Transport used for sending request. */ -public enum Transport { - /** When used, the clients will send REST requests to the backing service. */ - REST, - /** - * When used, the clients will send gRPC to the backing service. This is usually more efficient - * and is the default transport. - */ - GRPC -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/VertexAI.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/VertexAI.java deleted file mode 100644 index 8284e5821d88..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/VertexAI.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.api.core.InternalApi; -import com.google.api.gax.core.CredentialsProvider; -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.rpc.FixedHeaderProvider; -import com.google.api.gax.rpc.HeaderProvider; -import com.google.auth.Credentials; -import com.google.auth.oauth2.GoogleCredentials; -import com.google.cloud.vertexai.api.LlmUtilityServiceClient; -import com.google.cloud.vertexai.api.LlmUtilityServiceSettings; -import com.google.cloud.vertexai.api.PredictionServiceClient; -import com.google.cloud.vertexai.api.PredictionServiceSettings; -import com.google.common.base.Strings; -import com.google.common.base.Supplier; -import com.google.common.base.Suppliers; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.errorprone.annotations.CanIgnoreReturnValue; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * This class holds default settings and credentials to make Vertex AI API calls. - * - *

Note: The VertexAI instance will start a service client when the first API call is - * made. Please close the VertexAI instance after making any API calls so that clients get closed as - * well. - * - *

{@code
- * try (VertexAI vertexAi = new VertexAI("my-project", "us-central1"); ) {
- *   GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi)
- *   // Do something with the model.
- * }
- * }
- */ -public class VertexAI implements AutoCloseable { - - private final String projectId; - private final String location; - private final String apiEndpoint; - private final Transport transport; - private final HeaderProvider headerProvider; - private final CredentialsProvider credentialsProvider; - - private final transient Supplier predictionClientSupplier; - private final transient Supplier llmClientSupplier; - - @InternalApi - static Optional getEnvironmentVariable(String envKey) { - return Optional.ofNullable(System.getenv(envKey)); - } - - /** - * Constructs a VertexAI instance. - * - * @param projectId the default project to use when making API calls - * @param location the default location to use when making API calls - */ - public VertexAI(String projectId, String location) { - this( - projectId, - location, - Transport.GRPC, - ImmutableList.of(), - /* customHeaders= */ ImmutableMap.of(), - /* credentials= */ Optional.empty(), - /* apiEndpoint= */ Optional.empty(), - /* predictionClientSupplierOpt= */ Optional.empty(), - /* llmClientSupplierOpt= */ Optional.empty()); - } - - /** - * Constructs a VertexAI instance. - * - *

Note: SDK infers location from runtime environment first. If there is no location - * inferred from runtime environment, SDK will default location to `us-central1`. - * - *

SDK will infer projectId from runtime environment and GoogleCredentials. - * - * @throws java.lang.IllegalArgumentException If there is not projectId inferred from either - * runtime environment or GoogleCredentials - */ - public VertexAI() { - this( - null, - null, - Transport.GRPC, - ImmutableList.of(), - /* customHeaders= */ ImmutableMap.of(), - /* credentials= */ Optional.empty(), - /* apiEndpoint= */ Optional.empty(), - /* predictionClientSupplierOpt= */ Optional.empty(), - /* llmClientSupplierOpt= */ Optional.empty()); - } - - private VertexAI( - String projectId, - String location, - Transport transport, - List scopes, - Map customHeaders, - Optional credentials, - Optional apiEndpoint, - Optional> predictionClientSupplierOpt, - Optional> llmClientSupplierOpt) { - if (!scopes.isEmpty() && credentials.isPresent()) { - throw new IllegalArgumentException( - "At most one of Credentials and scopes should be specified."); - } - checkNotNull(transport, "transport can't be null"); - this.location = Strings.isNullOrEmpty(location) ? inferLocation() : location; - this.transport = transport; - - String sdkHeader = - String.format( - "%s/%s", - Constants.USER_AGENT_HEADER, - GaxProperties.getLibraryVersion(PredictionServiceSettings.class)); - Map headers = new HashMap<>(customHeaders); - headers.compute("user-agent", (k, v) -> v == null ? sdkHeader : sdkHeader + " " + v); - this.headerProvider = FixedHeaderProvider.create(headers); - - if (credentials.isPresent()) { - this.credentialsProvider = FixedCredentialsProvider.create(credentials.get()); - } else { - this.credentialsProvider = - scopes.isEmpty() - ? PredictionServiceSettings.defaultCredentialsProviderBuilder().build() - : GoogleCredentialsProvider.newBuilder() - .setScopesToApply(scopes) - .setUseJwtAccessWithScope(true) - .build(); - } - - this.projectId = Strings.isNullOrEmpty(projectId) ? inferProjectId() : projectId; - this.predictionClientSupplier = - Suppliers.memoize(predictionClientSupplierOpt.orElse(this::newPredictionServiceClient)); - - this.llmClientSupplier = - Suppliers.memoize(llmClientSupplierOpt.orElse(this::newLlmUtilityClient)); - - this.apiEndpoint = - apiEndpoint.orElse(String.format("%s-aiplatform.googleapis.com", this.location)); - } - - /** Builder for {@link VertexAI}. */ - public static class Builder { - private String projectId; - private String location; - private Transport transport = Transport.GRPC; - private ImmutableList scopes = ImmutableList.of(); - private ImmutableMap customHeaders = ImmutableMap.of(); - private Optional credentials = Optional.empty(); - private Optional apiEndpoint = Optional.empty(); - - private Supplier predictionClientSupplier; - - private Supplier llmClientSupplier; - - public VertexAI build() { - - return new VertexAI( - projectId, - location, - transport, - scopes, - customHeaders, - credentials, - apiEndpoint, - Optional.ofNullable(predictionClientSupplier), - Optional.ofNullable(llmClientSupplier)); - } - - @CanIgnoreReturnValue - public Builder setProjectId(String projectId) { - checkArgument(!Strings.isNullOrEmpty(projectId), "projectId can't be null or empty"); - - this.projectId = projectId; - return this; - } - - @CanIgnoreReturnValue - public Builder setLocation(String location) { - checkArgument(!Strings.isNullOrEmpty(location), "location can't be null or empty"); - - this.location = location; - return this; - } - - @CanIgnoreReturnValue - public Builder setApiEndpoint(String apiEndpoint) { - checkArgument(!Strings.isNullOrEmpty(apiEndpoint), "apiEndpoint can't be null or empty"); - - this.apiEndpoint = Optional.of(apiEndpoint); - return this; - } - - @CanIgnoreReturnValue - public Builder setTransport(Transport transport) { - checkNotNull(transport, "transport can't be null"); - - this.transport = transport; - return this; - } - - @CanIgnoreReturnValue - public Builder setCredentials(Credentials credentials) { - checkNotNull(credentials, "credentials can't be null"); - - this.credentials = Optional.of(credentials); - return this; - } - - @CanIgnoreReturnValue - public Builder setPredictionClientSupplier( - Supplier predictionClientSupplier) { - this.predictionClientSupplier = predictionClientSupplier; - return this; - } - - @CanIgnoreReturnValue - public Builder setLlmClientSupplier(Supplier llmClientSupplier) { - this.llmClientSupplier = llmClientSupplier; - return this; - } - - @CanIgnoreReturnValue - public Builder setScopes(List scopes) { - checkNotNull(scopes, "scopes can't be null"); - - this.scopes = ImmutableList.copyOf(scopes); - return this; - } - - @CanIgnoreReturnValue - public Builder setCustomHeaders(Map customHeaders) { - checkNotNull(customHeaders, "customHeaders can't be null"); - - this.customHeaders = ImmutableMap.copyOf(customHeaders); - return this; - } - } - - /** - * Returns the default {@link Transport} layer to use to send API requests. - * - * @return {@link Transport} layer used when sending API requests. - */ - public Transport getTransport() { - return transport; - } - - /** - * Returns the default project to use when making API calls. - * - * @return Project ID in string format. - */ - public String getProjectId() { - return projectId; - } - - /** - * Returns the default location to use when making API calls. - * - * @return Location in string format. - */ - public String getLocation() { - return location; - } - - /** - * Returns the default endpoint to use when making API calls. - * - * @return API endpoint in string format. - */ - public String getApiEndpoint() { - return apiEndpoint; - } - - /** - * Returns the headers to use when making API calls. - * - * @return a map of headers to use when making API calls. - */ - public Map getHeaders() { - return headerProvider.getHeaders(); - } - - /** - * Returns the default credentials to use when making API calls. - * - * @return {@link Credentials} to use when making API calls. - */ - public Credentials getCredentials() throws IOException { - return credentialsProvider.getCredentials(); - } - - /** - * Returns the {@link PredictionServiceClient} with GRPC or REST, based on the Transport type. The - * client will be instantiated when the first prediction API call is made. - * - * @return {@link PredictionServiceClient} that send requests to the backing service through - * method calls that map to the API methods. - */ - @InternalApi - public PredictionServiceClient getPredictionServiceClient() { - return predictionClientSupplier.get(); - } - - private PredictionServiceClient newPredictionServiceClient() { - // Disable the warning message logged in getApplicationDefault - Logger defaultCredentialsProviderLogger = - Logger.getLogger("com.google.auth.oauth2.DefaultCredentialsProvider"); - Level previousLevel = defaultCredentialsProviderLogger.getLevel(); - defaultCredentialsProviderLogger.setLevel(Level.SEVERE); - - try { - return PredictionServiceClient.create(getPredictionServiceSettings()); - } catch (IOException e) { - throw new IllegalStateException(e); - } finally { - defaultCredentialsProviderLogger.setLevel(previousLevel); - } - } - - private PredictionServiceSettings getPredictionServiceSettings() throws IOException { - PredictionServiceSettings.Builder builder; - if (transport == Transport.REST) { - builder = PredictionServiceSettings.newHttpJsonBuilder(); - } else { - builder = PredictionServiceSettings.newBuilder(); - } - builder.setEndpoint(String.format("%s:443", apiEndpoint)); - builder.setCredentialsProvider(credentialsProvider); - - builder.setHeaderProvider(headerProvider); - return builder.build(); - } - - /** - * Returns the {@link LlmUtilityServiceClient} with GRPC or REST, based on the Transport type. The - * client will be instantiated when the first API call is made. - * - * @return {@link LlmUtilityServiceClient} that makes calls to the backing service through method - * calls that map to the API methods. - */ - @InternalApi - public LlmUtilityServiceClient getLlmUtilityClient() { - return llmClientSupplier.get(); - } - - private LlmUtilityServiceClient newLlmUtilityClient() { - // Disable the warning message logged in getApplicationDefault - Logger defaultCredentialsProviderLogger = - Logger.getLogger("com.google.auth.oauth2.DefaultCredentialsProvider"); - Level previousLevel = defaultCredentialsProviderLogger.getLevel(); - defaultCredentialsProviderLogger.setLevel(Level.SEVERE); - - try { - return LlmUtilityServiceClient.create(getLlmUtilityServiceClientSettings()); - } catch (IOException e) { - throw new IllegalStateException(e); - } finally { - defaultCredentialsProviderLogger.setLevel(previousLevel); - } - } - - private String inferProjectId() { - final String projectNotFoundErrorMessage = - ("Unable to infer your project. Please provide a project Id by one of the following:" - + "\n- Passing a constructor argument by using new VertexAI(String projectId, String" - + " location)" - + "\n- Setting project using 'gcloud config set project my-project'"); - final Optional projectIdOptional = - getEnvironmentVariable(Constants.GOOGLE_CLOUD_PROJECT); - if (projectIdOptional.isPresent()) { - return projectIdOptional.get(); - } - try { - return Optional.ofNullable((GoogleCredentials) this.credentialsProvider.getCredentials()) - .map((credentials) -> credentials.getQuotaProjectId()) - .orElseThrow(() -> new IllegalArgumentException(projectNotFoundErrorMessage)); - } catch (IOException e) { - throw new IllegalArgumentException(projectNotFoundErrorMessage, e); - } - } - - private String inferLocation() { - return getEnvironmentVariable(Constants.GOOGLE_CLOUD_REGION) - .orElse( - getEnvironmentVariable(Constants.CLOUD_ML_REGION).orElse(Constants.DEFAULT_LOCATION)); - } - - private LlmUtilityServiceSettings getLlmUtilityServiceClientSettings() throws IOException { - LlmUtilityServiceSettings.Builder settingsBuilder; - if (transport == Transport.REST) { - settingsBuilder = LlmUtilityServiceSettings.newHttpJsonBuilder(); - } else { - settingsBuilder = LlmUtilityServiceSettings.newBuilder(); - } - settingsBuilder.setEndpoint(String.format("%s:443", apiEndpoint)); - settingsBuilder.setCredentialsProvider(credentialsProvider); - - settingsBuilder.setHeaderProvider(headerProvider); - return settingsBuilder.build(); - } - - /** Closes the VertexAI instance together with all its instantiated clients. */ - @Override - public void close() { - predictionClientSupplier.get().close(); - llmClientSupplier.get().close(); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java deleted file mode 100644 index e64662fe1561..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java +++ /dev/null @@ -1,2546 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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.vertexai.api.stub.EndpointServiceStub; -import com.google.cloud.vertexai.api.stub.EndpointServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: A service for managing Vertex AI's Endpoints. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- *   EndpointName name =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * }
- * - *

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

CreateEndpoint

Creates an Endpoint.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • createEndpointAsync(CreateEndpointRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • createEndpointAsync(LocationName parent, Endpoint endpoint) - *

  • createEndpointAsync(String parent, Endpoint endpoint) - *

  • createEndpointAsync(LocationName parent, Endpoint endpoint, String endpointId) - *

  • createEndpointAsync(String parent, Endpoint endpoint, String endpointId) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • createEndpointOperationCallable() - *

  • createEndpointCallable() - *

- *

GetEndpoint

Gets an Endpoint.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getEndpoint(GetEndpointRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • getEndpoint(EndpointName name) - *

  • getEndpoint(String name) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getEndpointCallable() - *

- *

ListEndpoints

Lists Endpoints in a Location.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listEndpoints(ListEndpointsRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • listEndpoints(LocationName parent) - *

  • listEndpoints(String parent) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listEndpointsPagedCallable() - *

  • listEndpointsCallable() - *

- *

UpdateEndpoint

Updates an Endpoint.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • updateEndpoint(UpdateEndpointRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • updateEndpoint(Endpoint endpoint, FieldMask updateMask) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • updateEndpointCallable() - *

- *

UpdateEndpointLongRunning

Updates an Endpoint with a long running operation.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • updateEndpointLongRunningAsync(Endpoint endpoint) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • updateEndpointLongRunningOperationCallable() - *

  • updateEndpointLongRunningCallable() - *

- *

DeleteEndpoint

Deletes an Endpoint.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • deleteEndpointAsync(DeleteEndpointRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • deleteEndpointAsync(EndpointName name) - *

  • deleteEndpointAsync(String name) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • deleteEndpointOperationCallable() - *

  • deleteEndpointCallable() - *

- *

DeployModel

Deploys a Model into this Endpoint, creating a DeployedModel within it.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • deployModelAsync(DeployModelRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • deployModelAsync(EndpointName endpoint, DeployedModel deployedModel, Map<String, Integer> trafficSplit) - *

  • deployModelAsync(String endpoint, DeployedModel deployedModel, Map<String, Integer> trafficSplit) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • deployModelOperationCallable() - *

  • deployModelCallable() - *

- *

UndeployModel

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • undeployModelAsync(UndeployModelRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • undeployModelAsync(EndpointName endpoint, String deployedModelId, Map<String, Integer> trafficSplit) - *

  • undeployModelAsync(String endpoint, String deployedModelId, Map<String, Integer> trafficSplit) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • undeployModelOperationCallable() - *

  • undeployModelCallable() - *

- *

MutateDeployedModel

Updates an existing deployed model. Updatable fields include `min_replica_count`, `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only).

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • mutateDeployedModelAsync(MutateDeployedModelRequest request) - *

- *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

- *
    - *
  • mutateDeployedModelAsync(EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask) - *

  • mutateDeployedModelAsync(String endpoint, DeployedModel deployedModel, FieldMask updateMask) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • mutateDeployedModelOperationCallable() - *

  • mutateDeployedModelCallable() - *

- *

ListLocations

Lists information about the supported locations for this service.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listLocations(ListLocationsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listLocationsPagedCallable() - *

  • listLocationsCallable() - *

- *

GetLocation

Gets information about a location.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getLocation(GetLocationRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getLocationCallable() - *

- *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • setIamPolicy(SetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • setIamPolicyCallable() - *

- *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getIamPolicy(GetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getIamPolicyCallable() - *

- *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. - *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • testIamPermissions(TestIamPermissionsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • testIamPermissionsCallable() - *

- *
- * - *

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 EndpointServiceSettings 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
- * EndpointServiceSettings endpointServiceSettings =
- *     EndpointServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * EndpointServiceClient endpointServiceClient =
- *     EndpointServiceClient.create(endpointServiceSettings);
- * }
- * - *

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
- * EndpointServiceSettings endpointServiceSettings =
- *     EndpointServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * EndpointServiceClient endpointServiceClient =
- *     EndpointServiceClient.create(endpointServiceSettings);
- * }
- * - *

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
- * EndpointServiceSettings endpointServiceSettings =
- *     EndpointServiceSettings.newHttpJsonBuilder().build();
- * EndpointServiceClient endpointServiceClient =
- *     EndpointServiceClient.create(endpointServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class EndpointServiceClient implements BackgroundResource { - private final EndpointServiceSettings settings; - private final EndpointServiceStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of EndpointServiceClient with default settings. */ - public static final EndpointServiceClient create() throws IOException { - return create(EndpointServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of EndpointServiceClient, 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 EndpointServiceClient create(EndpointServiceSettings settings) - throws IOException { - return new EndpointServiceClient(settings); - } - - /** - * Constructs an instance of EndpointServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(EndpointServiceSettings). - */ - public static final EndpointServiceClient create(EndpointServiceStub stub) { - return new EndpointServiceClient(stub); - } - - /** - * Constructs an instance of EndpointServiceClient, 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 EndpointServiceClient(EndpointServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((EndpointServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected EndpointServiceClient(EndpointServiceStub 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 EndpointServiceSettings getSettings() { - return settings; - } - - public EndpointServiceStub 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. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(parent, endpoint).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location to create the Endpoint in. Format: - * `projects/{project}/locations/{location}` - * @param endpoint Required. The Endpoint to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createEndpointAsync( - LocationName parent, Endpoint endpoint) { - CreateEndpointRequest request = - CreateEndpointRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setEndpoint(endpoint) - .build(); - return createEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(parent, endpoint).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location to create the Endpoint in. Format: - * `projects/{project}/locations/{location}` - * @param endpoint Required. The Endpoint to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createEndpointAsync( - String parent, Endpoint endpoint) { - CreateEndpointRequest request = - CreateEndpointRequest.newBuilder().setParent(parent).setEndpoint(endpoint).build(); - return createEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   String endpointId = "endpointId-1837754992";
-   *   Endpoint response =
-   *       endpointServiceClient.createEndpointAsync(parent, endpoint, endpointId).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location to create the Endpoint in. Format: - * `projects/{project}/locations/{location}` - * @param endpoint Required. The Endpoint to create. - * @param endpointId Immutable. The ID to use for endpoint, which will become the final component - * of the endpoint resource name. If not provided, Vertex AI will generate a value for this - * ID. - *

If the first character is a letter, this value may be up to 63 characters, and valid - * characters are `[a-z0-9-]`. The last character must be a letter or number. - *

If the first character is a number, this value may be up to 9 characters, and valid - * characters are `[0-9]` with no leading zeros. - *

When using HTTP/JSON, this field is populated based on a query string argument, such as - * `?endpoint_id=12345`. This is the fallback for fields that are not included in either the - * URI or the body. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createEndpointAsync( - LocationName parent, Endpoint endpoint, String endpointId) { - CreateEndpointRequest request = - CreateEndpointRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setEndpoint(endpoint) - .setEndpointId(endpointId) - .build(); - return createEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   String endpointId = "endpointId-1837754992";
-   *   Endpoint response =
-   *       endpointServiceClient.createEndpointAsync(parent, endpoint, endpointId).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location to create the Endpoint in. Format: - * `projects/{project}/locations/{location}` - * @param endpoint Required. The Endpoint to create. - * @param endpointId Immutable. The ID to use for endpoint, which will become the final component - * of the endpoint resource name. If not provided, Vertex AI will generate a value for this - * ID. - *

If the first character is a letter, this value may be up to 63 characters, and valid - * characters are `[a-z0-9-]`. The last character must be a letter or number. - *

If the first character is a number, this value may be up to 9 characters, and valid - * characters are `[0-9]` with no leading zeros. - *

When using HTTP/JSON, this field is populated based on a query string argument, such as - * `?endpoint_id=12345`. This is the fallback for fields that are not included in either the - * URI or the body. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createEndpointAsync( - String parent, Endpoint endpoint, String endpointId) { - CreateEndpointRequest request = - CreateEndpointRequest.newBuilder() - .setParent(parent) - .setEndpoint(endpoint) - .setEndpointId(endpointId) - .build(); - return createEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   CreateEndpointRequest request =
-   *       CreateEndpointRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .setEndpointId("endpointId-1837754992")
-   *           .build();
-   *   Endpoint response = endpointServiceClient.createEndpointAsync(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 createEndpointAsync( - CreateEndpointRequest request) { - return createEndpointOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   CreateEndpointRequest request =
-   *       CreateEndpointRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .setEndpointId("endpointId-1837754992")
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.createEndpointOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Endpoint response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createEndpointOperationCallable() { - return stub.createEndpointOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   CreateEndpointRequest request =
-   *       CreateEndpointRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .setEndpointId("endpointId-1837754992")
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.createEndpointCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createEndpointCallable() { - return stub.createEndpointCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   Endpoint response = endpointServiceClient.getEndpoint(name);
-   * }
-   * }
- * - * @param name Required. The name of the Endpoint resource. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Endpoint getEndpoint(EndpointName name) { - GetEndpointRequest request = - GetEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getEndpoint(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String name =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   Endpoint response = endpointServiceClient.getEndpoint(name);
-   * }
-   * }
- * - * @param name Required. The name of the Endpoint resource. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Endpoint getEndpoint(String name) { - GetEndpointRequest request = GetEndpointRequest.newBuilder().setName(name).build(); - return getEndpoint(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetEndpointRequest request =
-   *       GetEndpointRequest.newBuilder()
-   *           .setName(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .build();
-   *   Endpoint response = endpointServiceClient.getEndpoint(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 Endpoint getEndpoint(GetEndpointRequest request) { - return getEndpointCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetEndpointRequest request =
-   *       GetEndpointRequest.newBuilder()
-   *           .setName(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = endpointServiceClient.getEndpointCallable().futureCall(request);
-   *   // Do something.
-   *   Endpoint response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getEndpointCallable() { - return stub.getEndpointCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Endpoints in 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location from which to list the Endpoints. - * Format: `projects/{project}/locations/{location}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEndpointsPagedResponse listEndpoints(LocationName parent) { - ListEndpointsRequest request = - ListEndpointsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listEndpoints(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Endpoints in 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the Location from which to list the Endpoints. - * Format: `projects/{project}/locations/{location}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListEndpointsPagedResponse listEndpoints(String parent) { - ListEndpointsRequest request = ListEndpointsRequest.newBuilder().setParent(parent).build(); - return listEndpoints(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Endpoints in 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListEndpointsRequest request =
-   *       ListEndpointsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   for (Endpoint element : endpointServiceClient.listEndpoints(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 ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest request) { - return listEndpointsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Endpoints in 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListEndpointsRequest request =
-   *       ListEndpointsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.listEndpointsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Endpoint element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEndpointsPagedCallable() { - return stub.listEndpointsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Endpoints in 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListEndpointsRequest request =
-   *       ListEndpointsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   while (true) {
-   *     ListEndpointsResponse response =
-   *         endpointServiceClient.listEndpointsCallable().call(request);
-   *     for (Endpoint element : response.getEndpointsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listEndpointsCallable() { - return stub.listEndpointsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.updateEndpoint(endpoint, updateMask);
-   * }
-   * }
- * - * @param endpoint Required. The Endpoint which replaces the resource on the server. - * @param updateMask Required. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Endpoint updateEndpoint(Endpoint endpoint, FieldMask updateMask) { - UpdateEndpointRequest request = - UpdateEndpointRequest.newBuilder().setEndpoint(endpoint).setUpdateMask(updateMask).build(); - return updateEndpoint(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UpdateEndpointRequest request =
-   *       UpdateEndpointRequest.newBuilder()
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Endpoint response = endpointServiceClient.updateEndpoint(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 Endpoint updateEndpoint(UpdateEndpointRequest request) { - return updateEndpointCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UpdateEndpointRequest request =
-   *       UpdateEndpointRequest.newBuilder()
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.updateEndpointCallable().futureCall(request);
-   *   // Do something.
-   *   Endpoint response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateEndpointCallable() { - return stub.updateEndpointCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint with a long running operation. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   Endpoint endpoint = Endpoint.newBuilder().build();
-   *   Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(endpoint).get();
-   * }
-   * }
- * - * @param endpoint Required. The Endpoint which replaces the resource on the server. Currently we - * only support updating the `client_connection_config` field, all the other fields' update - * will be blocked. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - updateEndpointLongRunningAsync(Endpoint endpoint) { - UpdateEndpointLongRunningRequest request = - UpdateEndpointLongRunningRequest.newBuilder().setEndpoint(endpoint).build(); - return updateEndpointLongRunningAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint with a long running operation. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UpdateEndpointLongRunningRequest request =
-   *       UpdateEndpointLongRunningRequest.newBuilder()
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .build();
-   *   Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(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 - updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest request) { - return updateEndpointLongRunningOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint with a long running operation. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UpdateEndpointLongRunningRequest request =
-   *       UpdateEndpointLongRunningRequest.newBuilder()
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.updateEndpointLongRunningOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Endpoint response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable() { - return stub.updateEndpointLongRunningOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an Endpoint with a long running operation. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UpdateEndpointLongRunningRequest request =
-   *       UpdateEndpointLongRunningRequest.newBuilder()
-   *           .setEndpoint(Endpoint.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.updateEndpointLongRunningCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateEndpointLongRunningCallable() { - return stub.updateEndpointLongRunningCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName name =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   endpointServiceClient.deleteEndpointAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The name of the Endpoint resource to be deleted. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteEndpointAsync( - EndpointName name) { - DeleteEndpointRequest request = - DeleteEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String name =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   endpointServiceClient.deleteEndpointAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The name of the Endpoint resource to be deleted. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteEndpointAsync(String name) { - DeleteEndpointRequest request = DeleteEndpointRequest.newBuilder().setName(name).build(); - return deleteEndpointAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeleteEndpointRequest request =
-   *       DeleteEndpointRequest.newBuilder()
-   *           .setName(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .build();
-   *   endpointServiceClient.deleteEndpointAsync(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 deleteEndpointAsync( - DeleteEndpointRequest request) { - return deleteEndpointOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeleteEndpointRequest request =
-   *       DeleteEndpointRequest.newBuilder()
-   *           .setName(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.deleteEndpointOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteEndpointOperationCallable() { - return stub.deleteEndpointOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an Endpoint. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeleteEndpointRequest request =
-   *       DeleteEndpointRequest.newBuilder()
-   *           .setName(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.deleteEndpointCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteEndpointCallable() { - return stub.deleteEndpointCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deploys a Model into this Endpoint, creating a DeployedModel within it. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   Map trafficSplit = new HashMap<>();
-   *   DeployModelResponse response =
-   *       endpointServiceClient.deployModelAsync(endpoint, deployedModel, trafficSplit).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that - * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated - * for the DeployedModel to start receiving traffic, either as part of this call, or via - * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. - * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's - * traffic that should be forwarded to that DeployedModel. - *

If this field is non-empty, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with - * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the - * actual ID of the new DeployedModel will be filled in its place by this method. The traffic - * percentage values must add up to 100. - *

If this field is empty, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deployModelAsync( - EndpointName endpoint, DeployedModel deployedModel, Map trafficSplit) { - DeployModelRequest request = - DeployModelRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .setDeployedModel(deployedModel) - .putAllTrafficSplit(trafficSplit) - .build(); - return deployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deploys a Model into this Endpoint, creating a DeployedModel within it. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   Map trafficSplit = new HashMap<>();
-   *   DeployModelResponse response =
-   *       endpointServiceClient.deployModelAsync(endpoint, deployedModel, trafficSplit).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that - * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated - * for the DeployedModel to start receiving traffic, either as part of this call, or via - * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. - * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's - * traffic that should be forwarded to that DeployedModel. - *

If this field is non-empty, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with - * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the - * actual ID of the new DeployedModel will be filled in its place by this method. The traffic - * percentage values must add up to 100. - *

If this field is empty, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deployModelAsync( - String endpoint, DeployedModel deployedModel, Map trafficSplit) { - DeployModelRequest request = - DeployModelRequest.newBuilder() - .setEndpoint(endpoint) - .setDeployedModel(deployedModel) - .putAllTrafficSplit(trafficSplit) - .build(); - return deployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deploys a Model into this Endpoint, creating a DeployedModel within it. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeployModelRequest request =
-   *       DeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   DeployModelResponse response = endpointServiceClient.deployModelAsync(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 deployModelAsync( - DeployModelRequest request) { - return deployModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deploys a Model into this Endpoint, creating a DeployedModel within it. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeployModelRequest request =
-   *       DeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.deployModelOperationCallable().futureCall(request);
-   *   // Do something.
-   *   DeployModelResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationCallable() { - return stub.deployModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deploys a Model into this Endpoint, creating a DeployedModel within it. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   DeployModelRequest request =
-   *       DeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   ApiFuture future = endpointServiceClient.deployModelCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable deployModelCallable() { - return stub.deployModelCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources - * it's using. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   String deployedModelId = "deployedModelId-1817547906";
-   *   Map trafficSplit = new HashMap<>();
-   *   UndeployModelResponse response =
-   *       endpointServiceClient.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the - * Endpoint. - * @param trafficSplit If this field is provided, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with - * it. If last DeployedModel is being undeployed from the Endpoint, the - * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel - * will be successfully undeployed only if it doesn't have any traffic assigned to it when - * this method executes, or if this field unassigns any traffic to it. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - undeployModelAsync( - EndpointName endpoint, String deployedModelId, Map trafficSplit) { - UndeployModelRequest request = - UndeployModelRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .setDeployedModelId(deployedModelId) - .putAllTrafficSplit(trafficSplit) - .build(); - return undeployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources - * it's using. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   String deployedModelId = "deployedModelId-1817547906";
-   *   Map trafficSplit = new HashMap<>();
-   *   UndeployModelResponse response =
-   *       endpointServiceClient.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the - * Endpoint. - * @param trafficSplit If this field is provided, then the Endpoint's - * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with - * it. If last DeployedModel is being undeployed from the Endpoint, the - * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel - * will be successfully undeployed only if it doesn't have any traffic assigned to it when - * this method executes, or if this field unassigns any traffic to it. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - undeployModelAsync( - String endpoint, String deployedModelId, Map trafficSplit) { - UndeployModelRequest request = - UndeployModelRequest.newBuilder() - .setEndpoint(endpoint) - .setDeployedModelId(deployedModelId) - .putAllTrafficSplit(trafficSplit) - .build(); - return undeployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources - * it's using. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UndeployModelRequest request =
-   *       UndeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModelId("deployedModelId-1817547906")
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   UndeployModelResponse response = endpointServiceClient.undeployModelAsync(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 - undeployModelAsync(UndeployModelRequest request) { - return undeployModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources - * it's using. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UndeployModelRequest request =
-   *       UndeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModelId("deployedModelId-1817547906")
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.undeployModelOperationCallable().futureCall(request);
-   *   // Do something.
-   *   UndeployModelResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable() { - return stub.undeployModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources - * it's using. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   UndeployModelRequest request =
-   *       UndeployModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModelId("deployedModelId-1817547906")
-   *           .putAllTrafficSplit(new HashMap())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.undeployModelCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable undeployModelCallable() { - return stub.undeployModelCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing deployed model. Updatable fields include `min_replica_count`, - * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, - * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only). - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   MutateDeployedModelResponse response =
-   *       endpointServiceClient.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource into which to mutate a - * DeployedModel. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModel Required. The DeployedModel to be mutated within the Endpoint. Only the - * following fields can be mutated: - *
    - *
  • `min_replica_count` in either - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - *
  • `max_replica_count` in either - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - *
  • `required_replica_count` in - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] - *
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs] - *
  • `disable_container_logging` (v1 only) - *
  • `enable_container_logging` (v1beta1 only) - *
- * - * @param updateMask Required. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - mutateDeployedModelAsync( - EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask) { - MutateDeployedModelRequest request = - MutateDeployedModelRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .setDeployedModel(deployedModel) - .setUpdateMask(updateMask) - .build(); - return mutateDeployedModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing deployed model. Updatable fields include `min_replica_count`, - * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, - * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only). - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   DeployedModel deployedModel = DeployedModel.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   MutateDeployedModelResponse response =
-   *       endpointServiceClient.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get();
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint resource into which to mutate a - * DeployedModel. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param deployedModel Required. The DeployedModel to be mutated within the Endpoint. Only the - * following fields can be mutated: - *
    - *
  • `min_replica_count` in either - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - *
  • `max_replica_count` in either - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - *
  • `required_replica_count` in - * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] - *
  • [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs] - *
  • `disable_container_logging` (v1 only) - *
  • `enable_container_logging` (v1beta1 only) - *
- * - * @param updateMask Required. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - mutateDeployedModelAsync(String endpoint, DeployedModel deployedModel, FieldMask updateMask) { - MutateDeployedModelRequest request = - MutateDeployedModelRequest.newBuilder() - .setEndpoint(endpoint) - .setDeployedModel(deployedModel) - .setUpdateMask(updateMask) - .build(); - return mutateDeployedModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing deployed model. Updatable fields include `min_replica_count`, - * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, - * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only). - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   MutateDeployedModelRequest request =
-   *       MutateDeployedModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   MutateDeployedModelResponse response =
-   *       endpointServiceClient.mutateDeployedModelAsync(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 - mutateDeployedModelAsync(MutateDeployedModelRequest request) { - return mutateDeployedModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing deployed model. Updatable fields include `min_replica_count`, - * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, - * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only). - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   MutateDeployedModelRequest request =
-   *       MutateDeployedModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       endpointServiceClient.mutateDeployedModelOperationCallable().futureCall(request);
-   *   // Do something.
-   *   MutateDeployedModelResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable() { - return stub.mutateDeployedModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing deployed model. Updatable fields include `min_replica_count`, - * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`, - * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only). - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   MutateDeployedModelRequest request =
-   *       MutateDeployedModelRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setDeployedModel(DeployedModel.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.mutateDeployedModelCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable mutateDeployedModelCallable() { - return stub.mutateDeployedModelCallable(); - } - - // 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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Location element : endpointServiceClient.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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListLocationsResponse response =
-   *         endpointServiceClient.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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   Location response = endpointServiceClient.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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   ApiFuture future = endpointServiceClient.getLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Location response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = endpointServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = endpointServiceClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = endpointServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = endpointServiceClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = endpointServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       endpointServiceClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - @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 ListEndpointsPagedResponse - extends AbstractPagedListResponse< - ListEndpointsRequest, - ListEndpointsResponse, - Endpoint, - ListEndpointsPage, - ListEndpointsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListEndpointsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListEndpointsPagedResponse(ListEndpointsPage page) { - super(page, ListEndpointsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListEndpointsPage - extends AbstractPage< - ListEndpointsRequest, ListEndpointsResponse, Endpoint, ListEndpointsPage> { - - private ListEndpointsPage( - PageContext context, - ListEndpointsResponse response) { - super(context, response); - } - - private static ListEndpointsPage createEmptyPage() { - return new ListEndpointsPage(null, null); - } - - @Override - protected ListEndpointsPage createPage( - PageContext context, - ListEndpointsResponse response) { - return new ListEndpointsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListEndpointsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListEndpointsRequest, - ListEndpointsResponse, - Endpoint, - ListEndpointsPage, - ListEndpointsFixedSizeCollection> { - - private ListEndpointsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListEndpointsFixedSizeCollection createEmptyCollection() { - return new ListEndpointsFixedSizeCollection(null, 0); - } - - @Override - protected ListEndpointsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListEndpointsFixedSizeCollection(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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java deleted file mode 100644 index 77b6132db2c0..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java +++ /dev/null @@ -1,484 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.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.vertexai.api.stub.EndpointServiceStubSettings; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 EndpointServiceClient}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of getEndpoint: - * - *

{@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
- * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
- *     EndpointServiceSettings.newBuilder();
- * endpointServiceSettingsBuilder
- *     .getEndpointSettings()
- *     .setRetrySettings(
- *         endpointServiceSettingsBuilder
- *             .getEndpointSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * EndpointServiceSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - * - *

To configure the RetrySettings of a Long Running Operation method, create an - * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to - * configure the RetrySettings for createEndpoint: - * - *

{@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
- * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
- *     EndpointServiceSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- *     OperationalTimedPollAlgorithm.create(
- *         RetrySettings.newBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
- *             .setRetryDelayMultiplier(1.5)
- *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
- *             .setTotalTimeoutDuration(Duration.ofHours(24))
- *             .build());
- * endpointServiceSettingsBuilder
- *     .createClusterOperationSettings()
- *     .setPollingAlgorithm(timedRetryAlgorithm)
- *     .build();
- * }
- */ -@Generated("by gapic-generator-java") -public class EndpointServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createEndpoint. */ - public UnaryCallSettings createEndpointSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).createEndpointSettings(); - } - - /** Returns the object with the settings used for calls to createEndpoint. */ - public OperationCallSettings - createEndpointOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).createEndpointOperationSettings(); - } - - /** Returns the object with the settings used for calls to getEndpoint. */ - public UnaryCallSettings getEndpointSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).getEndpointSettings(); - } - - /** Returns the object with the settings used for calls to listEndpoints. */ - public PagedCallSettings - listEndpointsSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).listEndpointsSettings(); - } - - /** Returns the object with the settings used for calls to updateEndpoint. */ - public UnaryCallSettings updateEndpointSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).updateEndpointSettings(); - } - - /** Returns the object with the settings used for calls to updateEndpointLongRunning. */ - public UnaryCallSettings - updateEndpointLongRunningSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).updateEndpointLongRunningSettings(); - } - - /** Returns the object with the settings used for calls to updateEndpointLongRunning. */ - public OperationCallSettings< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()) - .updateEndpointLongRunningOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteEndpoint. */ - public UnaryCallSettings deleteEndpointSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).deleteEndpointSettings(); - } - - /** Returns the object with the settings used for calls to deleteEndpoint. */ - public OperationCallSettings - deleteEndpointOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).deleteEndpointOperationSettings(); - } - - /** Returns the object with the settings used for calls to deployModel. */ - public UnaryCallSettings deployModelSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).deployModelSettings(); - } - - /** Returns the object with the settings used for calls to deployModel. */ - public OperationCallSettings< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).deployModelOperationSettings(); - } - - /** Returns the object with the settings used for calls to undeployModel. */ - public UnaryCallSettings undeployModelSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).undeployModelSettings(); - } - - /** Returns the object with the settings used for calls to undeployModel. */ - public OperationCallSettings< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).undeployModelOperationSettings(); - } - - /** Returns the object with the settings used for calls to mutateDeployedModel. */ - public UnaryCallSettings mutateDeployedModelSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).mutateDeployedModelSettings(); - } - - /** Returns the object with the settings used for calls to mutateDeployedModel. */ - public OperationCallSettings< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).mutateDeployedModelOperationSettings(); - } - - /** Returns the object with the settings used for calls to listLocations. */ - public PagedCallSettings - listLocationsSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).listLocationsSettings(); - } - - /** Returns the object with the settings used for calls to getLocation. */ - public UnaryCallSettings getLocationSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).getLocationSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((EndpointServiceStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((EndpointServiceStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((EndpointServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final EndpointServiceSettings create(EndpointServiceStubSettings stub) - throws IOException { - return new EndpointServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return EndpointServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return EndpointServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return EndpointServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return EndpointServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return EndpointServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return EndpointServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return EndpointServiceStubSettings.defaultTransportChannelProvider(); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return EndpointServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** 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 EndpointServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for EndpointServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(EndpointServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(EndpointServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(EndpointServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(EndpointServiceStubSettings.newBuilder()); - } - - private static Builder createHttpJsonDefault() { - return new Builder(EndpointServiceStubSettings.newHttpJsonBuilder()); - } - - public EndpointServiceStubSettings.Builder getStubSettingsBuilder() { - return ((EndpointServiceStubSettings.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 createEndpoint. */ - public UnaryCallSettings.Builder createEndpointSettings() { - return getStubSettingsBuilder().createEndpointSettings(); - } - - /** Returns the builder for the settings used for calls to createEndpoint. */ - public OperationCallSettings.Builder< - CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> - createEndpointOperationSettings() { - return getStubSettingsBuilder().createEndpointOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getEndpoint. */ - public UnaryCallSettings.Builder getEndpointSettings() { - return getStubSettingsBuilder().getEndpointSettings(); - } - - /** Returns the builder for the settings used for calls to listEndpoints. */ - public PagedCallSettings.Builder< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - listEndpointsSettings() { - return getStubSettingsBuilder().listEndpointsSettings(); - } - - /** Returns the builder for the settings used for calls to updateEndpoint. */ - public UnaryCallSettings.Builder updateEndpointSettings() { - return getStubSettingsBuilder().updateEndpointSettings(); - } - - /** Returns the builder for the settings used for calls to updateEndpointLongRunning. */ - public UnaryCallSettings.Builder - updateEndpointLongRunningSettings() { - return getStubSettingsBuilder().updateEndpointLongRunningSettings(); - } - - /** Returns the builder for the settings used for calls to updateEndpointLongRunning. */ - public OperationCallSettings.Builder< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings() { - return getStubSettingsBuilder().updateEndpointLongRunningOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteEndpoint. */ - public UnaryCallSettings.Builder deleteEndpointSettings() { - return getStubSettingsBuilder().deleteEndpointSettings(); - } - - /** Returns the builder for the settings used for calls to deleteEndpoint. */ - public OperationCallSettings.Builder - deleteEndpointOperationSettings() { - return getStubSettingsBuilder().deleteEndpointOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deployModel. */ - public UnaryCallSettings.Builder deployModelSettings() { - return getStubSettingsBuilder().deployModelSettings(); - } - - /** Returns the builder for the settings used for calls to deployModel. */ - public OperationCallSettings.Builder< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings() { - return getStubSettingsBuilder().deployModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to undeployModel. */ - public UnaryCallSettings.Builder undeployModelSettings() { - return getStubSettingsBuilder().undeployModelSettings(); - } - - /** Returns the builder for the settings used for calls to undeployModel. */ - public OperationCallSettings.Builder< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings() { - return getStubSettingsBuilder().undeployModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to mutateDeployedModel. */ - public UnaryCallSettings.Builder - mutateDeployedModelSettings() { - return getStubSettingsBuilder().mutateDeployedModelSettings(); - } - - /** Returns the builder for the settings used for calls to mutateDeployedModel. */ - public OperationCallSettings.Builder< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings() { - return getStubSettingsBuilder().mutateDeployedModelOperationSettings(); - } - - /** 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(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getStubSettingsBuilder().getIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public EndpointServiceSettings build() throws IOException { - return new EndpointServiceSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java deleted file mode 100644 index e34b260b2e42..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java +++ /dev/null @@ -1,1047 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -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.location.GetLocationRequest; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -import com.google.cloud.vertexai.api.stub.LlmUtilityServiceStub; -import com.google.cloud.vertexai.api.stub.LlmUtilityServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Value; -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 LLM related utility functions. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- *   EndpointName endpoint =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List instances = new ArrayList<>();
- *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
- * }
- * }
- * - *

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

CountTokens

Perform a token counting.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • countTokens(CountTokensRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • countTokens(EndpointName endpoint, List<Value> instances) - *

  • countTokens(String endpoint, List<Value> instances) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • countTokensCallable() - *

- *

ComputeTokens

Return a list of tokens based on the input text.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • computeTokens(ComputeTokensRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • computeTokens(EndpointName endpoint, List<Value> instances) - *

  • computeTokens(String endpoint, List<Value> instances) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • computeTokensCallable() - *

- *

ListLocations

Lists information about the supported locations for this service.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listLocations(ListLocationsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listLocationsPagedCallable() - *

  • listLocationsCallable() - *

- *

GetLocation

Gets information about a location.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getLocation(GetLocationRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getLocationCallable() - *

- *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • setIamPolicy(SetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • setIamPolicyCallable() - *

- *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getIamPolicy(GetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getIamPolicyCallable() - *

- *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. - *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • testIamPermissions(TestIamPermissionsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • testIamPermissionsCallable() - *

- *
- * - *

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 LlmUtilityServiceSettings 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
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- *     LlmUtilityServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- * - *

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
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- *     LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- * - *

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
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- *     LlmUtilityServiceSettings.newHttpJsonBuilder().build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- *     LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class LlmUtilityServiceClient implements BackgroundResource { - private final LlmUtilityServiceSettings settings; - private final LlmUtilityServiceStub stub; - - /** Constructs an instance of LlmUtilityServiceClient with default settings. */ - public static final LlmUtilityServiceClient create() throws IOException { - return create(LlmUtilityServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of LlmUtilityServiceClient, 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 LlmUtilityServiceClient create(LlmUtilityServiceSettings settings) - throws IOException { - return new LlmUtilityServiceClient(settings); - } - - /** - * Constructs an instance of LlmUtilityServiceClient, using the given stub for making calls. This - * is for advanced usage - prefer using create(LlmUtilityServiceSettings). - */ - public static final LlmUtilityServiceClient create(LlmUtilityServiceStub stub) { - return new LlmUtilityServiceClient(stub); - } - - /** - * Constructs an instance of LlmUtilityServiceClient, 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 LlmUtilityServiceClient(LlmUtilityServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((LlmUtilityServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected LlmUtilityServiceClient(LlmUtilityServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final LlmUtilityServiceSettings getSettings() { - return settings; - } - - public LlmUtilityServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a token counting. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List instances = new ArrayList<>();
-   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Optional. The instances that are the input to token counting call. Schema is - * identical to the prediction schema of the underlying model. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final CountTokensResponse countTokens(EndpointName endpoint, List instances) { - CountTokensRequest request = - CountTokensRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .addAllInstances(instances) - .build(); - return countTokens(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a token counting. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   List instances = new ArrayList<>();
-   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Optional. The instances that are the input to token counting call. Schema is - * identical to the prediction schema of the underlying model. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final CountTokensResponse countTokens(String endpoint, List instances) { - CountTokensRequest request = - CountTokensRequest.newBuilder().setEndpoint(endpoint).addAllInstances(instances).build(); - return countTokens(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a token counting. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   CountTokensRequest request =
-   *       CountTokensRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setModel("model104069929")
-   *           .addAllInstances(new ArrayList())
-   *           .addAllContents(new ArrayList())
-   *           .setSystemInstruction(Content.newBuilder().build())
-   *           .addAllTools(new ArrayList())
-   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
-   *           .build();
-   *   CountTokensResponse response = llmUtilityServiceClient.countTokens(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 CountTokensResponse countTokens(CountTokensRequest request) { - return countTokensCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a token counting. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   CountTokensRequest request =
-   *       CountTokensRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setModel("model104069929")
-   *           .addAllInstances(new ArrayList())
-   *           .addAllContents(new ArrayList())
-   *           .setSystemInstruction(Content.newBuilder().build())
-   *           .addAllTools(new ArrayList())
-   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       llmUtilityServiceClient.countTokensCallable().futureCall(request);
-   *   // Do something.
-   *   CountTokensResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable countTokensCallable() { - return stub.countTokensCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Return a list of tokens based on the input text. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List instances = new ArrayList<>();
-   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token - * ids. - * @param instances Optional. The instances that are the input to token computing API call. Schema - * is identical to the prediction schema of the text model, even for the non-text models, like - * chat models, or Codey models. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ComputeTokensResponse computeTokens(EndpointName endpoint, List instances) { - ComputeTokensRequest request = - ComputeTokensRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .addAllInstances(instances) - .build(); - return computeTokens(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Return a list of tokens based on the input text. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   List instances = new ArrayList<>();
-   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(endpoint, instances);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token - * ids. - * @param instances Optional. The instances that are the input to token computing API call. Schema - * is identical to the prediction schema of the text model, even for the non-text models, like - * chat models, or Codey models. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ComputeTokensResponse computeTokens(String endpoint, List instances) { - ComputeTokensRequest request = - ComputeTokensRequest.newBuilder().setEndpoint(endpoint).addAllInstances(instances).build(); - return computeTokens(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Return a list of tokens based on the input text. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   ComputeTokensRequest request =
-   *       ComputeTokensRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setModel("model104069929")
-   *           .addAllContents(new ArrayList())
-   *           .build();
-   *   ComputeTokensResponse response = llmUtilityServiceClient.computeTokens(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 ComputeTokensResponse computeTokens(ComputeTokensRequest request) { - return computeTokensCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Return a list of tokens based on the input text. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   ComputeTokensRequest request =
-   *       ComputeTokensRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setModel("model104069929")
-   *           .addAllContents(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       llmUtilityServiceClient.computeTokensCallable().futureCall(request);
-   *   // Do something.
-   *   ComputeTokensResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable computeTokensCallable() { - return stub.computeTokensCallable(); - } - - // 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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Location element : llmUtilityServiceClient.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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       llmUtilityServiceClient.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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListLocationsResponse response =
-   *         llmUtilityServiceClient.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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   Location response = llmUtilityServiceClient.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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   ApiFuture future =
-   *       llmUtilityServiceClient.getLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Location response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = llmUtilityServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = llmUtilityServiceClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = llmUtilityServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = llmUtilityServiceClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = llmUtilityServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       llmUtilityServiceClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - @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 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java deleted file mode 100644 index bd2a14c3c293..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.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.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.vertexai.api.stub.LlmUtilityServiceStubSettings; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 LlmUtilityServiceClient}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of countTokens: - * - *

{@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
- * LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder =
- *     LlmUtilityServiceSettings.newBuilder();
- * llmUtilityServiceSettingsBuilder
- *     .countTokensSettings()
- *     .setRetrySettings(
- *         llmUtilityServiceSettingsBuilder
- *             .countTokensSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - */ -@Generated("by gapic-generator-java") -public class LlmUtilityServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to countTokens. */ - public UnaryCallSettings countTokensSettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).countTokensSettings(); - } - - /** Returns the object with the settings used for calls to computeTokens. */ - public UnaryCallSettings computeTokensSettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).computeTokensSettings(); - } - - /** Returns the object with the settings used for calls to listLocations. */ - public PagedCallSettings - listLocationsSettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).listLocationsSettings(); - } - - /** Returns the object with the settings used for calls to getLocation. */ - public UnaryCallSettings getLocationSettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).getLocationSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((LlmUtilityServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final LlmUtilityServiceSettings create(LlmUtilityServiceStubSettings stub) - throws IOException { - return new LlmUtilityServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return LlmUtilityServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return LlmUtilityServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return LlmUtilityServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return LlmUtilityServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return LlmUtilityServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return LlmUtilityServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return LlmUtilityServiceStubSettings.defaultTransportChannelProvider(); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return LlmUtilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** 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 LlmUtilityServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for LlmUtilityServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(LlmUtilityServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(LlmUtilityServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(LlmUtilityServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(LlmUtilityServiceStubSettings.newBuilder()); - } - - private static Builder createHttpJsonDefault() { - return new Builder(LlmUtilityServiceStubSettings.newHttpJsonBuilder()); - } - - public LlmUtilityServiceStubSettings.Builder getStubSettingsBuilder() { - return ((LlmUtilityServiceStubSettings.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 countTokens. */ - public UnaryCallSettings.Builder - countTokensSettings() { - return getStubSettingsBuilder().countTokensSettings(); - } - - /** Returns the builder for the settings used for calls to computeTokens. */ - public UnaryCallSettings.Builder - computeTokensSettings() { - return getStubSettingsBuilder().computeTokensSettings(); - } - - /** 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(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getStubSettingsBuilder().getIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public LlmUtilityServiceSettings build() throws IOException { - return new LlmUtilityServiceSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java deleted file mode 100644 index 07312fb839ea..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java +++ /dev/null @@ -1,2144 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.HttpBody; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -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.BidiStreamingCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.ServerStreamingCallable; -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.vertexai.api.stub.PredictionServiceStub; -import com.google.cloud.vertexai.api.stub.PredictionServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Value; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: A service for online predictions and explanations. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- *   EndpointName endpoint =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List instances = new ArrayList<>();
- *   Value parameters = Value.newBuilder().setBoolValue(true).build();
- *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
- * }
- * }
- * - *

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

Predict

Perform an online prediction.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • predict(PredictRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • predict(EndpointName endpoint, List<Value> instances, Value parameters) - *

  • predict(String endpoint, List<Value> instances, Value parameters) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • predictCallable() - *

- *

RawPredict

Perform an online prediction with an arbitrary HTTP payload. - *

The response includes the following HTTP headers: - *

    - *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this prediction. - *
- *
    - *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. - *
- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • rawPredict(RawPredictRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • rawPredict(EndpointName endpoint, HttpBody httpBody) - *

  • rawPredict(String endpoint, HttpBody httpBody) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • rawPredictCallable() - *

- *

StreamRawPredict

Perform a streaming online prediction with an arbitrary HTTP payload.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamRawPredictCallable() - *

- *

DirectPredict

Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • directPredict(DirectPredictRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • directPredictCallable() - *

- *

DirectRawPredict

Perform an unary online prediction request to a gRPC model server for custom containers.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • directRawPredict(DirectRawPredictRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • directRawPredictCallable() - *

- *

StreamDirectPredict

Perform a streaming online prediction request to a gRPC model server for Vertex first-party products and frameworks.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamDirectPredictCallable() - *

- *

StreamDirectRawPredict

Perform a streaming online prediction request to a gRPC model server for custom containers.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamDirectRawPredictCallable() - *

- *

StreamingPredict

Perform a streaming online prediction request for Vertex first-party products and frameworks.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamingPredictCallable() - *

- *

ServerStreamingPredict

Perform a server-side streaming online prediction request for Vertex LLM streaming.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • serverStreamingPredictCallable() - *

- *

StreamingRawPredict

Perform a streaming online prediction request through gRPC.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamingRawPredictCallable() - *

- *

Explain

Perform an online explanation. - *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • explain(ExplainRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • explain(EndpointName endpoint, List<Value> instances, Value parameters, String deployedModelId) - *

  • explain(String endpoint, List<Value> instances, Value parameters, String deployedModelId) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • explainCallable() - *

- *

GenerateContent

Generate content with multimodal inputs.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • generateContent(GenerateContentRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • generateContent(String model, List<Content> contents) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • generateContentCallable() - *

- *

StreamGenerateContent

Generate content with multimodal inputs with streaming support.

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • streamGenerateContentCallable() - *

- *

EmbedContent

Embed content with multimodal inputs.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • embedContent(EmbedContentRequest request) - *

- *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- *
    - *
  • embedContent(EndpointName model, Content content) - *

  • embedContent(String model, Content content) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • embedContentCallable() - *

- *

ListLocations

Lists information about the supported locations for this service.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • listLocations(ListLocationsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • listLocationsPagedCallable() - *

  • listLocationsCallable() - *

- *

GetLocation

Gets information about a location.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getLocation(GetLocationRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getLocationCallable() - *

- *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • setIamPolicy(SetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • setIamPolicyCallable() - *

- *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • getIamPolicy(GetIamPolicyRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • getIamPolicyCallable() - *

- *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. - *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

- *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- *
    - *
  • testIamPermissions(TestIamPermissionsRequest request) - *

- *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- *
    - *
  • testIamPermissionsCallable() - *

- *
- * - *

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 PredictionServiceSettings 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
- * PredictionServiceSettings predictionServiceSettings =
- *     PredictionServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * PredictionServiceClient predictionServiceClient =
- *     PredictionServiceClient.create(predictionServiceSettings);
- * }
- * - *

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
- * PredictionServiceSettings predictionServiceSettings =
- *     PredictionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * PredictionServiceClient predictionServiceClient =
- *     PredictionServiceClient.create(predictionServiceSettings);
- * }
- * - *

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
- * PredictionServiceSettings predictionServiceSettings =
- *     PredictionServiceSettings.newHttpJsonBuilder().build();
- * PredictionServiceClient predictionServiceClient =
- *     PredictionServiceClient.create(predictionServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class PredictionServiceClient implements BackgroundResource { - private final PredictionServiceSettings settings; - private final PredictionServiceStub stub; - - /** Constructs an instance of PredictionServiceClient with default settings. */ - public static final PredictionServiceClient create() throws IOException { - return create(PredictionServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of PredictionServiceClient, 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 PredictionServiceClient create(PredictionServiceSettings settings) - throws IOException { - return new PredictionServiceClient(settings); - } - - /** - * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This - * is for advanced usage - prefer using create(PredictionServiceSettings). - */ - public static final PredictionServiceClient create(PredictionServiceStub stub) { - return new PredictionServiceClient(stub); - } - - /** - * Constructs an instance of PredictionServiceClient, 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 PredictionServiceClient(PredictionServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected PredictionServiceClient(PredictionServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final PredictionServiceSettings getSettings() { - return settings; - } - - public PredictionServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().setBoolValue(true).build();
-   *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Required. The instances that are the input to the prediction call. A - * DeployedModel may have an upper limit on the number of instances it supports per request, - * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of - * customer created Models, the behaviour is as documented by that Model. The schema of any - * single instance may be specified via Endpoint's DeployedModels' - * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - * @param parameters The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' [Model's - * ][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PredictResponse predict( - EndpointName endpoint, List instances, Value parameters) { - PredictRequest request = - PredictRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .addAllInstances(instances) - .setParameters(parameters) - .build(); - return predict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   List instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().setBoolValue(true).build();
-   *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Required. The instances that are the input to the prediction call. A - * DeployedModel may have an upper limit on the number of instances it supports per request, - * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of - * customer created Models, the behaviour is as documented by that Model. The schema of any - * single instance may be specified via Endpoint's DeployedModels' - * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - * @param parameters The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' [Model's - * ][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PredictResponse predict(String endpoint, List instances, Value parameters) { - PredictRequest request = - PredictRequest.newBuilder() - .setEndpoint(endpoint) - .addAllInstances(instances) - .setParameters(parameters) - .build(); - return predict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   PredictRequest request =
-   *       PredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setParameters(Value.newBuilder().setBoolValue(true).build())
-   *           .putAllLabels(new HashMap())
-   *           .build();
-   *   PredictResponse response = predictionServiceClient.predict(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 PredictResponse predict(PredictRequest request) { - return predictCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   PredictRequest request =
-   *       PredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setParameters(Value.newBuilder().setBoolValue(true).build())
-   *           .putAllLabels(new HashMap())
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.predictCallable().futureCall(request);
-   *   // Do something.
-   *   PredictResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable predictCallable() { - return stub.predictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction with an arbitrary HTTP payload. - * - *

The response includes the following HTTP headers: - * - *

    - *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that - * served this prediction. - *
- * - *
    - *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's - * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. - *
- * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   HttpBody httpBody = HttpBody.newBuilder().build();
-   *   HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload. - *

A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on - * the number of instances it supports per request. When this limit it is exceeded for an - * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict] - * method returns an error. When this limit is exceeded for a custom-trained model, the - * behavior varies depending on the model. - *

You can specify the schema for each instance in the - * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] - * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when - * you deploy the `Model` as a `DeployedModel` to an - * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody rawPredict(EndpointName endpoint, HttpBody httpBody) { - RawPredictRequest request = - RawPredictRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .setHttpBody(httpBody) - .build(); - return rawPredict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction with an arbitrary HTTP payload. - * - *

The response includes the following HTTP headers: - * - *

    - *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that - * served this prediction. - *
- * - *
    - *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's - * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. - *
- * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   HttpBody httpBody = HttpBody.newBuilder().build();
-   *   HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload. - *

A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on - * the number of instances it supports per request. When this limit it is exceeded for an - * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict] - * method returns an error. When this limit is exceeded for a custom-trained model, the - * behavior varies depending on the model. - *

You can specify the schema for each instance in the - * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] - * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when - * you deploy the `Model` as a `DeployedModel` to an - * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HttpBody rawPredict(String endpoint, HttpBody httpBody) { - RawPredictRequest request = - RawPredictRequest.newBuilder().setEndpoint(endpoint).setHttpBody(httpBody).build(); - return rawPredict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction with an arbitrary HTTP payload. - * - *

The response includes the following HTTP headers: - * - *

    - *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that - * served this prediction. - *
- * - *
    - *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's - * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. - *
- * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   RawPredictRequest request =
-   *       RawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setHttpBody(HttpBody.newBuilder().build())
-   *           .build();
-   *   HttpBody response = predictionServiceClient.rawPredict(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 rawPredict(RawPredictRequest request) { - return rawPredictCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online prediction with an arbitrary HTTP payload. - * - *

The response includes the following HTTP headers: - * - *

    - *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that - * served this prediction. - *
- * - *
    - *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's - * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. - *
- * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   RawPredictRequest request =
-   *       RawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setHttpBody(HttpBody.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = predictionServiceClient.rawPredictCallable().futureCall(request);
-   *   // Do something.
-   *   HttpBody response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable rawPredictCallable() { - return stub.rawPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a streaming online prediction with an arbitrary HTTP payload. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   StreamRawPredictRequest request =
-   *       StreamRawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setHttpBody(HttpBody.newBuilder().build())
-   *           .build();
-   *   ServerStream stream =
-   *       predictionServiceClient.streamRawPredictCallable().call(request);
-   *   for (HttpBody response : stream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final ServerStreamingCallable - streamRawPredictCallable() { - return stub.streamRawPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an unary online prediction request to a gRPC model server for Vertex first-party - * products and frameworks. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   DirectPredictRequest request =
-   *       DirectPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInputs(new ArrayList())
-   *           .setParameters(Tensor.newBuilder().build())
-   *           .build();
-   *   DirectPredictResponse response = predictionServiceClient.directPredict(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 DirectPredictResponse directPredict(DirectPredictRequest request) { - return directPredictCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an unary online prediction request to a gRPC model server for Vertex first-party - * products and frameworks. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   DirectPredictRequest request =
-   *       DirectPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInputs(new ArrayList())
-   *           .setParameters(Tensor.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.directPredictCallable().futureCall(request);
-   *   // Do something.
-   *   DirectPredictResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable directPredictCallable() { - return stub.directPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an unary online prediction request to a gRPC model server for custom containers. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   DirectRawPredictRequest request =
-   *       DirectRawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setMethodName("methodName-723163380")
-   *           .setInput(ByteString.EMPTY)
-   *           .build();
-   *   DirectRawPredictResponse response = predictionServiceClient.directRawPredict(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 DirectRawPredictResponse directRawPredict(DirectRawPredictRequest request) { - return directRawPredictCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an unary online prediction request to a gRPC model server for custom containers. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   DirectRawPredictRequest request =
-   *       DirectRawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setMethodName("methodName-723163380")
-   *           .setInput(ByteString.EMPTY)
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.directRawPredictCallable().futureCall(request);
-   *   // Do something.
-   *   DirectRawPredictResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - directRawPredictCallable() { - return stub.directRawPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a streaming online prediction request to a gRPC model server for Vertex first-party - * products and frameworks. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BidiStream bidiStream =
-   *       predictionServiceClient.streamDirectPredictCallable().call();
-   *   StreamDirectPredictRequest request =
-   *       StreamDirectPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInputs(new ArrayList())
-   *           .setParameters(Tensor.newBuilder().build())
-   *           .build();
-   *   bidiStream.send(request);
-   *   for (StreamDirectPredictResponse response : bidiStream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final BidiStreamingCallable - streamDirectPredictCallable() { - return stub.streamDirectPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a streaming online prediction request to a gRPC model server for custom containers. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BidiStream bidiStream =
-   *       predictionServiceClient.streamDirectRawPredictCallable().call();
-   *   StreamDirectRawPredictRequest request =
-   *       StreamDirectRawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setMethodName("methodName-723163380")
-   *           .setInput(ByteString.EMPTY)
-   *           .build();
-   *   bidiStream.send(request);
-   *   for (StreamDirectRawPredictResponse response : bidiStream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final BidiStreamingCallable - streamDirectRawPredictCallable() { - return stub.streamDirectRawPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a streaming online prediction request for Vertex first-party products and frameworks. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BidiStream bidiStream =
-   *       predictionServiceClient.streamingPredictCallable().call();
-   *   StreamingPredictRequest request =
-   *       StreamingPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInputs(new ArrayList())
-   *           .setParameters(Tensor.newBuilder().build())
-   *           .build();
-   *   bidiStream.send(request);
-   *   for (StreamingPredictResponse response : bidiStream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final BidiStreamingCallable - streamingPredictCallable() { - return stub.streamingPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a server-side streaming online prediction request for Vertex LLM streaming. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   StreamingPredictRequest request =
-   *       StreamingPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInputs(new ArrayList())
-   *           .setParameters(Tensor.newBuilder().build())
-   *           .build();
-   *   ServerStream stream =
-   *       predictionServiceClient.serverStreamingPredictCallable().call(request);
-   *   for (StreamingPredictResponse response : stream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final ServerStreamingCallable - serverStreamingPredictCallable() { - return stub.serverStreamingPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform a streaming online prediction request through gRPC. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BidiStream bidiStream =
-   *       predictionServiceClient.streamingRawPredictCallable().call();
-   *   StreamingRawPredictRequest request =
-   *       StreamingRawPredictRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setMethodName("methodName-723163380")
-   *           .setInput(ByteString.EMPTY)
-   *           .build();
-   *   bidiStream.send(request);
-   *   for (StreamingRawPredictResponse response : bidiStream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final BidiStreamingCallable - streamingRawPredictCallable() { - return stub.streamingRawPredictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online explanation. - * - *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is - * specified, the corresponding DeployModel must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If - * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not - * specified, all DeployedModels must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
-   *   List instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().setBoolValue(true).build();
-   *   String deployedModelId = "deployedModelId-1817547906";
-   *   ExplainResponse response =
-   *       predictionServiceClient.explain(endpoint, instances, parameters, deployedModelId);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Required. The instances that are the input to the explanation call. A - * DeployedModel may have an upper limit on the number of instances it supports per request, - * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case - * of customer created Models, the behaviour is as documented by that Model. The schema of any - * single instance may be specified via Endpoint's DeployedModels' - * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - * @param parameters The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' [Model's - * ][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - * @param deployedModelId If specified, this ExplainRequest will be served by the chosen - * DeployedModel, overriding - * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ExplainResponse explain( - EndpointName endpoint, List instances, Value parameters, String deployedModelId) { - ExplainRequest request = - ExplainRequest.newBuilder() - .setEndpoint(endpoint == null ? null : endpoint.toString()) - .addAllInstances(instances) - .setParameters(parameters) - .setDeployedModelId(deployedModelId) - .build(); - return explain(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online explanation. - * - *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is - * specified, the corresponding DeployModel must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If - * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not - * specified, all DeployedModels must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   String endpoint =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   List instances = new ArrayList<>();
-   *   Value parameters = Value.newBuilder().setBoolValue(true).build();
-   *   String deployedModelId = "deployedModelId-1817547906";
-   *   ExplainResponse response =
-   *       predictionServiceClient.explain(endpoint, instances, parameters, deployedModelId);
-   * }
-   * }
- * - * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param instances Required. The instances that are the input to the explanation call. A - * DeployedModel may have an upper limit on the number of instances it supports per request, - * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case - * of customer created Models, the behaviour is as documented by that Model. The schema of any - * single instance may be specified via Endpoint's DeployedModels' - * [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - * @param parameters The parameters that govern the prediction. The schema of the parameters may - * be specified via Endpoint's DeployedModels' [Model's - * ][google.cloud.aiplatform.v1.DeployedModel.model] - * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - * @param deployedModelId If specified, this ExplainRequest will be served by the chosen - * DeployedModel, overriding - * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ExplainResponse explain( - String endpoint, List instances, Value parameters, String deployedModelId) { - ExplainRequest request = - ExplainRequest.newBuilder() - .setEndpoint(endpoint) - .addAllInstances(instances) - .setParameters(parameters) - .setDeployedModelId(deployedModelId) - .build(); - return explain(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online explanation. - * - *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is - * specified, the corresponding DeployModel must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If - * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not - * specified, all DeployedModels must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ExplainRequest request =
-   *       ExplainRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setParameters(Value.newBuilder().setBoolValue(true).build())
-   *           .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
-   *           .setDeployedModelId("deployedModelId-1817547906")
-   *           .build();
-   *   ExplainResponse response = predictionServiceClient.explain(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 ExplainResponse explain(ExplainRequest request) { - return explainCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Perform an online explanation. - * - *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is - * specified, the corresponding DeployModel must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If - * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not - * specified, all DeployedModels must have - * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ExplainRequest request =
-   *       ExplainRequest.newBuilder()
-   *           .setEndpoint(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllInstances(new ArrayList())
-   *           .setParameters(Value.newBuilder().setBoolValue(true).build())
-   *           .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
-   *           .setDeployedModelId("deployedModelId-1817547906")
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.explainCallable().futureCall(request);
-   *   // Do something.
-   *   ExplainResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable explainCallable() { - return stub.explainCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Generate content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   String model = "model104069929";
-   *   List contents = new ArrayList<>();
-   *   GenerateContentResponse response = predictionServiceClient.generateContent(model, contents);
-   * }
-   * }
- * - * @param model Required. The fully qualified name of the publisher model or tuned model endpoint - * to use. - *

Publisher model format: - * `projects/{project}/locations/{location}/publishers/*/models/*` - *

Tuned model endpoint format: - * `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @param contents Required. The content of the current conversation with the model. - *

For single-turn queries, this is a single instance. For multi-turn queries, this is a - * repeated field that contains conversation history + latest request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GenerateContentResponse generateContent(String model, List contents) { - GenerateContentRequest request = - GenerateContentRequest.newBuilder().setModel(model).addAllContents(contents).build(); - return generateContent(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Generate content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GenerateContentRequest request =
-   *       GenerateContentRequest.newBuilder()
-   *           .setModel("model104069929")
-   *           .addAllContents(new ArrayList())
-   *           .setSystemInstruction(Content.newBuilder().build())
-   *           .setCachedContent(
-   *               CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString())
-   *           .addAllTools(new ArrayList())
-   *           .setToolConfig(ToolConfig.newBuilder().build())
-   *           .putAllLabels(new HashMap())
-   *           .addAllSafetySettings(new ArrayList())
-   *           .setModelArmorConfig(ModelArmorConfig.newBuilder().build())
-   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
-   *           .build();
-   *   GenerateContentResponse response = predictionServiceClient.generateContent(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 GenerateContentResponse generateContent(GenerateContentRequest request) { - return generateContentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Generate content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GenerateContentRequest request =
-   *       GenerateContentRequest.newBuilder()
-   *           .setModel("model104069929")
-   *           .addAllContents(new ArrayList())
-   *           .setSystemInstruction(Content.newBuilder().build())
-   *           .setCachedContent(
-   *               CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString())
-   *           .addAllTools(new ArrayList())
-   *           .setToolConfig(ToolConfig.newBuilder().build())
-   *           .putAllLabels(new HashMap())
-   *           .addAllSafetySettings(new ArrayList())
-   *           .setModelArmorConfig(ModelArmorConfig.newBuilder().build())
-   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.generateContentCallable().futureCall(request);
-   *   // Do something.
-   *   GenerateContentResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - generateContentCallable() { - return stub.generateContentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Generate content with multimodal inputs with streaming support. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GenerateContentRequest request =
-   *       GenerateContentRequest.newBuilder()
-   *           .setModel("model104069929")
-   *           .addAllContents(new ArrayList())
-   *           .setSystemInstruction(Content.newBuilder().build())
-   *           .setCachedContent(
-   *               CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString())
-   *           .addAllTools(new ArrayList())
-   *           .setToolConfig(ToolConfig.newBuilder().build())
-   *           .putAllLabels(new HashMap())
-   *           .addAllSafetySettings(new ArrayList())
-   *           .setModelArmorConfig(ModelArmorConfig.newBuilder().build())
-   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
-   *           .build();
-   *   ServerStream stream =
-   *       predictionServiceClient.streamGenerateContentCallable().call(request);
-   *   for (GenerateContentResponse response : stream) {
-   *     // Do something when a response is received.
-   *   }
-   * }
-   * }
- */ - public final ServerStreamingCallable - streamGenerateContentCallable() { - return stub.streamGenerateContentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Embed content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EndpointName model =
-   *       EndpointName.ofProjectLocationPublisherModelName(
-   *           "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]");
-   *   Content content = Content.newBuilder().build();
-   *   EmbedContentResponse response = predictionServiceClient.embedContent(model, content);
-   * }
-   * }
- * - * @param model Required. The name of the publisher model requested to serve the prediction. - * Format: `projects/{project}/locations/{location}/publishers/*/models/*` - * @param content Required. Input content to be embedded. Required. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final EmbedContentResponse embedContent(EndpointName model, Content content) { - EmbedContentRequest request = - EmbedContentRequest.newBuilder() - .setModel(model == null ? null : model.toString()) - .setContent(content) - .build(); - return embedContent(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Embed content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   String model =
-   *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *           .toString();
-   *   Content content = Content.newBuilder().build();
-   *   EmbedContentResponse response = predictionServiceClient.embedContent(model, content);
-   * }
-   * }
- * - * @param model Required. The name of the publisher model requested to serve the prediction. - * Format: `projects/{project}/locations/{location}/publishers/*/models/*` - * @param content Required. Input content to be embedded. Required. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final EmbedContentResponse embedContent(String model, Content content) { - EmbedContentRequest request = - EmbedContentRequest.newBuilder().setModel(model).setContent(content).build(); - return embedContent(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Embed content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EmbedContentRequest request =
-   *       EmbedContentRequest.newBuilder()
-   *           .setModel(
-   *               EndpointName.ofProjectLocationPublisherModelName(
-   *                       "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]")
-   *                   .toString())
-   *           .setContent(Content.newBuilder().build())
-   *           .setTitle("title110371416")
-   *           .setOutputDimensionality(-495931909)
-   *           .setAutoTruncate(true)
-   *           .build();
-   *   EmbedContentResponse response = predictionServiceClient.embedContent(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 EmbedContentResponse embedContent(EmbedContentRequest request) { - return embedContentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Embed content with multimodal inputs. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   EmbedContentRequest request =
-   *       EmbedContentRequest.newBuilder()
-   *           .setModel(
-   *               EndpointName.ofProjectLocationPublisherModelName(
-   *                       "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]")
-   *                   .toString())
-   *           .setContent(Content.newBuilder().build())
-   *           .setTitle("title110371416")
-   *           .setOutputDimensionality(-495931909)
-   *           .setAutoTruncate(true)
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.embedContentCallable().futureCall(request);
-   *   // Do something.
-   *   EmbedContentResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable embedContentCallable() { - return stub.embedContentCallable(); - } - - // 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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Location element : predictionServiceClient.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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ListLocationsRequest request =
-   *       ListLocationsRequest.newBuilder()
-   *           .setName("name3373707")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListLocationsResponse response =
-   *         predictionServiceClient.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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   Location response = predictionServiceClient.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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
-   *   ApiFuture future =
-   *       predictionServiceClient.getLocationCallable().futureCall(request);
-   *   // Do something.
-   *   Location response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Policy response = predictionServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   SetIamPolicyRequest request =
-   *       SetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setPolicy(Policy.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = predictionServiceClient.setIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   Policy response = predictionServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   GetIamPolicyRequest request =
-   *       GetIamPolicyRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .setOptions(GetPolicyOptions.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = predictionServiceClient.getIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   TestIamPermissionsResponse response = predictionServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. - * - *

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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   TestIamPermissionsRequest request =
-   *       TestIamPermissionsRequest.newBuilder()
-   *           .setResource(
-   *               EndpointName.ofProjectLocationEndpointName(
-   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
-   *                   .toString())
-   *           .addAllPermissions(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       predictionServiceClient.testIamPermissionsCallable().futureCall(request);
-   *   // Do something.
-   *   TestIamPermissionsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - testIamPermissionsCallable() { - return stub.testIamPermissionsCallable(); - } - - @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 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java deleted file mode 100644 index 28b0d4f2ca34..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -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.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.StreamingCallSettings; -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.vertexai.api.stub.PredictionServiceStubSettings; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 PredictionServiceClient}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of predict: - * - *

{@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
- * PredictionServiceSettings.Builder predictionServiceSettingsBuilder =
- *     PredictionServiceSettings.newBuilder();
- * predictionServiceSettingsBuilder
- *     .predictSettings()
- *     .setRetrySettings(
- *         predictionServiceSettingsBuilder
- *             .predictSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - */ -@Generated("by gapic-generator-java") -public class PredictionServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to predict. */ - public UnaryCallSettings predictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).predictSettings(); - } - - /** Returns the object with the settings used for calls to rawPredict. */ - public UnaryCallSettings rawPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).rawPredictSettings(); - } - - /** Returns the object with the settings used for calls to streamRawPredict. */ - public ServerStreamingCallSettings streamRawPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamRawPredictSettings(); - } - - /** Returns the object with the settings used for calls to directPredict. */ - public UnaryCallSettings directPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).directPredictSettings(); - } - - /** Returns the object with the settings used for calls to directRawPredict. */ - public UnaryCallSettings - directRawPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).directRawPredictSettings(); - } - - /** Returns the object with the settings used for calls to streamDirectPredict. */ - public StreamingCallSettings - streamDirectPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamDirectPredictSettings(); - } - - /** Returns the object with the settings used for calls to streamDirectRawPredict. */ - public StreamingCallSettings - streamDirectRawPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamDirectRawPredictSettings(); - } - - /** Returns the object with the settings used for calls to streamingPredict. */ - public StreamingCallSettings - streamingPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamingPredictSettings(); - } - - /** Returns the object with the settings used for calls to serverStreamingPredict. */ - public ServerStreamingCallSettings - serverStreamingPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).serverStreamingPredictSettings(); - } - - /** Returns the object with the settings used for calls to streamingRawPredict. */ - public StreamingCallSettings - streamingRawPredictSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamingRawPredictSettings(); - } - - /** Returns the object with the settings used for calls to explain. */ - public UnaryCallSettings explainSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).explainSettings(); - } - - /** Returns the object with the settings used for calls to generateContent. */ - public UnaryCallSettings - generateContentSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).generateContentSettings(); - } - - /** Returns the object with the settings used for calls to streamGenerateContent. */ - public ServerStreamingCallSettings - streamGenerateContentSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).streamGenerateContentSettings(); - } - - /** Returns the object with the settings used for calls to embedContent. */ - public UnaryCallSettings embedContentSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).embedContentSettings(); - } - - /** Returns the object with the settings used for calls to listLocations. */ - public PagedCallSettings - listLocationsSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).listLocationsSettings(); - } - - /** Returns the object with the settings used for calls to getLocation. */ - public UnaryCallSettings getLocationSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).getLocationSettings(); - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return ((PredictionServiceStubSettings) getStubSettings()).setIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return ((PredictionServiceStubSettings) getStubSettings()).getIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return ((PredictionServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); - } - - public static final PredictionServiceSettings create(PredictionServiceStubSettings stub) - throws IOException { - return new PredictionServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return PredictionServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return PredictionServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return PredictionServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return PredictionServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return PredictionServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return PredictionServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return PredictionServiceStubSettings.defaultTransportChannelProvider(); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return PredictionServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** 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 PredictionServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for PredictionServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(PredictionServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(PredictionServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(PredictionServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(PredictionServiceStubSettings.newBuilder()); - } - - private static Builder createHttpJsonDefault() { - return new Builder(PredictionServiceStubSettings.newHttpJsonBuilder()); - } - - public PredictionServiceStubSettings.Builder getStubSettingsBuilder() { - return ((PredictionServiceStubSettings.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 predict. */ - public UnaryCallSettings.Builder predictSettings() { - return getStubSettingsBuilder().predictSettings(); - } - - /** Returns the builder for the settings used for calls to rawPredict. */ - public UnaryCallSettings.Builder rawPredictSettings() { - return getStubSettingsBuilder().rawPredictSettings(); - } - - /** Returns the builder for the settings used for calls to streamRawPredict. */ - public ServerStreamingCallSettings.Builder - streamRawPredictSettings() { - return getStubSettingsBuilder().streamRawPredictSettings(); - } - - /** Returns the builder for the settings used for calls to directPredict. */ - public UnaryCallSettings.Builder - directPredictSettings() { - return getStubSettingsBuilder().directPredictSettings(); - } - - /** Returns the builder for the settings used for calls to directRawPredict. */ - public UnaryCallSettings.Builder - directRawPredictSettings() { - return getStubSettingsBuilder().directRawPredictSettings(); - } - - /** Returns the builder for the settings used for calls to streamDirectPredict. */ - public StreamingCallSettings.Builder - streamDirectPredictSettings() { - return getStubSettingsBuilder().streamDirectPredictSettings(); - } - - /** Returns the builder for the settings used for calls to streamDirectRawPredict. */ - public StreamingCallSettings.Builder< - StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> - streamDirectRawPredictSettings() { - return getStubSettingsBuilder().streamDirectRawPredictSettings(); - } - - /** Returns the builder for the settings used for calls to streamingPredict. */ - public StreamingCallSettings.Builder - streamingPredictSettings() { - return getStubSettingsBuilder().streamingPredictSettings(); - } - - /** Returns the builder for the settings used for calls to serverStreamingPredict. */ - public ServerStreamingCallSettings.Builder - serverStreamingPredictSettings() { - return getStubSettingsBuilder().serverStreamingPredictSettings(); - } - - /** Returns the builder for the settings used for calls to streamingRawPredict. */ - public StreamingCallSettings.Builder - streamingRawPredictSettings() { - return getStubSettingsBuilder().streamingRawPredictSettings(); - } - - /** Returns the builder for the settings used for calls to explain. */ - public UnaryCallSettings.Builder explainSettings() { - return getStubSettingsBuilder().explainSettings(); - } - - /** Returns the builder for the settings used for calls to generateContent. */ - public UnaryCallSettings.Builder - generateContentSettings() { - return getStubSettingsBuilder().generateContentSettings(); - } - - /** Returns the builder for the settings used for calls to streamGenerateContent. */ - public ServerStreamingCallSettings.Builder - streamGenerateContentSettings() { - return getStubSettingsBuilder().streamGenerateContentSettings(); - } - - /** Returns the builder for the settings used for calls to embedContent. */ - public UnaryCallSettings.Builder - embedContentSettings() { - return getStubSettingsBuilder().embedContentSettings(); - } - - /** 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(); - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return getStubSettingsBuilder().setIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getStubSettingsBuilder().getIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return getStubSettingsBuilder().testIamPermissionsSettings(); - } - - @Override - public PredictionServiceSettings build() throws IOException { - return new PredictionServiceSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json deleted file mode 100644 index c0b048e837bd..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vertexai.v1", - "libraryPackage": "com.google.cloud.vertexai.api", - "services": { - "EndpointService": { - "clients": { - "grpc": { - "libraryClient": "EndpointServiceClient", - "rpcs": { - "CreateEndpoint": { - "methods": ["createEndpointAsync", "createEndpointAsync", "createEndpointAsync", "createEndpointAsync", "createEndpointAsync", "createEndpointOperationCallable", "createEndpointCallable"] - }, - "DeleteEndpoint": { - "methods": ["deleteEndpointAsync", "deleteEndpointAsync", "deleteEndpointAsync", "deleteEndpointOperationCallable", "deleteEndpointCallable"] - }, - "DeployModel": { - "methods": ["deployModelAsync", "deployModelAsync", "deployModelAsync", "deployModelOperationCallable", "deployModelCallable"] - }, - "GetEndpoint": { - "methods": ["getEndpoint", "getEndpoint", "getEndpoint", "getEndpointCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicyCallable"] - }, - "GetLocation": { - "methods": ["getLocation", "getLocationCallable"] - }, - "ListEndpoints": { - "methods": ["listEndpoints", "listEndpoints", "listEndpoints", "listEndpointsPagedCallable", "listEndpointsCallable"] - }, - "ListLocations": { - "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] - }, - "MutateDeployedModel": { - "methods": ["mutateDeployedModelAsync", "mutateDeployedModelAsync", "mutateDeployedModelAsync", "mutateDeployedModelOperationCallable", "mutateDeployedModelCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicyCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissionsCallable"] - }, - "UndeployModel": { - "methods": ["undeployModelAsync", "undeployModelAsync", "undeployModelAsync", "undeployModelOperationCallable", "undeployModelCallable"] - }, - "UpdateEndpoint": { - "methods": ["updateEndpoint", "updateEndpoint", "updateEndpointCallable"] - }, - "UpdateEndpointLongRunning": { - "methods": ["updateEndpointLongRunningAsync", "updateEndpointLongRunningAsync", "updateEndpointLongRunningOperationCallable", "updateEndpointLongRunningCallable"] - } - } - } - } - }, - "LlmUtilityService": { - "clients": { - "grpc": { - "libraryClient": "LlmUtilityServiceClient", - "rpcs": { - "ComputeTokens": { - "methods": ["computeTokens", "computeTokens", "computeTokens", "computeTokensCallable"] - }, - "CountTokens": { - "methods": ["countTokens", "countTokens", "countTokens", "countTokensCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicyCallable"] - }, - "GetLocation": { - "methods": ["getLocation", "getLocationCallable"] - }, - "ListLocations": { - "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicyCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissionsCallable"] - } - } - } - } - }, - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "PredictionServiceClient", - "rpcs": { - "DirectPredict": { - "methods": ["directPredict", "directPredictCallable"] - }, - "DirectRawPredict": { - "methods": ["directRawPredict", "directRawPredictCallable"] - }, - "EmbedContent": { - "methods": ["embedContent", "embedContent", "embedContent", "embedContentCallable"] - }, - "Explain": { - "methods": ["explain", "explain", "explain", "explainCallable"] - }, - "GenerateContent": { - "methods": ["generateContent", "generateContent", "generateContentCallable"] - }, - "GetIamPolicy": { - "methods": ["getIamPolicy", "getIamPolicyCallable"] - }, - "GetLocation": { - "methods": ["getLocation", "getLocationCallable"] - }, - "ListLocations": { - "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] - }, - "Predict": { - "methods": ["predict", "predict", "predict", "predictCallable"] - }, - "RawPredict": { - "methods": ["rawPredict", "rawPredict", "rawPredict", "rawPredictCallable"] - }, - "ServerStreamingPredict": { - "methods": ["serverStreamingPredictCallable"] - }, - "SetIamPolicy": { - "methods": ["setIamPolicy", "setIamPolicyCallable"] - }, - "StreamDirectPredict": { - "methods": ["streamDirectPredictCallable"] - }, - "StreamDirectRawPredict": { - "methods": ["streamDirectRawPredictCallable"] - }, - "StreamGenerateContent": { - "methods": ["streamGenerateContentCallable"] - }, - "StreamRawPredict": { - "methods": ["streamRawPredictCallable"] - }, - "StreamingPredict": { - "methods": ["streamingPredictCallable"] - }, - "StreamingRawPredict": { - "methods": ["streamingRawPredictCallable"] - }, - "TestIamPermissions": { - "methods": ["testIamPermissions", "testIamPermissionsCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/package-info.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/package-info.java deleted file mode 100644 index c8207a169175..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/package-info.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 Vertex AI API - * - *

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

======================= EndpointServiceClient ======================= - * - *

Service Description: A service for managing Vertex AI's Endpoints. - * - *

Sample for EndpointServiceClient: - * - *

{@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 (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- *   EndpointName name =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * }
- * - *

======================= LlmUtilityServiceClient ======================= - * - *

Service Description: Service for LLM related utility functions. - * - *

Sample for LlmUtilityServiceClient: - * - *

{@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 (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- *   EndpointName endpoint =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List instances = new ArrayList<>();
- *   CountTokensResponse response = llmUtilityServiceClient.countTokens(endpoint, instances);
- * }
- * }
- * - *

======================= PredictionServiceClient ======================= - * - *

Service Description: A service for online predictions and explanations. - * - *

Sample for PredictionServiceClient: - * - *

{@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 (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- *   EndpointName endpoint =
- *       EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- *   List instances = new ArrayList<>();
- *   Value parameters = Value.newBuilder().setBoolValue(true).build();
- *   PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vertexai.api; - -import javax.annotation.Generated; diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStub.java deleted file mode 100644 index a582b1db7aa9..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStub.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.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.vertexai.api.CreateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.CreateEndpointRequest; -import com.google.cloud.vertexai.api.DeleteEndpointRequest; -import com.google.cloud.vertexai.api.DeleteOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelRequest; -import com.google.cloud.vertexai.api.DeployModelResponse; -import com.google.cloud.vertexai.api.Endpoint; -import com.google.cloud.vertexai.api.GetEndpointRequest; -import com.google.cloud.vertexai.api.ListEndpointsRequest; -import com.google.cloud.vertexai.api.ListEndpointsResponse; -import com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata; -import com.google.cloud.vertexai.api.MutateDeployedModelRequest; -import com.google.cloud.vertexai.api.MutateDeployedModelResponse; -import com.google.cloud.vertexai.api.UndeployModelOperationMetadata; -import com.google.cloud.vertexai.api.UndeployModelRequest; -import com.google.cloud.vertexai.api.UndeployModelResponse; -import com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest; -import com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.UpdateEndpointRequest; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 EndpointService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class EndpointServiceStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public OperationCallable - createEndpointOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createEndpointOperationCallable()"); - } - - public UnaryCallable createEndpointCallable() { - throw new UnsupportedOperationException("Not implemented: createEndpointCallable()"); - } - - public UnaryCallable getEndpointCallable() { - throw new UnsupportedOperationException("Not implemented: getEndpointCallable()"); - } - - public UnaryCallable - listEndpointsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listEndpointsPagedCallable()"); - } - - public UnaryCallable listEndpointsCallable() { - throw new UnsupportedOperationException("Not implemented: listEndpointsCallable()"); - } - - public UnaryCallable updateEndpointCallable() { - throw new UnsupportedOperationException("Not implemented: updateEndpointCallable()"); - } - - public OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: updateEndpointLongRunningOperationCallable()"); - } - - public UnaryCallable - updateEndpointLongRunningCallable() { - throw new UnsupportedOperationException("Not implemented: updateEndpointLongRunningCallable()"); - } - - public OperationCallable - deleteEndpointOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteEndpointOperationCallable()"); - } - - public UnaryCallable deleteEndpointCallable() { - throw new UnsupportedOperationException("Not implemented: deleteEndpointCallable()"); - } - - public OperationCallable - deployModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deployModelOperationCallable()"); - } - - public UnaryCallable deployModelCallable() { - throw new UnsupportedOperationException("Not implemented: deployModelCallable()"); - } - - public OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: undeployModelOperationCallable()"); - } - - public UnaryCallable undeployModelCallable() { - throw new UnsupportedOperationException("Not implemented: undeployModelCallable()"); - } - - public OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: mutateDeployedModelOperationCallable()"); - } - - public UnaryCallable mutateDeployedModelCallable() { - throw new UnsupportedOperationException("Not implemented: mutateDeployedModelCallable()"); - } - - 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()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java deleted file mode 100644 index 819c6ac9045f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java +++ /dev/null @@ -1,1113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListLocationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.core.ObsoleteApi; -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.vertexai.api.CreateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.CreateEndpointRequest; -import com.google.cloud.vertexai.api.DeleteEndpointRequest; -import com.google.cloud.vertexai.api.DeleteOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelRequest; -import com.google.cloud.vertexai.api.DeployModelResponse; -import com.google.cloud.vertexai.api.Endpoint; -import com.google.cloud.vertexai.api.GetEndpointRequest; -import com.google.cloud.vertexai.api.ListEndpointsRequest; -import com.google.cloud.vertexai.api.ListEndpointsResponse; -import com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata; -import com.google.cloud.vertexai.api.MutateDeployedModelRequest; -import com.google.cloud.vertexai.api.MutateDeployedModelResponse; -import com.google.cloud.vertexai.api.UndeployModelOperationMetadata; -import com.google.cloud.vertexai.api.UndeployModelRequest; -import com.google.cloud.vertexai.api.UndeployModelResponse; -import com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest; -import com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.UpdateEndpointRequest; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.time.Duration; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link EndpointServiceStub}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of getEndpoint: - * - *

{@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
- * EndpointServiceStubSettings.Builder endpointServiceSettingsBuilder =
- *     EndpointServiceStubSettings.newBuilder();
- * endpointServiceSettingsBuilder
- *     .getEndpointSettings()
- *     .setRetrySettings(
- *         endpointServiceSettingsBuilder
- *             .getEndpointSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * EndpointServiceStubSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - * - *

To configure the RetrySettings of a Long Running Operation method, create an - * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to - * configure the RetrySettings for createEndpoint: - * - *

{@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
- * EndpointServiceStubSettings.Builder endpointServiceSettingsBuilder =
- *     EndpointServiceStubSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- *     OperationalTimedPollAlgorithm.create(
- *         RetrySettings.newBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
- *             .setRetryDelayMultiplier(1.5)
- *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
- *             .setTotalTimeoutDuration(Duration.ofHours(24))
- *             .build());
- * endpointServiceSettingsBuilder
- *     .createClusterOperationSettings()
- *     .setPollingAlgorithm(timedRetryAlgorithm)
- *     .build();
- * }
- */ -@Generated("by gapic-generator-java") -public class EndpointServiceStubSettings 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 createEndpointSettings; - private final OperationCallSettings< - CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> - createEndpointOperationSettings; - private final UnaryCallSettings getEndpointSettings; - private final PagedCallSettings< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - listEndpointsSettings; - private final UnaryCallSettings updateEndpointSettings; - private final UnaryCallSettings - updateEndpointLongRunningSettings; - private final OperationCallSettings< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings; - private final UnaryCallSettings deleteEndpointSettings; - private final OperationCallSettings - deleteEndpointOperationSettings; - private final UnaryCallSettings deployModelSettings; - private final OperationCallSettings< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings; - private final UnaryCallSettings undeployModelSettings; - private final OperationCallSettings< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings; - private final UnaryCallSettings - mutateDeployedModelSettings; - private final OperationCallSettings< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings; - private final PagedCallSettings< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings getLocationSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - private static final PagedListDescriptor - LIST_ENDPOINTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListEndpointsRequest injectToken(ListEndpointsRequest payload, String token) { - return ListEndpointsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListEndpointsRequest injectPageSize(ListEndpointsRequest payload, int pageSize) { - return ListEndpointsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListEndpointsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListEndpointsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListEndpointsResponse payload) { - return payload.getEndpointsList(); - } - }; - - 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(); - } - }; - - private static final PagedListResponseFactory< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - LIST_ENDPOINTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListEndpointsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ENDPOINTS_PAGE_STR_DESC, request, context); - return ListEndpointsPagedResponse.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 createEndpoint. */ - public UnaryCallSettings createEndpointSettings() { - return createEndpointSettings; - } - - /** Returns the object with the settings used for calls to createEndpoint. */ - public OperationCallSettings - createEndpointOperationSettings() { - return createEndpointOperationSettings; - } - - /** Returns the object with the settings used for calls to getEndpoint. */ - public UnaryCallSettings getEndpointSettings() { - return getEndpointSettings; - } - - /** Returns the object with the settings used for calls to listEndpoints. */ - public PagedCallSettings - listEndpointsSettings() { - return listEndpointsSettings; - } - - /** Returns the object with the settings used for calls to updateEndpoint. */ - public UnaryCallSettings updateEndpointSettings() { - return updateEndpointSettings; - } - - /** Returns the object with the settings used for calls to updateEndpointLongRunning. */ - public UnaryCallSettings - updateEndpointLongRunningSettings() { - return updateEndpointLongRunningSettings; - } - - /** Returns the object with the settings used for calls to updateEndpointLongRunning. */ - public OperationCallSettings< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings() { - return updateEndpointLongRunningOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteEndpoint. */ - public UnaryCallSettings deleteEndpointSettings() { - return deleteEndpointSettings; - } - - /** Returns the object with the settings used for calls to deleteEndpoint. */ - public OperationCallSettings - deleteEndpointOperationSettings() { - return deleteEndpointOperationSettings; - } - - /** Returns the object with the settings used for calls to deployModel. */ - public UnaryCallSettings deployModelSettings() { - return deployModelSettings; - } - - /** Returns the object with the settings used for calls to deployModel. */ - public OperationCallSettings< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings() { - return deployModelOperationSettings; - } - - /** Returns the object with the settings used for calls to undeployModel. */ - public UnaryCallSettings undeployModelSettings() { - return undeployModelSettings; - } - - /** Returns the object with the settings used for calls to undeployModel. */ - public OperationCallSettings< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings() { - return undeployModelOperationSettings; - } - - /** Returns the object with the settings used for calls to mutateDeployedModel. */ - public UnaryCallSettings mutateDeployedModelSettings() { - return mutateDeployedModelSettings; - } - - /** Returns the object with the settings used for calls to mutateDeployedModel. */ - public OperationCallSettings< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings() { - return mutateDeployedModelOperationSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public EndpointServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcEndpointServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonEndpointServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns the default service name. */ - @Override - public String getServiceName() { - return "aiplatform"; - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - @ObsoleteApi("Use getEndpoint() instead") - public static String getDefaultEndpoint() { - return "aiplatform.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "aiplatform.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(); - } - - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(EndpointServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(EndpointServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return EndpointServiceStubSettings.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 EndpointServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createEndpointSettings = settingsBuilder.createEndpointSettings().build(); - createEndpointOperationSettings = settingsBuilder.createEndpointOperationSettings().build(); - getEndpointSettings = settingsBuilder.getEndpointSettings().build(); - listEndpointsSettings = settingsBuilder.listEndpointsSettings().build(); - updateEndpointSettings = settingsBuilder.updateEndpointSettings().build(); - updateEndpointLongRunningSettings = settingsBuilder.updateEndpointLongRunningSettings().build(); - updateEndpointLongRunningOperationSettings = - settingsBuilder.updateEndpointLongRunningOperationSettings().build(); - deleteEndpointSettings = settingsBuilder.deleteEndpointSettings().build(); - deleteEndpointOperationSettings = settingsBuilder.deleteEndpointOperationSettings().build(); - deployModelSettings = settingsBuilder.deployModelSettings().build(); - deployModelOperationSettings = settingsBuilder.deployModelOperationSettings().build(); - undeployModelSettings = settingsBuilder.undeployModelSettings().build(); - undeployModelOperationSettings = settingsBuilder.undeployModelOperationSettings().build(); - mutateDeployedModelSettings = settingsBuilder.mutateDeployedModelSettings().build(); - mutateDeployedModelOperationSettings = - settingsBuilder.mutateDeployedModelOperationSettings().build(); - listLocationsSettings = settingsBuilder.listLocationsSettings().build(); - getLocationSettings = settingsBuilder.getLocationSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for EndpointServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createEndpointSettings; - private final OperationCallSettings.Builder< - CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> - createEndpointOperationSettings; - private final UnaryCallSettings.Builder getEndpointSettings; - private final PagedCallSettings.Builder< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - listEndpointsSettings; - private final UnaryCallSettings.Builder updateEndpointSettings; - private final UnaryCallSettings.Builder - updateEndpointLongRunningSettings; - private final OperationCallSettings.Builder< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings; - private final UnaryCallSettings.Builder - deleteEndpointSettings; - private final OperationCallSettings.Builder< - DeleteEndpointRequest, Empty, DeleteOperationMetadata> - deleteEndpointOperationSettings; - private final UnaryCallSettings.Builder deployModelSettings; - private final OperationCallSettings.Builder< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings; - private final UnaryCallSettings.Builder undeployModelSettings; - private final OperationCallSettings.Builder< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings; - private final UnaryCallSettings.Builder - mutateDeployedModelSettings; - private final OperationCallSettings.Builder< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings; - private final PagedCallSettings.Builder< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings.Builder getLocationSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - 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); - - createEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createEndpointOperationSettings = OperationCallSettings.newBuilder(); - getEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listEndpointsSettings = PagedCallSettings.newBuilder(LIST_ENDPOINTS_PAGE_STR_FACT); - updateEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateEndpointLongRunningSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateEndpointLongRunningOperationSettings = OperationCallSettings.newBuilder(); - deleteEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteEndpointOperationSettings = OperationCallSettings.newBuilder(); - deployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deployModelOperationSettings = OperationCallSettings.newBuilder(); - undeployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - undeployModelOperationSettings = OperationCallSettings.newBuilder(); - mutateDeployedModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - mutateDeployedModelOperationSettings = OperationCallSettings.newBuilder(); - listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); - getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createEndpointSettings, - getEndpointSettings, - listEndpointsSettings, - updateEndpointSettings, - updateEndpointLongRunningSettings, - deleteEndpointSettings, - deployModelSettings, - undeployModelSettings, - mutateDeployedModelSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(EndpointServiceStubSettings settings) { - super(settings); - - createEndpointSettings = settings.createEndpointSettings.toBuilder(); - createEndpointOperationSettings = settings.createEndpointOperationSettings.toBuilder(); - getEndpointSettings = settings.getEndpointSettings.toBuilder(); - listEndpointsSettings = settings.listEndpointsSettings.toBuilder(); - updateEndpointSettings = settings.updateEndpointSettings.toBuilder(); - updateEndpointLongRunningSettings = settings.updateEndpointLongRunningSettings.toBuilder(); - updateEndpointLongRunningOperationSettings = - settings.updateEndpointLongRunningOperationSettings.toBuilder(); - deleteEndpointSettings = settings.deleteEndpointSettings.toBuilder(); - deleteEndpointOperationSettings = settings.deleteEndpointOperationSettings.toBuilder(); - deployModelSettings = settings.deployModelSettings.toBuilder(); - deployModelOperationSettings = settings.deployModelOperationSettings.toBuilder(); - undeployModelSettings = settings.undeployModelSettings.toBuilder(); - undeployModelOperationSettings = settings.undeployModelOperationSettings.toBuilder(); - mutateDeployedModelSettings = settings.mutateDeployedModelSettings.toBuilder(); - mutateDeployedModelOperationSettings = - settings.mutateDeployedModelOperationSettings.toBuilder(); - listLocationsSettings = settings.listLocationsSettings.toBuilder(); - getLocationSettings = settings.getLocationSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createEndpointSettings, - getEndpointSettings, - listEndpointsSettings, - updateEndpointSettings, - updateEndpointLongRunningSettings, - deleteEndpointSettings, - deployModelSettings, - undeployModelSettings, - mutateDeployedModelSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .listEndpointsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateEndpointLongRunningSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteEndpointSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .undeployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .mutateDeployedModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createEndpointOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Endpoint.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - CreateEndpointOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(Duration.ofMillis(300000L)) - .build())); - - builder - .updateEndpointLongRunningOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Endpoint.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - UpdateEndpointOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(Duration.ofMillis(300000L)) - .build())); - - builder - .deleteEndpointOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(Duration.ofMillis(300000L)) - .build())); - - builder - .deployModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(DeployModelResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - DeployModelOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(Duration.ofMillis(300000L)) - .build())); - - builder - .undeployModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(UndeployModelResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - UndeployModelOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(Duration.ofMillis(300000L)) - .build())); - - builder - .mutateDeployedModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - MutateDeployedModelResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - MutateDeployedModelOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) - .setInitialRpcTimeoutDuration(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeoutDuration(Duration.ZERO) - .setTotalTimeoutDuration(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 createEndpoint. */ - public UnaryCallSettings.Builder createEndpointSettings() { - return createEndpointSettings; - } - - /** Returns the builder for the settings used for calls to createEndpoint. */ - public OperationCallSettings.Builder< - CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> - createEndpointOperationSettings() { - return createEndpointOperationSettings; - } - - /** Returns the builder for the settings used for calls to getEndpoint. */ - public UnaryCallSettings.Builder getEndpointSettings() { - return getEndpointSettings; - } - - /** Returns the builder for the settings used for calls to listEndpoints. */ - public PagedCallSettings.Builder< - ListEndpointsRequest, ListEndpointsResponse, ListEndpointsPagedResponse> - listEndpointsSettings() { - return listEndpointsSettings; - } - - /** Returns the builder for the settings used for calls to updateEndpoint. */ - public UnaryCallSettings.Builder updateEndpointSettings() { - return updateEndpointSettings; - } - - /** Returns the builder for the settings used for calls to updateEndpointLongRunning. */ - public UnaryCallSettings.Builder - updateEndpointLongRunningSettings() { - return updateEndpointLongRunningSettings; - } - - /** Returns the builder for the settings used for calls to updateEndpointLongRunning. */ - public OperationCallSettings.Builder< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationSettings() { - return updateEndpointLongRunningOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteEndpoint. */ - public UnaryCallSettings.Builder deleteEndpointSettings() { - return deleteEndpointSettings; - } - - /** Returns the builder for the settings used for calls to deleteEndpoint. */ - public OperationCallSettings.Builder - deleteEndpointOperationSettings() { - return deleteEndpointOperationSettings; - } - - /** Returns the builder for the settings used for calls to deployModel. */ - public UnaryCallSettings.Builder deployModelSettings() { - return deployModelSettings; - } - - /** Returns the builder for the settings used for calls to deployModel. */ - public OperationCallSettings.Builder< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationSettings() { - return deployModelOperationSettings; - } - - /** Returns the builder for the settings used for calls to undeployModel. */ - public UnaryCallSettings.Builder undeployModelSettings() { - return undeployModelSettings; - } - - /** Returns the builder for the settings used for calls to undeployModel. */ - public OperationCallSettings.Builder< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationSettings() { - return undeployModelOperationSettings; - } - - /** Returns the builder for the settings used for calls to mutateDeployedModel. */ - public UnaryCallSettings.Builder - mutateDeployedModelSettings() { - return mutateDeployedModelSettings; - } - - /** Returns the builder for the settings used for calls to mutateDeployedModel. */ - public OperationCallSettings.Builder< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationSettings() { - return mutateDeployedModelOperationSettings; - } - - /** 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; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public EndpointServiceStubSettings build() throws IOException { - return new EndpointServiceStubSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceCallableFactory.java deleted file mode 100644 index 7507b3888269..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.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 EndpointService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcEndpointServiceCallableFactory 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceStub.java deleted file mode 100644 index d2c612975318..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcEndpointServiceStub.java +++ /dev/null @@ -1,709 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.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.vertexai.api.CreateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.CreateEndpointRequest; -import com.google.cloud.vertexai.api.DeleteEndpointRequest; -import com.google.cloud.vertexai.api.DeleteOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelRequest; -import com.google.cloud.vertexai.api.DeployModelResponse; -import com.google.cloud.vertexai.api.Endpoint; -import com.google.cloud.vertexai.api.GetEndpointRequest; -import com.google.cloud.vertexai.api.ListEndpointsRequest; -import com.google.cloud.vertexai.api.ListEndpointsResponse; -import com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata; -import com.google.cloud.vertexai.api.MutateDeployedModelRequest; -import com.google.cloud.vertexai.api.MutateDeployedModelResponse; -import com.google.cloud.vertexai.api.UndeployModelOperationMetadata; -import com.google.cloud.vertexai.api.UndeployModelRequest; -import com.google.cloud.vertexai.api.UndeployModelResponse; -import com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest; -import com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.UpdateEndpointRequest; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 EndpointService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcEndpointServiceStub extends EndpointServiceStub { - private static final MethodDescriptor - createEndpointMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/CreateEndpoint") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateEndpointRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor getEndpointMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/GetEndpoint") - .setRequestMarshaller(ProtoUtils.marshaller(GetEndpointRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - listEndpointsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/ListEndpoints") - .setRequestMarshaller( - ProtoUtils.marshaller(ListEndpointsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListEndpointsResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - updateEndpointMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UpdateEndpoint") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateEndpointRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Endpoint.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - updateEndpointLongRunningMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vertexai.v1.EndpointService/UpdateEndpointLongRunning") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateEndpointLongRunningRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - deleteEndpointMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeleteEndpoint") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteEndpointRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor deployModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeployModel") - .setRequestMarshaller(ProtoUtils.marshaller(DeployModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - undeployModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UndeployModel") - .setRequestMarshaller( - ProtoUtils.marshaller(UndeployModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - mutateDeployedModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/MutateDeployedModel") - .setRequestMarshaller( - ProtoUtils.marshaller(MutateDeployedModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private final UnaryCallable createEndpointCallable; - private final OperationCallable - createEndpointOperationCallable; - private final UnaryCallable getEndpointCallable; - private final UnaryCallable listEndpointsCallable; - private final UnaryCallable - listEndpointsPagedCallable; - private final UnaryCallable updateEndpointCallable; - private final UnaryCallable - updateEndpointLongRunningCallable; - private final OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable; - private final UnaryCallable deleteEndpointCallable; - private final OperationCallable - deleteEndpointOperationCallable; - private final UnaryCallable deployModelCallable; - private final OperationCallable< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationCallable; - private final UnaryCallable undeployModelCallable; - private final OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable; - private final UnaryCallable mutateDeployedModelCallable; - private final OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcEndpointServiceStub create(EndpointServiceStubSettings settings) - throws IOException { - return new GrpcEndpointServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcEndpointServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcEndpointServiceStub( - EndpointServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcEndpointServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcEndpointServiceStub( - EndpointServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcEndpointServiceStub, 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 GrpcEndpointServiceStub( - EndpointServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcEndpointServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcEndpointServiceStub, 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 GrpcEndpointServiceStub( - EndpointServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createEndpointTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createEndpointMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings getEndpointTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getEndpointMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings listEndpointsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listEndpointsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings updateEndpointTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateEndpointMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint.name", String.valueOf(request.getEndpoint().getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings - updateEndpointLongRunningTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateEndpointLongRunningMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint.name", String.valueOf(request.getEndpoint().getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings deleteEndpointTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteEndpointMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings deployModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deployModelMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings undeployModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(undeployModelMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings mutateDeployedModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(mutateDeployedModelMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - 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(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.createEndpointCallable = - callableFactory.createUnaryCallable( - createEndpointTransportSettings, settings.createEndpointSettings(), clientContext); - this.createEndpointOperationCallable = - callableFactory.createOperationCallable( - createEndpointTransportSettings, - settings.createEndpointOperationSettings(), - clientContext, - operationsStub); - this.getEndpointCallable = - callableFactory.createUnaryCallable( - getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); - this.listEndpointsCallable = - callableFactory.createUnaryCallable( - listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); - this.listEndpointsPagedCallable = - callableFactory.createPagedCallable( - listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); - this.updateEndpointCallable = - callableFactory.createUnaryCallable( - updateEndpointTransportSettings, settings.updateEndpointSettings(), clientContext); - this.updateEndpointLongRunningCallable = - callableFactory.createUnaryCallable( - updateEndpointLongRunningTransportSettings, - settings.updateEndpointLongRunningSettings(), - clientContext); - this.updateEndpointLongRunningOperationCallable = - callableFactory.createOperationCallable( - updateEndpointLongRunningTransportSettings, - settings.updateEndpointLongRunningOperationSettings(), - clientContext, - operationsStub); - this.deleteEndpointCallable = - callableFactory.createUnaryCallable( - deleteEndpointTransportSettings, settings.deleteEndpointSettings(), clientContext); - this.deleteEndpointOperationCallable = - callableFactory.createOperationCallable( - deleteEndpointTransportSettings, - settings.deleteEndpointOperationSettings(), - clientContext, - operationsStub); - this.deployModelCallable = - callableFactory.createUnaryCallable( - deployModelTransportSettings, settings.deployModelSettings(), clientContext); - this.deployModelOperationCallable = - callableFactory.createOperationCallable( - deployModelTransportSettings, - settings.deployModelOperationSettings(), - clientContext, - operationsStub); - this.undeployModelCallable = - callableFactory.createUnaryCallable( - undeployModelTransportSettings, settings.undeployModelSettings(), clientContext); - this.undeployModelOperationCallable = - callableFactory.createOperationCallable( - undeployModelTransportSettings, - settings.undeployModelOperationSettings(), - clientContext, - operationsStub); - this.mutateDeployedModelCallable = - callableFactory.createUnaryCallable( - mutateDeployedModelTransportSettings, - settings.mutateDeployedModelSettings(), - clientContext); - this.mutateDeployedModelOperationCallable = - callableFactory.createOperationCallable( - mutateDeployedModelTransportSettings, - settings.mutateDeployedModelOperationSettings(), - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createEndpointCallable() { - return createEndpointCallable; - } - - @Override - public OperationCallable - createEndpointOperationCallable() { - return createEndpointOperationCallable; - } - - @Override - public UnaryCallable getEndpointCallable() { - return getEndpointCallable; - } - - @Override - public UnaryCallable listEndpointsCallable() { - return listEndpointsCallable; - } - - @Override - public UnaryCallable - listEndpointsPagedCallable() { - return listEndpointsPagedCallable; - } - - @Override - public UnaryCallable updateEndpointCallable() { - return updateEndpointCallable; - } - - @Override - public UnaryCallable - updateEndpointLongRunningCallable() { - return updateEndpointLongRunningCallable; - } - - @Override - public OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable() { - return updateEndpointLongRunningOperationCallable; - } - - @Override - public UnaryCallable deleteEndpointCallable() { - return deleteEndpointCallable; - } - - @Override - public OperationCallable - deleteEndpointOperationCallable() { - return deleteEndpointOperationCallable; - } - - @Override - public UnaryCallable deployModelCallable() { - return deployModelCallable; - } - - @Override - public OperationCallable - deployModelOperationCallable() { - return deployModelOperationCallable; - } - - @Override - public UnaryCallable undeployModelCallable() { - return undeployModelCallable; - } - - @Override - public OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable() { - return undeployModelOperationCallable; - } - - @Override - public UnaryCallable mutateDeployedModelCallable() { - return mutateDeployedModelCallable; - } - - @Override - public OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable() { - return mutateDeployedModelOperationCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceCallableFactory.java deleted file mode 100644 index 04da2394adbb..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.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 LlmUtilityService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcLlmUtilityServiceCallableFactory 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceStub.java deleted file mode 100644 index 63748bd96d80..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcLlmUtilityServiceStub.java +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.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.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.vertexai.api.ComputeTokensRequest; -import com.google.cloud.vertexai.api.ComputeTokensResponse; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 LlmUtilityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcLlmUtilityServiceStub extends LlmUtilityServiceStub { - private static final MethodDescriptor - countTokensMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/CountTokens") - .setRequestMarshaller(ProtoUtils.marshaller(CountTokensRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(CountTokensResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - computeTokensMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/ComputeTokens") - .setRequestMarshaller( - ProtoUtils.marshaller(ComputeTokensRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ComputeTokensResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private final UnaryCallable countTokensCallable; - private final UnaryCallable computeTokensCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcLlmUtilityServiceStub create(LlmUtilityServiceStubSettings settings) - throws IOException { - return new GrpcLlmUtilityServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcLlmUtilityServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcLlmUtilityServiceStub( - LlmUtilityServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcLlmUtilityServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcLlmUtilityServiceStub( - LlmUtilityServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( - LlmUtilityServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcLlmUtilityServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcLlmUtilityServiceStub, 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 GrpcLlmUtilityServiceStub( - LlmUtilityServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings countTokensTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(countTokensMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings computeTokensTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(computeTokensMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - 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(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.countTokensCallable = - callableFactory.createUnaryCallable( - countTokensTransportSettings, settings.countTokensSettings(), clientContext); - this.computeTokensCallable = - callableFactory.createUnaryCallable( - computeTokensTransportSettings, settings.computeTokensSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable countTokensCallable() { - return countTokensCallable; - } - - @Override - public UnaryCallable computeTokensCallable() { - return computeTokensCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceCallableFactory.java deleted file mode 100644 index feb9de0ed9d3..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.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 PredictionService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcPredictionServiceCallableFactory 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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java deleted file mode 100644 index 705b818cdd55..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java +++ /dev/null @@ -1,767 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsBuilder; -import com.google.api.gax.rpc.ServerStreamingCallable; -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.vertexai.api.DirectPredictRequest; -import com.google.cloud.vertexai.api.DirectPredictResponse; -import com.google.cloud.vertexai.api.DirectRawPredictRequest; -import com.google.cloud.vertexai.api.DirectRawPredictResponse; -import com.google.cloud.vertexai.api.EmbedContentRequest; -import com.google.cloud.vertexai.api.EmbedContentResponse; -import com.google.cloud.vertexai.api.ExplainRequest; -import com.google.cloud.vertexai.api.ExplainResponse; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.PredictRequest; -import com.google.cloud.vertexai.api.PredictResponse; -import com.google.cloud.vertexai.api.RawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictResponse; -import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; -import com.google.cloud.vertexai.api.StreamRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictResponse; -import com.google.cloud.vertexai.api.StreamingRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingRawPredictResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 PredictionService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcPredictionServiceStub extends PredictionServiceStub { - private static final MethodDescriptor predictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/Predict") - .setRequestMarshaller(ProtoUtils.marshaller(PredictRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(PredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor rawPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/RawPredict") - .setRequestMarshaller(ProtoUtils.marshaller(RawPredictRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - streamRawPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamRawPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamRawPredictRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - directPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/DirectPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(DirectPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(DirectPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - directRawPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/DirectRawPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(DirectRawPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(DirectRawPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - streamDirectPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamDirectPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamDirectPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(StreamDirectPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor< - StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> - streamDirectRawPredictMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - "google.cloud.aiplatform.v1.PredictionService/StreamDirectRawPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamDirectRawPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(StreamDirectRawPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - streamingPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamingPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamingPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(StreamingPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - serverStreamingPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName( - "google.cloud.aiplatform.v1.PredictionService/ServerStreamingPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamingPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(StreamingPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - streamingRawPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamingRawPredict") - .setRequestMarshaller( - ProtoUtils.marshaller(StreamingRawPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(StreamingRawPredictResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor explainMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/Explain") - .setRequestMarshaller(ProtoUtils.marshaller(ExplainRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ExplainResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - generateContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/GenerateContent") - .setRequestMarshaller( - ProtoUtils.marshaller(GenerateContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GenerateContentResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - streamGenerateContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName( - "google.cloud.aiplatform.v1.PredictionService/StreamGenerateContent") - .setRequestMarshaller( - ProtoUtils.marshaller(GenerateContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GenerateContentResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - embedContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/EmbedContent") - .setRequestMarshaller(ProtoUtils.marshaller(EmbedContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(EmbedContentResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .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())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor setIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor getIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private static final MethodDescriptor - testIamPermissionsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setRequestMarshaller( - ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - - private final UnaryCallable predictCallable; - private final UnaryCallable rawPredictCallable; - private final ServerStreamingCallable streamRawPredictCallable; - private final UnaryCallable directPredictCallable; - private final UnaryCallable - directRawPredictCallable; - private final BidiStreamingCallable - streamDirectPredictCallable; - private final BidiStreamingCallable - streamDirectRawPredictCallable; - private final BidiStreamingCallable - streamingPredictCallable; - private final ServerStreamingCallable - serverStreamingPredictCallable; - private final BidiStreamingCallable - streamingRawPredictCallable; - private final UnaryCallable explainCallable; - private final UnaryCallable - generateContentCallable; - private final ServerStreamingCallable - streamGenerateContentCallable; - private final UnaryCallable embedContentCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcPredictionServiceStub create(PredictionServiceStubSettings settings) - throws IOException { - return new GrpcPredictionServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcPredictionServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcPredictionServiceStub( - PredictionServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcPredictionServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcPredictionServiceStub( - PredictionServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcPredictionServiceStub, 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 GrpcPredictionServiceStub( - PredictionServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcPredictionServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcPredictionServiceStub, 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 GrpcPredictionServiceStub( - PredictionServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings predictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(predictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings rawPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(rawPredictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings streamRawPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(streamRawPredictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings directPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(directPredictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings - directRawPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(directRawPredictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings - streamDirectPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(streamDirectPredictMethodDescriptor) - .build(); - GrpcCallSettings - streamDirectRawPredictTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(streamDirectRawPredictMethodDescriptor) - .build(); - GrpcCallSettings - streamingPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(streamingPredictMethodDescriptor) - .build(); - GrpcCallSettings - serverStreamingPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(serverStreamingPredictMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings - streamingRawPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(streamingRawPredictMethodDescriptor) - .build(); - GrpcCallSettings explainTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(explainMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - GrpcCallSettings - generateContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(generateContentMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - return builder.build(); - }) - .build(); - GrpcCallSettings - streamGenerateContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(streamGenerateContentMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - return builder.build(); - }) - .build(); - GrpcCallSettings embedContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(embedContentMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - 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(); - GrpcCallSettings setIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings getIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - GrpcCallSettings - testIamPermissionsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.predictCallable = - callableFactory.createUnaryCallable( - predictTransportSettings, settings.predictSettings(), clientContext); - this.rawPredictCallable = - callableFactory.createUnaryCallable( - rawPredictTransportSettings, settings.rawPredictSettings(), clientContext); - this.streamRawPredictCallable = - callableFactory.createServerStreamingCallable( - streamRawPredictTransportSettings, settings.streamRawPredictSettings(), clientContext); - this.directPredictCallable = - callableFactory.createUnaryCallable( - directPredictTransportSettings, settings.directPredictSettings(), clientContext); - this.directRawPredictCallable = - callableFactory.createUnaryCallable( - directRawPredictTransportSettings, settings.directRawPredictSettings(), clientContext); - this.streamDirectPredictCallable = - callableFactory.createBidiStreamingCallable( - streamDirectPredictTransportSettings, - settings.streamDirectPredictSettings(), - clientContext); - this.streamDirectRawPredictCallable = - callableFactory.createBidiStreamingCallable( - streamDirectRawPredictTransportSettings, - settings.streamDirectRawPredictSettings(), - clientContext); - this.streamingPredictCallable = - callableFactory.createBidiStreamingCallable( - streamingPredictTransportSettings, settings.streamingPredictSettings(), clientContext); - this.serverStreamingPredictCallable = - callableFactory.createServerStreamingCallable( - serverStreamingPredictTransportSettings, - settings.serverStreamingPredictSettings(), - clientContext); - this.streamingRawPredictCallable = - callableFactory.createBidiStreamingCallable( - streamingRawPredictTransportSettings, - settings.streamingRawPredictSettings(), - clientContext); - this.explainCallable = - callableFactory.createUnaryCallable( - explainTransportSettings, settings.explainSettings(), clientContext); - this.generateContentCallable = - callableFactory.createUnaryCallable( - generateContentTransportSettings, settings.generateContentSettings(), clientContext); - this.streamGenerateContentCallable = - callableFactory.createServerStreamingCallable( - streamGenerateContentTransportSettings, - settings.streamGenerateContentSettings(), - clientContext); - this.embedContentCallable = - callableFactory.createUnaryCallable( - embedContentTransportSettings, settings.embedContentSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable predictCallable() { - return predictCallable; - } - - @Override - public UnaryCallable rawPredictCallable() { - return rawPredictCallable; - } - - @Override - public ServerStreamingCallable streamRawPredictCallable() { - return streamRawPredictCallable; - } - - @Override - public UnaryCallable directPredictCallable() { - return directPredictCallable; - } - - @Override - public UnaryCallable - directRawPredictCallable() { - return directRawPredictCallable; - } - - @Override - public BidiStreamingCallable - streamDirectPredictCallable() { - return streamDirectPredictCallable; - } - - @Override - public BidiStreamingCallable - streamDirectRawPredictCallable() { - return streamDirectRawPredictCallable; - } - - @Override - public BidiStreamingCallable - streamingPredictCallable() { - return streamingPredictCallable; - } - - @Override - public ServerStreamingCallable - serverStreamingPredictCallable() { - return serverStreamingPredictCallable; - } - - @Override - public BidiStreamingCallable - streamingRawPredictCallable() { - return streamingRawPredictCallable; - } - - @Override - public UnaryCallable explainCallable() { - return explainCallable; - } - - @Override - public UnaryCallable generateContentCallable() { - return generateContentCallable; - } - - @Override - public ServerStreamingCallable - streamGenerateContentCallable() { - return streamGenerateContentCallable; - } - - @Override - public UnaryCallable embedContentCallable() { - return embedContentCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java deleted file mode 100644 index d36ea564853d..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -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 EndpointService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class HttpJsonEndpointServiceCallableFactory - 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); - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java deleted file mode 100644 index f34a6eb11070..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java +++ /dev/null @@ -1,3559 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListLocationsPagedResponse; - -import com.google.api.HttpRule; -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.vertexai.api.CreateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.CreateEndpointRequest; -import com.google.cloud.vertexai.api.DeleteEndpointRequest; -import com.google.cloud.vertexai.api.DeleteOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelOperationMetadata; -import com.google.cloud.vertexai.api.DeployModelRequest; -import com.google.cloud.vertexai.api.DeployModelResponse; -import com.google.cloud.vertexai.api.Endpoint; -import com.google.cloud.vertexai.api.GetEndpointRequest; -import com.google.cloud.vertexai.api.ListEndpointsRequest; -import com.google.cloud.vertexai.api.ListEndpointsResponse; -import com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata; -import com.google.cloud.vertexai.api.MutateDeployedModelRequest; -import com.google.cloud.vertexai.api.MutateDeployedModelResponse; -import com.google.cloud.vertexai.api.UndeployModelOperationMetadata; -import com.google.cloud.vertexai.api.UndeployModelRequest; -import com.google.cloud.vertexai.api.UndeployModelResponse; -import com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest; -import com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata; -import com.google.cloud.vertexai.api.UpdateEndpointRequest; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 EndpointService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class HttpJsonEndpointServiceStub extends EndpointServiceStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Endpoint.getDescriptor()) - .add(DeployModelOperationMetadata.getDescriptor()) - .add(Empty.getDescriptor()) - .add(DeployModelResponse.getDescriptor()) - .add(UpdateEndpointOperationMetadata.getDescriptor()) - .add(MutateDeployedModelOperationMetadata.getDescriptor()) - .add(DeleteOperationMetadata.getDescriptor()) - .add(CreateEndpointOperationMetadata.getDescriptor()) - .add(UndeployModelOperationMetadata.getDescriptor()) - .add(UndeployModelResponse.getDescriptor()) - .add(MutateDeployedModelResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - createEndpointMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/CreateEndpoint") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/endpoints", - 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, "endpointId", request.getEndpointId()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("endpoint", request.getEndpoint(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateEndpointRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - getEndpointMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/GetEndpoint") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/endpoints/*}", - 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(Endpoint.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listEndpointsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/ListEndpoints") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/endpoints", - 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, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "readMask", request.getReadMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListEndpointsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateEndpointMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UpdateEndpoint") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint.name=projects/*/locations/*/endpoints/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "endpoint.name", request.getEndpoint().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("endpoint", request.getEndpoint(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Endpoint.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateEndpointLongRunningMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vertexai.v1.EndpointService/UpdateEndpointLongRunning") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "endpoint.name", request.getEndpoint().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().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateEndpointLongRunningRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteEndpointMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeleteEndpoint") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/endpoints/*}", - 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(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteEndpointRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deployModelMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/DeployModel") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeployModelRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - undeployModelMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/UndeployModel") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UndeployModelRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - mutateDeployedModelMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.EndpointService/MutateDeployedModel") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (MutateDeployedModelRequest 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( - "/ui/{name=projects/*}/locations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*}/locations") - .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( - "/ui/{name=projects/*/locations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*/locations/*}") - .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 static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:setIamPolicy") - .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().clearResource().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:getIamPolicy") - .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(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:testIamPermissions") - .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(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable createEndpointCallable; - private final OperationCallable - createEndpointOperationCallable; - private final UnaryCallable getEndpointCallable; - private final UnaryCallable listEndpointsCallable; - private final UnaryCallable - listEndpointsPagedCallable; - private final UnaryCallable updateEndpointCallable; - private final UnaryCallable - updateEndpointLongRunningCallable; - private final OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable; - private final UnaryCallable deleteEndpointCallable; - private final OperationCallable - deleteEndpointOperationCallable; - private final UnaryCallable deployModelCallable; - private final OperationCallable< - DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> - deployModelOperationCallable; - private final UnaryCallable undeployModelCallable; - private final OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable; - private final UnaryCallable mutateDeployedModelCallable; - private final OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonEndpointServiceStub create(EndpointServiceStubSettings settings) - throws IOException { - return new HttpJsonEndpointServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonEndpointServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonEndpointServiceStub( - EndpointServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonEndpointServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonEndpointServiceStub( - EndpointServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonEndpointServiceStub, 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 HttpJsonEndpointServiceStub( - EndpointServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonEndpointServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonEndpointServiceStub, 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 HttpJsonEndpointServiceStub( - EndpointServiceStubSettings 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("/ui/{name=projects/*/locations/*/operations/*}:cancel") - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/agents/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/apps/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/ragEngineConfig/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/models/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragEngineConfig/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel") - .build()) - .build()) - .put( - "google.longrunning.Operations.DeleteOperation", - HttpRule.newBuilder() - .setDelete("/ui/{name=projects/*/locations/*/operations/*}") - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/agents/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete("/ui/{name=projects/*/locations/*/apps/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/datasets/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/endpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/extensionControllers/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/extensions/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featurestores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/customJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/indexes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/models/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/studies/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/schedules/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/ragEngineConfig/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featureGroups/*/featureMonitors/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/datasets/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/endpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featurestores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/customJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/indexes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/models/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/ragEngineConfig/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/studies/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/schedules/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setDelete( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}") - .build()) - .build()) - .put( - "google.longrunning.Operations.GetOperation", - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/operations/*}") - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/agents/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/apps/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/datasets/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/endpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/extensions/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/customJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/indexes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/models/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/studies/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/ragEngineConfig/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/schedules/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/featureMonitors/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/datasets/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/endpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/customJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/indexes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/models/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/ragEngineConfig/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/studies/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/schedules/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}") - .build()) - .build()) - .put( - "google.longrunning.Operations.ListOperations", - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*}/operations") - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/agents/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/apps/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/datasets/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/edgeDevices/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/endpoints/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/extensionControllers/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/extensions/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/customJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/tuningJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/indexes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/modelMonitors/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/migratableResources/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/models/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookExecutionJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookRuntimes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/studies/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/persistentResources/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/ragEngineConfig}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/ui/{name=projects/*/locations/*/schedules/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/specialistPools/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/ui/{name=projects/*/locations/*/featureGroups/*/featureMonitors/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/datasets/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/endpoints/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/customJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/tuningJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/indexes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/migratableResources/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/models/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/models/*/evaluations/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookExecutionJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookRuntimes/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/reasoningEngines/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/studies/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/persistentResources/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/ragEngineConfig}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/ragCorpora/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet("/v1/{name=projects/*/locations/*/schedules/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/specialistPools/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setGet( - "/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait") - .build()) - .build()) - .put( - "google.longrunning.Operations.WaitOperation", - HttpRule.newBuilder() - .setPost("/ui/{name=projects/*/locations/*/operations/*}:wait") - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/agents/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/apps/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/models/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/ragEngineConfig/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/ui/{name=projects/*/locations/*/featureGroups/*/featureMonitors/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost("/v1/{name=projects/*/locations/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/indexes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/models/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragEngineConfig/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait") - .build()) - .addAdditionalBindings( - HttpRule.newBuilder() - .setPost( - "/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait") - .build()) - .build()) - .build()); - - HttpJsonCallSettings createEndpointTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createEndpointMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings getEndpointTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getEndpointMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - listEndpointsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listEndpointsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings updateEndpointTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateEndpointMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint.name", String.valueOf(request.getEndpoint().getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - updateEndpointLongRunningTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateEndpointLongRunningMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint.name", String.valueOf(request.getEndpoint().getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings deleteEndpointTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteEndpointMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings deployModelTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deployModelMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings undeployModelTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(undeployModelMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - mutateDeployedModelTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(mutateDeployedModelMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - 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(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.createEndpointCallable = - callableFactory.createUnaryCallable( - createEndpointTransportSettings, settings.createEndpointSettings(), clientContext); - this.createEndpointOperationCallable = - callableFactory.createOperationCallable( - createEndpointTransportSettings, - settings.createEndpointOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.getEndpointCallable = - callableFactory.createUnaryCallable( - getEndpointTransportSettings, settings.getEndpointSettings(), clientContext); - this.listEndpointsCallable = - callableFactory.createUnaryCallable( - listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); - this.listEndpointsPagedCallable = - callableFactory.createPagedCallable( - listEndpointsTransportSettings, settings.listEndpointsSettings(), clientContext); - this.updateEndpointCallable = - callableFactory.createUnaryCallable( - updateEndpointTransportSettings, settings.updateEndpointSettings(), clientContext); - this.updateEndpointLongRunningCallable = - callableFactory.createUnaryCallable( - updateEndpointLongRunningTransportSettings, - settings.updateEndpointLongRunningSettings(), - clientContext); - this.updateEndpointLongRunningOperationCallable = - callableFactory.createOperationCallable( - updateEndpointLongRunningTransportSettings, - settings.updateEndpointLongRunningOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteEndpointCallable = - callableFactory.createUnaryCallable( - deleteEndpointTransportSettings, settings.deleteEndpointSettings(), clientContext); - this.deleteEndpointOperationCallable = - callableFactory.createOperationCallable( - deleteEndpointTransportSettings, - settings.deleteEndpointOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deployModelCallable = - callableFactory.createUnaryCallable( - deployModelTransportSettings, settings.deployModelSettings(), clientContext); - this.deployModelOperationCallable = - callableFactory.createOperationCallable( - deployModelTransportSettings, - settings.deployModelOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.undeployModelCallable = - callableFactory.createUnaryCallable( - undeployModelTransportSettings, settings.undeployModelSettings(), clientContext); - this.undeployModelOperationCallable = - callableFactory.createOperationCallable( - undeployModelTransportSettings, - settings.undeployModelOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.mutateDeployedModelCallable = - callableFactory.createUnaryCallable( - mutateDeployedModelTransportSettings, - settings.mutateDeployedModelSettings(), - clientContext); - this.mutateDeployedModelOperationCallable = - callableFactory.createOperationCallable( - mutateDeployedModelTransportSettings, - settings.mutateDeployedModelOperationSettings(), - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createEndpointMethodDescriptor); - methodDescriptors.add(getEndpointMethodDescriptor); - methodDescriptors.add(listEndpointsMethodDescriptor); - methodDescriptors.add(updateEndpointMethodDescriptor); - methodDescriptors.add(updateEndpointLongRunningMethodDescriptor); - methodDescriptors.add(deleteEndpointMethodDescriptor); - methodDescriptors.add(deployModelMethodDescriptor); - methodDescriptors.add(undeployModelMethodDescriptor); - methodDescriptors.add(mutateDeployedModelMethodDescriptor); - methodDescriptors.add(listLocationsMethodDescriptor); - methodDescriptors.add(getLocationMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable createEndpointCallable() { - return createEndpointCallable; - } - - @Override - public OperationCallable - createEndpointOperationCallable() { - return createEndpointOperationCallable; - } - - @Override - public UnaryCallable getEndpointCallable() { - return getEndpointCallable; - } - - @Override - public UnaryCallable listEndpointsCallable() { - return listEndpointsCallable; - } - - @Override - public UnaryCallable - listEndpointsPagedCallable() { - return listEndpointsPagedCallable; - } - - @Override - public UnaryCallable updateEndpointCallable() { - return updateEndpointCallable; - } - - @Override - public UnaryCallable - updateEndpointLongRunningCallable() { - return updateEndpointLongRunningCallable; - } - - @Override - public OperationCallable< - UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> - updateEndpointLongRunningOperationCallable() { - return updateEndpointLongRunningOperationCallable; - } - - @Override - public UnaryCallable deleteEndpointCallable() { - return deleteEndpointCallable; - } - - @Override - public OperationCallable - deleteEndpointOperationCallable() { - return deleteEndpointOperationCallable; - } - - @Override - public UnaryCallable deployModelCallable() { - return deployModelCallable; - } - - @Override - public OperationCallable - deployModelOperationCallable() { - return deployModelOperationCallable; - } - - @Override - public UnaryCallable undeployModelCallable() { - return undeployModelCallable; - } - - @Override - public OperationCallable< - UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> - undeployModelOperationCallable() { - return undeployModelOperationCallable; - } - - @Override - public UnaryCallable mutateDeployedModelCallable() { - return mutateDeployedModelCallable; - } - - @Override - public OperationCallable< - MutateDeployedModelRequest, - MutateDeployedModelResponse, - MutateDeployedModelOperationMetadata> - mutateDeployedModelOperationCallable() { - return mutateDeployedModelOperationCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java deleted file mode 100644 index 8a9d8b63e50c..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -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 LlmUtilityService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class HttpJsonLlmUtilityServiceCallableFactory - 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); - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java deleted file mode 100644 index 9c47c6f667cb..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java +++ /dev/null @@ -1,620 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.ListLocationsPagedResponse; - -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.location.GetLocationRequest; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -import com.google.cloud.vertexai.api.ComputeTokensRequest; -import com.google.cloud.vertexai.api.ComputeTokensResponse; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 LlmUtilityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - countTokensMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/CountTokens") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens", - "/v1/{endpoint=endpoints/*}:countTokens", - "/v1/{endpoint=publishers/*/models/*}:countTokens") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CountTokensResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - computeTokensMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.LlmUtilityService/ComputeTokens") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens", - "/v1/{endpoint=endpoints/*}:computeTokens", - "/v1/{endpoint=publishers/*/models/*}:computeTokens") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ComputeTokensResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listLocationsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.location.Locations/ListLocations") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/ui/{name=projects/*}/locations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*}/locations") - .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( - "/ui/{name=projects/*/locations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*/locations/*}") - .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 static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:setIamPolicy") - .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().clearResource().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:getIamPolicy") - .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(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:testIamPermissions") - .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(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable countTokensCallable; - private final UnaryCallable computeTokensCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonLlmUtilityServiceStub create(LlmUtilityServiceStubSettings settings) - throws IOException { - return new HttpJsonLlmUtilityServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonLlmUtilityServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonLlmUtilityServiceStub( - LlmUtilityServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonLlmUtilityServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonLlmUtilityServiceStub( - LlmUtilityServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonLlmUtilityServiceStub, 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 HttpJsonLlmUtilityServiceStub( - LlmUtilityServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonLlmUtilityServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonLlmUtilityServiceStub, 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 HttpJsonLlmUtilityServiceStub( - LlmUtilityServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings countTokensTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(countTokensMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - computeTokensTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(computeTokensMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - 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(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.countTokensCallable = - callableFactory.createUnaryCallable( - countTokensTransportSettings, settings.countTokensSettings(), clientContext); - this.computeTokensCallable = - callableFactory.createUnaryCallable( - computeTokensTransportSettings, settings.computeTokensSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(countTokensMethodDescriptor); - methodDescriptors.add(computeTokensMethodDescriptor); - methodDescriptors.add(listLocationsMethodDescriptor); - methodDescriptors.add(getLocationMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable countTokensCallable() { - return countTokensCallable; - } - - @Override - public UnaryCallable computeTokensCallable() { - return computeTokensCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java deleted file mode 100644 index e775d01cd2b3..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -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 PredictionService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class HttpJsonPredictionServiceCallableFactory - 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); - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java deleted file mode 100644 index 4c2d1d49211c..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java +++ /dev/null @@ -1,1163 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -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.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsBuilder; -import com.google.api.gax.rpc.ServerStreamingCallable; -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.vertexai.api.DirectPredictRequest; -import com.google.cloud.vertexai.api.DirectPredictResponse; -import com.google.cloud.vertexai.api.DirectRawPredictRequest; -import com.google.cloud.vertexai.api.DirectRawPredictResponse; -import com.google.cloud.vertexai.api.EmbedContentRequest; -import com.google.cloud.vertexai.api.EmbedContentResponse; -import com.google.cloud.vertexai.api.ExplainRequest; -import com.google.cloud.vertexai.api.ExplainResponse; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.PredictRequest; -import com.google.cloud.vertexai.api.PredictResponse; -import com.google.cloud.vertexai.api.RawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictResponse; -import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; -import com.google.cloud.vertexai.api.StreamRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictResponse; -import com.google.cloud.vertexai.api.StreamingRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingRawPredictResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 PredictionService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class HttpJsonPredictionServiceStub extends PredictionServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - predictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/Predict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(PredictResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor rawPredictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/RawPredict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HttpBody.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - streamRawPredictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamRawPredict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HttpBody.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - directPredictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/DirectPredict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DirectPredictResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - directRawPredictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/DirectRawPredict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directRawPredict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DirectRawPredictResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - serverStreamingPredictMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.aiplatform.v1.PredictionService/ServerStreamingPredict") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:serverStreamingPredict", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - return fields; - }) - .setAdditionalPaths( - "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:serverStreamingPredict") - .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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(StreamingPredictResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - explainMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/Explain") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "endpoint", request.getEndpoint()); - 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().clearEndpoint().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExplainResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - generateContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/GenerateContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{model=projects/*/locations/*/endpoints/*}:generateContent", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "model", request.getModel()); - return fields; - }) - .setAdditionalPaths( - "/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent", - "/v1/{model=endpoints/*}:generateContent", - "/v1/{model=publishers/*/models/*}:generateContent") - .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().clearModel().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GenerateContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - streamGenerateContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.aiplatform.v1.PredictionService/StreamGenerateContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "model", request.getModel()); - return fields; - }) - .setAdditionalPaths( - "/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent", - "/v1/{model=endpoints/*}:streamGenerateContent", - "/v1/{model=publishers/*/models/*}:streamGenerateContent") - .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().clearModel().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GenerateContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - embedContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/EmbedContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - if (request.hasModel()) { - serializer.putPathParam(fields, "model", request.getModel()); - } - 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().clearModel().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EmbedContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listLocationsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.location.Locations/ListLocations") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/ui/{name=projects/*}/locations", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*}/locations") - .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( - "/ui/{name=projects/*/locations/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v1/{name=projects/*/locations/*}") - .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 static final ApiMethodDescriptor - setIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:setIamPolicy") - .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().clearResource().build(), true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:getIamPolicy") - .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(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - testIamPermissionsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setAdditionalPaths( - "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/featureGroups/*}:testIamPermissions") - .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(TestIamPermissionsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable predictCallable; - private final UnaryCallable rawPredictCallable; - private final ServerStreamingCallable streamRawPredictCallable; - private final UnaryCallable directPredictCallable; - private final UnaryCallable - directRawPredictCallable; - private final ServerStreamingCallable - serverStreamingPredictCallable; - private final UnaryCallable explainCallable; - private final UnaryCallable - generateContentCallable; - private final ServerStreamingCallable - streamGenerateContentCallable; - private final UnaryCallable embedContentCallable; - private final UnaryCallable listLocationsCallable; - private final UnaryCallable - listLocationsPagedCallable; - private final UnaryCallable getLocationCallable; - private final UnaryCallable setIamPolicyCallable; - private final UnaryCallable getIamPolicyCallable; - private final UnaryCallable - testIamPermissionsCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonPredictionServiceStub create(PredictionServiceStubSettings settings) - throws IOException { - return new HttpJsonPredictionServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonPredictionServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonPredictionServiceStub( - PredictionServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonPredictionServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonPredictionServiceStub( - PredictionServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonPredictionServiceStub, 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 HttpJsonPredictionServiceStub( - PredictionServiceStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonPredictionServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonPredictionServiceStub, 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 HttpJsonPredictionServiceStub( - PredictionServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings predictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(predictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings rawPredictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(rawPredictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings streamRawPredictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(streamRawPredictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - directPredictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(directPredictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - directRawPredictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(directRawPredictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - serverStreamingPredictTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(serverStreamingPredictMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings explainTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(explainMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("endpoint", String.valueOf(request.getEndpoint())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - generateContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(generateContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - streamGenerateContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(streamGenerateContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings embedContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(embedContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("model", String.valueOf(request.getModel())); - 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(); - HttpJsonCallSettings setIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(setIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings getIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - testIamPermissionsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(testIamPermissionsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("resource", String.valueOf(request.getResource())); - return builder.build(); - }) - .build(); - - this.predictCallable = - callableFactory.createUnaryCallable( - predictTransportSettings, settings.predictSettings(), clientContext); - this.rawPredictCallable = - callableFactory.createUnaryCallable( - rawPredictTransportSettings, settings.rawPredictSettings(), clientContext); - this.streamRawPredictCallable = - callableFactory.createServerStreamingCallable( - streamRawPredictTransportSettings, settings.streamRawPredictSettings(), clientContext); - this.directPredictCallable = - callableFactory.createUnaryCallable( - directPredictTransportSettings, settings.directPredictSettings(), clientContext); - this.directRawPredictCallable = - callableFactory.createUnaryCallable( - directRawPredictTransportSettings, settings.directRawPredictSettings(), clientContext); - this.serverStreamingPredictCallable = - callableFactory.createServerStreamingCallable( - serverStreamingPredictTransportSettings, - settings.serverStreamingPredictSettings(), - clientContext); - this.explainCallable = - callableFactory.createUnaryCallable( - explainTransportSettings, settings.explainSettings(), clientContext); - this.generateContentCallable = - callableFactory.createUnaryCallable( - generateContentTransportSettings, settings.generateContentSettings(), clientContext); - this.streamGenerateContentCallable = - callableFactory.createServerStreamingCallable( - streamGenerateContentTransportSettings, - settings.streamGenerateContentSettings(), - clientContext); - this.embedContentCallable = - callableFactory.createUnaryCallable( - embedContentTransportSettings, settings.embedContentSettings(), clientContext); - 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.setIamPolicyCallable = - callableFactory.createUnaryCallable( - setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); - this.getIamPolicyCallable = - callableFactory.createUnaryCallable( - getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); - this.testIamPermissionsCallable = - callableFactory.createUnaryCallable( - testIamPermissionsTransportSettings, - settings.testIamPermissionsSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(predictMethodDescriptor); - methodDescriptors.add(rawPredictMethodDescriptor); - methodDescriptors.add(streamRawPredictMethodDescriptor); - methodDescriptors.add(directPredictMethodDescriptor); - methodDescriptors.add(directRawPredictMethodDescriptor); - methodDescriptors.add(serverStreamingPredictMethodDescriptor); - methodDescriptors.add(explainMethodDescriptor); - methodDescriptors.add(generateContentMethodDescriptor); - methodDescriptors.add(streamGenerateContentMethodDescriptor); - methodDescriptors.add(embedContentMethodDescriptor); - methodDescriptors.add(listLocationsMethodDescriptor); - methodDescriptors.add(getLocationMethodDescriptor); - methodDescriptors.add(setIamPolicyMethodDescriptor); - methodDescriptors.add(getIamPolicyMethodDescriptor); - methodDescriptors.add(testIamPermissionsMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable predictCallable() { - return predictCallable; - } - - @Override - public UnaryCallable rawPredictCallable() { - return rawPredictCallable; - } - - @Override - public ServerStreamingCallable streamRawPredictCallable() { - return streamRawPredictCallable; - } - - @Override - public UnaryCallable directPredictCallable() { - return directPredictCallable; - } - - @Override - public UnaryCallable - directRawPredictCallable() { - return directRawPredictCallable; - } - - @Override - public ServerStreamingCallable - serverStreamingPredictCallable() { - return serverStreamingPredictCallable; - } - - @Override - public UnaryCallable explainCallable() { - return explainCallable; - } - - @Override - public UnaryCallable generateContentCallable() { - return generateContentCallable; - } - - @Override - public ServerStreamingCallable - streamGenerateContentCallable() { - return streamGenerateContentCallable; - } - - @Override - public UnaryCallable embedContentCallable() { - return embedContentCallable; - } - - @Override - public UnaryCallable listLocationsCallable() { - return listLocationsCallable; - } - - @Override - public UnaryCallable - listLocationsPagedCallable() { - return listLocationsPagedCallable; - } - - @Override - public UnaryCallable getLocationCallable() { - return getLocationCallable; - } - - @Override - public UnaryCallable setIamPolicyCallable() { - return setIamPolicyCallable; - } - - @Override - public UnaryCallable getIamPolicyCallable() { - return getIamPolicyCallable; - } - - @Override - public UnaryCallable - testIamPermissionsCallable() { - return testIamPermissionsCallable; - } - - @Override - public BidiStreamingCallable - streamDirectPredictCallable() { - throw new UnsupportedOperationException( - "Not implemented: streamDirectPredictCallable(). REST transport is not implemented for this" - + " method yet."); - } - - @Override - public BidiStreamingCallable - streamDirectRawPredictCallable() { - throw new UnsupportedOperationException( - "Not implemented: streamDirectRawPredictCallable(). REST transport is not implemented for" - + " this method yet."); - } - - @Override - public BidiStreamingCallable - streamingPredictCallable() { - throw new UnsupportedOperationException( - "Not implemented: streamingPredictCallable(). REST transport is not implemented for this" - + " method yet."); - } - - @Override - public BidiStreamingCallable - streamingRawPredictCallable() { - throw new UnsupportedOperationException( - "Not implemented: streamingRawPredictCallable(). REST transport is not implemented for this" - + " method yet."); - } - - @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-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStub.java deleted file mode 100644 index cf9ca0498f34..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStub.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.ListLocationsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -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.vertexai.api.ComputeTokensRequest; -import com.google.cloud.vertexai.api.ComputeTokensResponse; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the LlmUtilityService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class LlmUtilityServiceStub implements BackgroundResource { - - public UnaryCallable countTokensCallable() { - throw new UnsupportedOperationException("Not implemented: countTokensCallable()"); - } - - public UnaryCallable computeTokensCallable() { - throw new UnsupportedOperationException("Not implemented: computeTokensCallable()"); - } - - 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()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java deleted file mode 100644 index 415fd7bab0b0..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.ListLocationsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.core.ObsoleteApi; -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.location.GetLocationRequest; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -import com.google.cloud.vertexai.api.ComputeTokensRequest; -import com.google.cloud.vertexai.api.ComputeTokensResponse; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 LlmUtilityServiceStub}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of countTokens: - * - *

{@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
- * LlmUtilityServiceStubSettings.Builder llmUtilityServiceSettingsBuilder =
- *     LlmUtilityServiceStubSettings.newBuilder();
- * llmUtilityServiceSettingsBuilder
- *     .countTokensSettings()
- *     .setRetrySettings(
- *         llmUtilityServiceSettingsBuilder
- *             .countTokensSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * LlmUtilityServiceStubSettings llmUtilityServiceSettings =
- *     llmUtilityServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - */ -@Generated("by gapic-generator-java") -public class LlmUtilityServiceStubSettings 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 countTokensSettings; - private final UnaryCallSettings - computeTokensSettings; - private final PagedCallSettings< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings getLocationSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - 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(); - } - }; - - 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 countTokens. */ - public UnaryCallSettings countTokensSettings() { - return countTokensSettings; - } - - /** Returns the object with the settings used for calls to computeTokens. */ - public UnaryCallSettings computeTokensSettings() { - return computeTokensSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public LlmUtilityServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcLlmUtilityServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonLlmUtilityServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns the default service name. */ - @Override - public String getServiceName() { - return "aiplatform"; - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - @ObsoleteApi("Use getEndpoint() instead") - public static String getDefaultEndpoint() { - return "aiplatform.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "aiplatform.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(); - } - - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(LlmUtilityServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(LlmUtilityServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return LlmUtilityServiceStubSettings.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 LlmUtilityServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - countTokensSettings = settingsBuilder.countTokensSettings().build(); - computeTokensSettings = settingsBuilder.computeTokensSettings().build(); - listLocationsSettings = settingsBuilder.listLocationsSettings().build(); - getLocationSettings = settingsBuilder.getLocationSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for LlmUtilityServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - countTokensSettings; - private final UnaryCallSettings.Builder - computeTokensSettings; - private final PagedCallSettings.Builder< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings.Builder getLocationSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - 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); - - countTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - computeTokensSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); - getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - countTokensSettings, - computeTokensSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(LlmUtilityServiceStubSettings settings) { - super(settings); - - countTokensSettings = settings.countTokensSettings.toBuilder(); - computeTokensSettings = settings.computeTokensSettings.toBuilder(); - listLocationsSettings = settings.listLocationsSettings.toBuilder(); - getLocationSettings = settings.getLocationSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - countTokensSettings, - computeTokensSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .countTokensSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .computeTokensSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 countTokens. */ - public UnaryCallSettings.Builder - countTokensSettings() { - return countTokensSettings; - } - - /** Returns the builder for the settings used for calls to computeTokens. */ - public UnaryCallSettings.Builder - computeTokensSettings() { - return computeTokensSettings; - } - - /** 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; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public LlmUtilityServiceStubSettings build() throws IOException { - return new LlmUtilityServiceStubSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java deleted file mode 100644 index 182bb1b2da3f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ServerStreamingCallable; -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.vertexai.api.DirectPredictRequest; -import com.google.cloud.vertexai.api.DirectPredictResponse; -import com.google.cloud.vertexai.api.DirectRawPredictRequest; -import com.google.cloud.vertexai.api.DirectRawPredictResponse; -import com.google.cloud.vertexai.api.EmbedContentRequest; -import com.google.cloud.vertexai.api.EmbedContentResponse; -import com.google.cloud.vertexai.api.ExplainRequest; -import com.google.cloud.vertexai.api.ExplainResponse; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.PredictRequest; -import com.google.cloud.vertexai.api.PredictResponse; -import com.google.cloud.vertexai.api.RawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictResponse; -import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; -import com.google.cloud.vertexai.api.StreamRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictResponse; -import com.google.cloud.vertexai.api.StreamingRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingRawPredictResponse; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the PredictionService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class PredictionServiceStub implements BackgroundResource { - - public UnaryCallable predictCallable() { - throw new UnsupportedOperationException("Not implemented: predictCallable()"); - } - - public UnaryCallable rawPredictCallable() { - throw new UnsupportedOperationException("Not implemented: rawPredictCallable()"); - } - - public ServerStreamingCallable streamRawPredictCallable() { - throw new UnsupportedOperationException("Not implemented: streamRawPredictCallable()"); - } - - public UnaryCallable directPredictCallable() { - throw new UnsupportedOperationException("Not implemented: directPredictCallable()"); - } - - public UnaryCallable - directRawPredictCallable() { - throw new UnsupportedOperationException("Not implemented: directRawPredictCallable()"); - } - - public BidiStreamingCallable - streamDirectPredictCallable() { - throw new UnsupportedOperationException("Not implemented: streamDirectPredictCallable()"); - } - - public BidiStreamingCallable - streamDirectRawPredictCallable() { - throw new UnsupportedOperationException("Not implemented: streamDirectRawPredictCallable()"); - } - - public BidiStreamingCallable - streamingPredictCallable() { - throw new UnsupportedOperationException("Not implemented: streamingPredictCallable()"); - } - - public ServerStreamingCallable - serverStreamingPredictCallable() { - throw new UnsupportedOperationException("Not implemented: serverStreamingPredictCallable()"); - } - - public BidiStreamingCallable - streamingRawPredictCallable() { - throw new UnsupportedOperationException("Not implemented: streamingRawPredictCallable()"); - } - - public UnaryCallable explainCallable() { - throw new UnsupportedOperationException("Not implemented: explainCallable()"); - } - - public UnaryCallable generateContentCallable() { - throw new UnsupportedOperationException("Not implemented: generateContentCallable()"); - } - - public ServerStreamingCallable - streamGenerateContentCallable() { - throw new UnsupportedOperationException("Not implemented: streamGenerateContentCallable()"); - } - - public UnaryCallable embedContentCallable() { - throw new UnsupportedOperationException("Not implemented: embedContentCallable()"); - } - - 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()"); - } - - public UnaryCallable setIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); - } - - public UnaryCallable getIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); - } - - public UnaryCallable - testIamPermissionsCallable() { - throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java deleted file mode 100644 index 85f2b906fbab..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java +++ /dev/null @@ -1,847 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api.stub; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -import com.google.api.HttpBody; -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.core.ObsoleteApi; -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.ServerStreamingCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StreamingCallSettings; -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.vertexai.api.DirectPredictRequest; -import com.google.cloud.vertexai.api.DirectPredictResponse; -import com.google.cloud.vertexai.api.DirectRawPredictRequest; -import com.google.cloud.vertexai.api.DirectRawPredictResponse; -import com.google.cloud.vertexai.api.EmbedContentRequest; -import com.google.cloud.vertexai.api.EmbedContentResponse; -import com.google.cloud.vertexai.api.ExplainRequest; -import com.google.cloud.vertexai.api.ExplainResponse; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.PredictRequest; -import com.google.cloud.vertexai.api.PredictResponse; -import com.google.cloud.vertexai.api.RawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectPredictResponse; -import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; -import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; -import com.google.cloud.vertexai.api.StreamRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictRequest; -import com.google.cloud.vertexai.api.StreamingPredictResponse; -import com.google.cloud.vertexai.api.StreamingRawPredictRequest; -import com.google.cloud.vertexai.api.StreamingRawPredictResponse; -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.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 PredictionServiceStub}. - * - *

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

    - *
  • The default service address (aiplatform.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 - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of predict: - * - *

{@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
- * PredictionServiceStubSettings.Builder predictionServiceSettingsBuilder =
- *     PredictionServiceStubSettings.newBuilder();
- * predictionServiceSettingsBuilder
- *     .predictSettings()
- *     .setRetrySettings(
- *         predictionServiceSettingsBuilder
- *             .predictSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- *             .setMaxAttempts(5)
- *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- *             .setRetryDelayMultiplier(1.3)
- *             .setRpcTimeoutMultiplier(1.5)
- *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
- *             .build());
- * PredictionServiceStubSettings predictionServiceSettings =
- *     predictionServiceSettingsBuilder.build();
- * }
- * - * Please refer to the [Client Side Retry - * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting - * retries. - */ -@Generated("by gapic-generator-java") -public class PredictionServiceStubSettings 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") - .add("https://www.googleapis.com/auth/cloud-platform.read-only") - .build(); - - private final UnaryCallSettings predictSettings; - private final UnaryCallSettings rawPredictSettings; - private final ServerStreamingCallSettings - streamRawPredictSettings; - private final UnaryCallSettings - directPredictSettings; - private final UnaryCallSettings - directRawPredictSettings; - private final StreamingCallSettings - streamDirectPredictSettings; - private final StreamingCallSettings - streamDirectRawPredictSettings; - private final StreamingCallSettings - streamingPredictSettings; - private final ServerStreamingCallSettings - serverStreamingPredictSettings; - private final StreamingCallSettings - streamingRawPredictSettings; - private final UnaryCallSettings explainSettings; - private final UnaryCallSettings - generateContentSettings; - private final ServerStreamingCallSettings - streamGenerateContentSettings; - private final UnaryCallSettings embedContentSettings; - private final PagedCallSettings< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings getLocationSettings; - private final UnaryCallSettings setIamPolicySettings; - private final UnaryCallSettings getIamPolicySettings; - private final UnaryCallSettings - testIamPermissionsSettings; - - 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(); - } - }; - - 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 predict. */ - public UnaryCallSettings predictSettings() { - return predictSettings; - } - - /** Returns the object with the settings used for calls to rawPredict. */ - public UnaryCallSettings rawPredictSettings() { - return rawPredictSettings; - } - - /** Returns the object with the settings used for calls to streamRawPredict. */ - public ServerStreamingCallSettings streamRawPredictSettings() { - return streamRawPredictSettings; - } - - /** Returns the object with the settings used for calls to directPredict. */ - public UnaryCallSettings directPredictSettings() { - return directPredictSettings; - } - - /** Returns the object with the settings used for calls to directRawPredict. */ - public UnaryCallSettings - directRawPredictSettings() { - return directRawPredictSettings; - } - - /** Returns the object with the settings used for calls to streamDirectPredict. */ - public StreamingCallSettings - streamDirectPredictSettings() { - return streamDirectPredictSettings; - } - - /** Returns the object with the settings used for calls to streamDirectRawPredict. */ - public StreamingCallSettings - streamDirectRawPredictSettings() { - return streamDirectRawPredictSettings; - } - - /** Returns the object with the settings used for calls to streamingPredict. */ - public StreamingCallSettings - streamingPredictSettings() { - return streamingPredictSettings; - } - - /** Returns the object with the settings used for calls to serverStreamingPredict. */ - public ServerStreamingCallSettings - serverStreamingPredictSettings() { - return serverStreamingPredictSettings; - } - - /** Returns the object with the settings used for calls to streamingRawPredict. */ - public StreamingCallSettings - streamingRawPredictSettings() { - return streamingRawPredictSettings; - } - - /** Returns the object with the settings used for calls to explain. */ - public UnaryCallSettings explainSettings() { - return explainSettings; - } - - /** Returns the object with the settings used for calls to generateContent. */ - public UnaryCallSettings - generateContentSettings() { - return generateContentSettings; - } - - /** Returns the object with the settings used for calls to streamGenerateContent. */ - public ServerStreamingCallSettings - streamGenerateContentSettings() { - return streamGenerateContentSettings; - } - - /** Returns the object with the settings used for calls to embedContent. */ - public UnaryCallSettings embedContentSettings() { - return embedContentSettings; - } - - /** 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; - } - - /** Returns the object with the settings used for calls to setIamPolicy. */ - public UnaryCallSettings setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the object with the settings used for calls to getIamPolicy. */ - public UnaryCallSettings getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the object with the settings used for calls to testIamPermissions. */ - public UnaryCallSettings - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - public PredictionServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcPredictionServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonPredictionServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns the default service name. */ - @Override - public String getServiceName() { - return "aiplatform"; - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - @ObsoleteApi("Use getEndpoint() instead") - public static String getDefaultEndpoint() { - return "aiplatform.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "aiplatform.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(); - } - - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(PredictionServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(PredictionServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return PredictionServiceStubSettings.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 PredictionServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - predictSettings = settingsBuilder.predictSettings().build(); - rawPredictSettings = settingsBuilder.rawPredictSettings().build(); - streamRawPredictSettings = settingsBuilder.streamRawPredictSettings().build(); - directPredictSettings = settingsBuilder.directPredictSettings().build(); - directRawPredictSettings = settingsBuilder.directRawPredictSettings().build(); - streamDirectPredictSettings = settingsBuilder.streamDirectPredictSettings().build(); - streamDirectRawPredictSettings = settingsBuilder.streamDirectRawPredictSettings().build(); - streamingPredictSettings = settingsBuilder.streamingPredictSettings().build(); - serverStreamingPredictSettings = settingsBuilder.serverStreamingPredictSettings().build(); - streamingRawPredictSettings = settingsBuilder.streamingRawPredictSettings().build(); - explainSettings = settingsBuilder.explainSettings().build(); - generateContentSettings = settingsBuilder.generateContentSettings().build(); - streamGenerateContentSettings = settingsBuilder.streamGenerateContentSettings().build(); - embedContentSettings = settingsBuilder.embedContentSettings().build(); - listLocationsSettings = settingsBuilder.listLocationsSettings().build(); - getLocationSettings = settingsBuilder.getLocationSettings().build(); - setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); - getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); - testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); - } - - /** Builder for PredictionServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder predictSettings; - private final UnaryCallSettings.Builder rawPredictSettings; - private final ServerStreamingCallSettings.Builder - streamRawPredictSettings; - private final UnaryCallSettings.Builder - directPredictSettings; - private final UnaryCallSettings.Builder - directRawPredictSettings; - private final StreamingCallSettings.Builder< - StreamDirectPredictRequest, StreamDirectPredictResponse> - streamDirectPredictSettings; - private final StreamingCallSettings.Builder< - StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> - streamDirectRawPredictSettings; - private final StreamingCallSettings.Builder - streamingPredictSettings; - private final ServerStreamingCallSettings.Builder< - StreamingPredictRequest, StreamingPredictResponse> - serverStreamingPredictSettings; - private final StreamingCallSettings.Builder< - StreamingRawPredictRequest, StreamingRawPredictResponse> - streamingRawPredictSettings; - private final UnaryCallSettings.Builder explainSettings; - private final UnaryCallSettings.Builder - generateContentSettings; - private final ServerStreamingCallSettings.Builder< - GenerateContentRequest, GenerateContentResponse> - streamGenerateContentSettings; - private final UnaryCallSettings.Builder - embedContentSettings; - private final PagedCallSettings.Builder< - ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> - listLocationsSettings; - private final UnaryCallSettings.Builder getLocationSettings; - private final UnaryCallSettings.Builder setIamPolicySettings; - private final UnaryCallSettings.Builder getIamPolicySettings; - private final UnaryCallSettings.Builder - testIamPermissionsSettings; - 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); - - predictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - rawPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - streamRawPredictSettings = ServerStreamingCallSettings.newBuilder(); - directPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - directRawPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - streamDirectPredictSettings = StreamingCallSettings.newBuilder(); - streamDirectRawPredictSettings = StreamingCallSettings.newBuilder(); - streamingPredictSettings = StreamingCallSettings.newBuilder(); - serverStreamingPredictSettings = ServerStreamingCallSettings.newBuilder(); - streamingRawPredictSettings = StreamingCallSettings.newBuilder(); - explainSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - generateContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - streamGenerateContentSettings = ServerStreamingCallSettings.newBuilder(); - embedContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); - getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - predictSettings, - rawPredictSettings, - directPredictSettings, - directRawPredictSettings, - explainSettings, - generateContentSettings, - embedContentSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - initDefaults(this); - } - - protected Builder(PredictionServiceStubSettings settings) { - super(settings); - - predictSettings = settings.predictSettings.toBuilder(); - rawPredictSettings = settings.rawPredictSettings.toBuilder(); - streamRawPredictSettings = settings.streamRawPredictSettings.toBuilder(); - directPredictSettings = settings.directPredictSettings.toBuilder(); - directRawPredictSettings = settings.directRawPredictSettings.toBuilder(); - streamDirectPredictSettings = settings.streamDirectPredictSettings.toBuilder(); - streamDirectRawPredictSettings = settings.streamDirectRawPredictSettings.toBuilder(); - streamingPredictSettings = settings.streamingPredictSettings.toBuilder(); - serverStreamingPredictSettings = settings.serverStreamingPredictSettings.toBuilder(); - streamingRawPredictSettings = settings.streamingRawPredictSettings.toBuilder(); - explainSettings = settings.explainSettings.toBuilder(); - generateContentSettings = settings.generateContentSettings.toBuilder(); - streamGenerateContentSettings = settings.streamGenerateContentSettings.toBuilder(); - embedContentSettings = settings.embedContentSettings.toBuilder(); - listLocationsSettings = settings.listLocationsSettings.toBuilder(); - getLocationSettings = settings.getLocationSettings.toBuilder(); - setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); - getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); - testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - predictSettings, - rawPredictSettings, - directPredictSettings, - directRawPredictSettings, - explainSettings, - generateContentSettings, - embedContentSettings, - listLocationsSettings, - getLocationSettings, - setIamPolicySettings, - getIamPolicySettings, - testIamPermissionsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .predictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .rawPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .streamRawPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .directPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .directRawPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .serverStreamingPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .explainSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .generateContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .streamGenerateContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .embedContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 - .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 predict. */ - public UnaryCallSettings.Builder predictSettings() { - return predictSettings; - } - - /** Returns the builder for the settings used for calls to rawPredict. */ - public UnaryCallSettings.Builder rawPredictSettings() { - return rawPredictSettings; - } - - /** Returns the builder for the settings used for calls to streamRawPredict. */ - public ServerStreamingCallSettings.Builder - streamRawPredictSettings() { - return streamRawPredictSettings; - } - - /** Returns the builder for the settings used for calls to directPredict. */ - public UnaryCallSettings.Builder - directPredictSettings() { - return directPredictSettings; - } - - /** Returns the builder for the settings used for calls to directRawPredict. */ - public UnaryCallSettings.Builder - directRawPredictSettings() { - return directRawPredictSettings; - } - - /** Returns the builder for the settings used for calls to streamDirectPredict. */ - public StreamingCallSettings.Builder - streamDirectPredictSettings() { - return streamDirectPredictSettings; - } - - /** Returns the builder for the settings used for calls to streamDirectRawPredict. */ - public StreamingCallSettings.Builder< - StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> - streamDirectRawPredictSettings() { - return streamDirectRawPredictSettings; - } - - /** Returns the builder for the settings used for calls to streamingPredict. */ - public StreamingCallSettings.Builder - streamingPredictSettings() { - return streamingPredictSettings; - } - - /** Returns the builder for the settings used for calls to serverStreamingPredict. */ - public ServerStreamingCallSettings.Builder - serverStreamingPredictSettings() { - return serverStreamingPredictSettings; - } - - /** Returns the builder for the settings used for calls to streamingRawPredict. */ - public StreamingCallSettings.Builder - streamingRawPredictSettings() { - return streamingRawPredictSettings; - } - - /** Returns the builder for the settings used for calls to explain. */ - public UnaryCallSettings.Builder explainSettings() { - return explainSettings; - } - - /** Returns the builder for the settings used for calls to generateContent. */ - public UnaryCallSettings.Builder - generateContentSettings() { - return generateContentSettings; - } - - /** Returns the builder for the settings used for calls to streamGenerateContent. */ - public ServerStreamingCallSettings.Builder - streamGenerateContentSettings() { - return streamGenerateContentSettings; - } - - /** Returns the builder for the settings used for calls to embedContent. */ - public UnaryCallSettings.Builder - embedContentSettings() { - return embedContentSettings; - } - - /** 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; - } - - /** Returns the builder for the settings used for calls to setIamPolicy. */ - public UnaryCallSettings.Builder setIamPolicySettings() { - return setIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to getIamPolicy. */ - public UnaryCallSettings.Builder getIamPolicySettings() { - return getIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to testIamPermissions. */ - public UnaryCallSettings.Builder - testIamPermissionsSettings() { - return testIamPermissionsSettings; - } - - @Override - public PredictionServiceStubSettings build() throws IOException { - return new PredictionServiceStubSettings(this); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponder.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponder.java deleted file mode 100644 index bbace2ec8513..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponder.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.common.collect.ImmutableList; -import com.google.protobuf.Struct; -import com.google.protobuf.Value; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.Parameter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Logger; - -/** - * A responder that automatically calls functions when requested by the GenAI model. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class AutomaticFunctionCallingResponder { - private int maxFunctionCalls = 1; - private int remainingFunctionCalls; - private final Map callableFunctions = new HashMap<>(); - - private static final Logger logger = - Logger.getLogger(AutomaticFunctionCallingResponder.class.getName()); - - /** Constructs an AutomaticFunctionCallingResponder instance. */ - public AutomaticFunctionCallingResponder() { - this.remainingFunctionCalls = this.maxFunctionCalls; - } - - /** - * Constructs an AutomaticFunctionCallingResponder instance. - * - * @param maxFunctionCalls the maximum number of function calls to make in a row - */ - public AutomaticFunctionCallingResponder(int maxFunctionCalls) { - this.maxFunctionCalls = maxFunctionCalls; - this.remainingFunctionCalls = maxFunctionCalls; - } - - /** Sets the maximum number of function calls to make in a row. */ - public void setMaxFunctionCalls(int maxFunctionCalls) { - this.maxFunctionCalls = maxFunctionCalls; - this.remainingFunctionCalls = this.maxFunctionCalls; - } - - /** Gets the maximum number of function calls to make in a row. */ - public int getMaxFunctionCalls() { - return maxFunctionCalls; - } - - /** Resets the remaining function calls to the maximum number of function calls. */ - void resetRemainingFunctionCalls() { - this.remainingFunctionCalls = this.maxFunctionCalls; - } - - /** - * Adds a callable function to the AutomaticFunctionCallingResponder. - * - *

Note:: If you don't want to manually provide parameter names, you can ignore - * `orderedParameterNames` and compile your code with the "-parameters" flag. In this case, the - * parameter names can be auto retrieved from reflection. - * - * @param functionName the name of the function - * @param callableFunction the method to call when the functionName is requested - * @param orderedParameterNames the names of the parameters in the order they are passed to the - * function - * @throws IllegalArgumentException if the functionName is already in the responder - * @throws IllegalStateException if the parameter names are not provided and cannot be retrieved - * from reflection - */ - public void addCallableFunction( - String functionName, Method callableFunction, String... orderedParameterNames) { - if (callableFunctions.containsKey(functionName)) { - throw new IllegalArgumentException("Duplicate function name: " + functionName); - } else { - callableFunctions.put( - functionName, new CallableFunction(callableFunction, orderedParameterNames)); - } - } - - /** - * Automatically calls functions requested by the model and generates a Content that contains the - * results. - * - * @param functionCalls a list of {@link com.google.cloud.vertexai.api.FunctionCall} requested by - * the model - * @return a {@link com.google.cloud.vertexai.api.Content} that contains the results of the - * function calls - * @throws IllegalStateException if the number of automatic calls exceeds the maximum number of - * function calls - * @throws IllegalArgumentException if the model has asked to call a function that was not found - * in the responder - */ - Content getContentFromFunctionCalls(List functionCalls) { - checkNotNull(functionCalls, "functionCalls cannot be null."); - - List responseParts = new ArrayList<>(); - - for (FunctionCall functionCall : functionCalls) { - if (remainingFunctionCalls <= 0) { - throw new IllegalStateException( - "Exceeded the maximum number of continuous automatic function calls (" - + maxFunctionCalls - + "). If more automatic function calls are needed, please call" - + " `setMaxFunctionCalls() to set a higher number. The last function call is:\n" - + functionCall); - } - remainingFunctionCalls -= 1; - String functionName = functionCall.getName(); - CallableFunction callableFunction = callableFunctions.get(functionName); - if (callableFunction == null) { - throw new IllegalArgumentException( - "Model has asked to call function \"" + functionName + "\" which was not found."); - } - responseParts.add( - PartMaker.fromFunctionResponse( - functionName, - Collections.singletonMap("result", callableFunction.call(functionCall.getArgs())))); - } - - return ContentMaker.fromMultiModalData(responseParts.toArray()); - } - - /** A class that represents a function that can be called automatically. */ - static class CallableFunction { - private final Method callableFunction; - private final ImmutableList orderedParameterNames; - - /** - * Constructs a CallableFunction instance. - * - *

Note:: If you don't want to manually provide parameter names, you can ignore - * `orderedParameterNames` and compile your code with the "-parameters" flag. In this case, the - * parameter names can be auto retrieved from reflection. - * - * @param callableFunction the method to call - * @param orderedParameterNames the names of the parameters in the order they are passed to the - * function - * @throws IllegalArgumentException if the given method is not a static method or the number of - * provided parameter names doesn't match the number of parameters in the callable function - * @throws IllegalStateException if the parameter names are not provided and cannot be retrieved - * from reflection - */ - CallableFunction(Method callableFunction, String... orderedParameterNames) { - validateFunction(callableFunction); - this.callableFunction = callableFunction; - - if (orderedParameterNames.length == 0) { - ImmutableList.Builder builder = ImmutableList.builder(); - for (Parameter parameter : callableFunction.getParameters()) { - if (parameter.isNamePresent()) { - builder.add(parameter.getName()); - } else { - throw new IllegalStateException( - "Failed to retrieve the parameter name from reflection. Please compile your code" - + " with \"-parameters\" flag or use `addCallableFunction(String, Method," - + " String...)` to manually enter parameter names"); - } - } - this.orderedParameterNames = builder.build(); - } else if (orderedParameterNames.length == callableFunction.getParameters().length) { - this.orderedParameterNames = ImmutableList.copyOf(orderedParameterNames); - } else { - throw new IllegalArgumentException( - "The number of provided parameter names doesn't match the number of parameters in the" - + " callable function."); - } - } - - /** - * Calls the callable function with the given arguments. - * - * @param args the arguments to pass to the function - * @return the result of the function call - * @throws IllegalStateException if there are errors when invoking the function - * @throws IllegalArgumentException if the args map doesn't contain all the parameters of the - * function or the value types in the args map are not supported - */ - Object call(Struct args) { - // Extract the arguments from the Struct - Map argsMap = args.getFieldsMap(); - List argsList = new ArrayList<>(); - for (int i = 0; i < orderedParameterNames.size(); i++) { - String parameterName = orderedParameterNames.get(i); - if (!argsMap.containsKey(parameterName)) { - throw new IllegalArgumentException( - "The parameter \"" - + parameterName - + "\" was not found in the arguments requested by the model. Args map: " - + argsMap); - } - Value value = argsMap.get(parameterName); - switch (value.getKindCase()) { - case NUMBER_VALUE: - // Args map only returns double values, but the function may expect other types(int, - // float). So we need to cast the value to the correct type. - Class parameterType = callableFunction.getParameters()[i].getType(); - if (parameterType.equals(int.class)) { - argsList.add((int) value.getNumberValue()); - } else if (parameterType.equals(float.class)) { - argsList.add((float) value.getNumberValue()); - } else { - argsList.add(value.getNumberValue()); - } - break; - case STRING_VALUE: - argsList.add(value.getStringValue()); - break; - case BOOL_VALUE: - argsList.add(value.getBoolValue()); - break; - case NULL_VALUE: - argsList.add(null); - break; - default: - throw new IllegalArgumentException( - "Unsupported value type " - + value.getKindCase() - + " for parameter " - + parameterName); - } - } - - // Invoke the function - logger.info( - "Automatically calling function: " - + callableFunction.getName() - + argsList.toString().replace('[', '(').replace(']', ')')); - try { - return callableFunction.invoke(null, argsList.toArray()); - } catch (Exception e) { - throw new IllegalStateException( - "Error raised when calling function \"" - + callableFunction.getName() - + "\" as requested by the model. ", - e); - } - } - - /** Validates that the given method is a static method. */ - private void validateFunction(Method method) { - if (!Modifier.isStatic(method.getModifiers())) { - throw new IllegalArgumentException("Function calling only supports static methods."); - } - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ChatSession.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ChatSession.java deleted file mode 100644 index 13609af00df9..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ChatSession.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.cloud.vertexai.generativeai.ResponseHandler.aggregateStreamIntoResponse; -import static com.google.cloud.vertexai.generativeai.ResponseHandler.getContent; -import static com.google.cloud.vertexai.generativeai.ResponseHandler.getFinishReason; -import static com.google.cloud.vertexai.generativeai.ResponseHandler.getFunctionCalls; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.cloud.vertexai.api.Candidate.FinishReason; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.Tool; -import com.google.cloud.vertexai.api.ToolConfig; -import com.google.common.collect.ImmutableList; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -/** - * Represents a conversation between the user and the model. - * - *

Note: this class is NOT thread-safe. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class ChatSession { - private final GenerativeModel model; - private final Optional rootChatSession; - private final Optional automaticFunctionCallingResponder; - private List history; - private int previousHistorySize; - private Optional> currentResponseStream; - private Optional currentResponse; - - /** - * Creates a new chat session given a GenerativeModel instance. Configurations of the chat (e.g., - * GenerationConfig) inherits from the model. - */ - public ChatSession(GenerativeModel model) { - this(model, new ArrayList<>(), 0, Optional.empty(), Optional.empty()); - } - - /** - * Creates a new chat session given a GenerativeModel instance and a root chat session. - * Configurations of the chat (e.g., GenerationConfig) inherits from the model. - * - * @param model a {@link GenerativeModel} instance that generates contents in the chat. - * @param history a list of {@link Content} containing interleaving conversation between "user" - * and "model". - * @param previousHistorySize the size of the previous history. - * @param rootChatSession a root {@link ChatSession} instance. All the chat history in the current - * chat session will be merged to the root chat session. - * @param automaticFunctionCallingResponder an {@link AutomaticFunctionCallingResponder} instance - * that can automatically respond to function calls requested by the model. - * @return a {@link ChatSession} instance. - */ - private ChatSession( - GenerativeModel model, - List history, - int previousHistorySize, - Optional rootChatSession, - Optional automaticFunctionCallingResponder) { - checkNotNull(model, "model should not be null"); - this.model = model; - this.history = history; - this.previousHistorySize = previousHistorySize; - this.rootChatSession = rootChatSession; - this.automaticFunctionCallingResponder = automaticFunctionCallingResponder; - currentResponseStream = Optional.empty(); - currentResponse = Optional.empty(); - } - - /** - * Creates a copy of the current ChatSession with updated GenerationConfig. - * - * @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} that will be - * used in the new ChatSession. - * @return a new {@link ChatSession} instance with the specified GenerationConfig. - */ - public ChatSession withGenerationConfig(GenerationConfig generationConfig) { - return new ChatSession( - model.withGenerationConfig(generationConfig), - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - automaticFunctionCallingResponder); - } - - /** - * Creates a copy of the current ChatSession with updated SafetySettings. - * - * @param safetySettings a {@link com.google.cloud.vertexai.api.SafetySetting} that will be used - * in the new ChatSession. - * @return a new {@link ChatSession} instance with the specified SafetySettings. - */ - public ChatSession withSafetySettings(List safetySettings) { - return new ChatSession( - model.withSafetySettings(safetySettings), - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - automaticFunctionCallingResponder); - } - - /** - * Creates a copy of the current ChatSession with updated Tools. - * - * @param tools a {@link com.google.cloud.vertexai.api.Tool} that will be used in the new - * ChatSession. - * @return a new {@link ChatSession} instance with the specified Tools. - */ - public ChatSession withTools(List tools) { - return new ChatSession( - model.withTools(tools), - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - automaticFunctionCallingResponder); - } - - /** - * Creates a copy of the current ChatSession with updated ToolConfig. - * - * @param toolConfig a {@link com.google.cloud.vertexai.api.ToolConfig} that will be used in the - * new ChatSession. - * @return a new {@link ChatSession} instance with the specified ToolConfigs. - */ - public ChatSession withToolConfig(ToolConfig toolConfig) { - return new ChatSession( - model.withToolConfig(toolConfig), - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - automaticFunctionCallingResponder); - } - - /** - * Creates a copy of the current ChatSession with updated SystemInstruction. - * - * @param systemInstruction a {@link com.google.cloud.vertexai.api.Content} containing system - * instructions. - * @return a new {@link ChatSession} instance with the specified ToolConfigs. - */ - public ChatSession withSystemInstruction(Content systemInstruction) { - return new ChatSession( - model.withSystemInstruction(systemInstruction), - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - automaticFunctionCallingResponder); - } - - /** - * Creates a copy of the current ChatSession with updated AutomaticFunctionCallingResponder. - * - * @param automaticFunctionCallingResponder an {@link AutomaticFunctionCallingResponder} instance - * that will be used in the new ChatSession. - * @return a new {@link ChatSession} instance with the specified - * AutomaticFunctionCallingResponder. - */ - public ChatSession withAutomaticFunctionCallingResponder( - AutomaticFunctionCallingResponder automaticFunctionCallingResponder) { - return new ChatSession( - model, - history, - previousHistorySize, - Optional.of(rootChatSession.orElse(this)), - Optional.of(automaticFunctionCallingResponder)); - } - - /** - * Sends a message to the model and returns a stream of responses. - * - * @param text the message to be sent. - * @return an iterable in which each element is a GenerateContentResponse. Can be converted to - * stream by stream() method. - */ - public ResponseStream sendMessageStream(String text) throws IOException { - return sendMessageStream(ContentMaker.fromString(text)); - } - - /** - * Sends a message to the model and returns a stream of responses. - * - * @param content the content to be sent. - * @return an iterable in which each element is a GenerateContentResponse. Can be converted to - * stream by stream() method. - */ - public ResponseStream sendMessageStream(Content content) - throws IOException { - checkLastResponseAndEditHistory(); - history.add(content); - - ResponseStream respStream; - try { - respStream = model.generateContentStream(history); - } catch (IOException e) { - // If the API call fails, revert the history before throwing. - revertHistory(); - throw e; - } - setCurrentResponseStream(Optional.of(respStream)); - - // TODO(jayceeli) enable AFC in sendMessageStream - return respStream; - } - - /** - * Sends a message to the model and returns a response. - * - * @param text the message to be sent. - * @return a response. - */ - public GenerateContentResponse sendMessage(String text) throws IOException { - return sendMessage(ContentMaker.fromString(text)); - } - - /** - * Sends a message to the model and returns a response. - * - * @param content the content to be sent. - * @return a response. - */ - public GenerateContentResponse sendMessage(Content content) throws IOException { - checkLastResponseAndEditHistory(); - history.add(content); - GenerateContentResponse response; - try { - response = model.generateContent(history); - setCurrentResponse(Optional.of(response)); - return autoRespond(response); - } catch (Exception e) { - // If any step fails, reset the history and current response. - checkLastResponseAndEditHistory(); - revertHistory(); - throw e; - } - } - - /** - * Automatically responds to the model if there is an AutomaticFunctionCallingResponder and - * model's response contains function calls. - */ - private GenerateContentResponse autoRespond(GenerateContentResponse originalResponse) - throws IOException { - // Return the original response if there is no AFC responder or no function calls in the - // response. - if (!automaticFunctionCallingResponder.isPresent()) { - return originalResponse; - } - ImmutableList functionCalls = getFunctionCalls(originalResponse); - if (functionCalls.isEmpty()) { - return originalResponse; - } - - // Each time we call the `autoRespond`, we add 2 contents(user's functionResponse and model's - // functionCall) to the history and update the previousHistorySize during - // `checkLastResponseAndEditHistory`. But we shouldn't update the previousHistorySize because we - // will revert the whole history if any intermediate step fails. So we offset the - // previousHistorySize by 2 here. - setPreviousHistorySize(getPreviousHistorySize() - 2); - GenerateContentResponse response; - try { - // Let the responder generate the response content and send it to the model. - Content autoRespondedContent = - automaticFunctionCallingResponder.get().getContentFromFunctionCalls(functionCalls); - response = sendMessage(autoRespondedContent); - } finally { - // Reset the responder whether it succeeds or fails. - automaticFunctionCallingResponder.get().resetRemainingFunctionCalls(); - } - return response; - } - - /** Reverts the history to the previous state. */ - private void revertHistory() { - history.subList(getPreviousHistorySize(), history.size()).clear(); - } - - /** - * Checks whether the last response is available and edit the history if necessary. - * - * @throws IllegalStateException if the response stream is not finished. - */ - private void checkLastResponseAndEditHistory() { - getCurrentResponse() - .ifPresent( - currentResponse -> { - setCurrentResponse(Optional.empty()); - checkFinishReasonAndEditHistory(currentResponse); - history.add(getContent(currentResponse)); - // If `checkFinishReasonAndEditHistory` passes, we add 2 contents(user's message and - // model's response) to the history and then one round of conversation is finished. So - // we add 2 to the previousHistorySize. - setPreviousHistorySize(getPreviousHistorySize() + 2); - }); - getCurrentResponseStream() - .ifPresent( - responseStream -> { - if (!responseStream.isConsumed()) { - throw new IllegalStateException("Response stream is not consumed"); - } else { - setCurrentResponseStream(Optional.empty()); - GenerateContentResponse response = aggregateStreamIntoResponse(responseStream); - checkFinishReasonAndEditHistory(response); - history.add(getContent(response)); - // If `checkFinishReasonAndEditHistory` passes, we add 2 contents(user's message and - // model's response) to the history and then one round of conversation is finished. - // So we add 2 to the previousHistorySize. - setPreviousHistorySize(getPreviousHistorySize() + 2); - } - }); - } - - /** Reverts the history if the response finished with problems. */ - private void checkFinishReasonAndEditHistory(GenerateContentResponse response) { - FinishReason finishReason = getFinishReason(response); - if (finishReason != FinishReason.STOP && finishReason != FinishReason.MAX_TOKENS) { - revertHistory(); - throw new IllegalStateException( - String.format( - "The last round of conversation will not be added to history because response" - + " stream did not finish normally. Finish reason is %s.", - finishReason)); - } - } - - /** - * Returns the history of the conversation. - * - * @return a history of the conversation as an immutable list of {@link Content}. - */ - public ImmutableList getHistory() { - try { - checkLastResponseAndEditHistory(); - } catch (IllegalStateException e) { - if (e.getMessage() - .contains("The last round of conversation will not be added to history because")) { - IllegalStateException modifiedExecption = - new IllegalStateException("Rerun getHistory() to get cleaned history."); - modifiedExecption.initCause(e); - throw modifiedExecption; - } - throw e; - } - return ImmutableList.copyOf(history); - } - - /** - * Returns the previous history size of the root chat session (if exists) or the current chat - * session. - */ - private int getPreviousHistorySize() { - if (rootChatSession.isPresent()) { - return rootChatSession.get().previousHistorySize; - } - return previousHistorySize; - } - - /** - * Returns the current response of the root chat session (if exists) or the current chat session. - */ - private Optional getCurrentResponse() { - if (rootChatSession.isPresent()) { - return rootChatSession.get().currentResponse; - } else { - return currentResponse; - } - } - - /** - * Returns the current responseStream of the root chat session (if exists) or the current chat - * session. - */ - private Optional> getCurrentResponseStream() { - if (rootChatSession.isPresent()) { - return rootChatSession.get().currentResponseStream; - } else { - return currentResponseStream; - } - } - - /** - * Sets the history to a list of Content. - * - * @param history A list of {@link Content} containing interleaving conversation between "user" - * and "model". - */ - public void setHistory(List history) { - this.history = new ArrayList<>(history); - } - - /** - * Sets the previous history size of the root chat session (if exists) or the current chat - * session. - */ - private void setPreviousHistorySize(int historySize) { - previousHistorySize = historySize; - if (rootChatSession.isPresent()) { - rootChatSession.get().previousHistorySize = historySize; - } - } - - /** Sets the current response of the root chat session (if exists) or the current chat session. */ - private void setCurrentResponse(Optional response) { - if (currentResponseStream.isPresent()) { - throw new IllegalStateException( - "currentResponse and currentResponseStream cannot be set together"); - } - if (rootChatSession.isPresent()) { - rootChatSession.get().setCurrentResponse(response); - } else { - currentResponse = response; - } - } - - /** - * Sets the current responseStream of the root chat session (if exists) or the current chat - * session. - */ - private void setCurrentResponseStream( - Optional> responseStream) { - if (currentResponse.isPresent()) { - throw new IllegalStateException( - "currentResponseStream and currentResponse cannot be set together"); - } - if (rootChatSession.isPresent()) { - rootChatSession.get().setCurrentResponseStream(responseStream); - } else { - currentResponseStream = responseStream; - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/Constants.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/Constants.java deleted file mode 100644 index 916a5dea2c95..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/Constants.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import com.google.common.collect.ImmutableSet; - -/** - * A class that holds all constants for vertexai/generativeai. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class Constants { - public static final String MODEL_NAME_PREFIX_PROJECTS = "projects/"; - public static final String MODEL_NAME_PREFIX_PUBLISHERS = "publishers/"; - public static final String MODEL_NAME_PREFIX_MODELS = "models/"; - public static final ImmutableSet MODEL_NAME_PREFIXES = - ImmutableSet.of( - MODEL_NAME_PREFIX_PROJECTS, MODEL_NAME_PREFIX_PUBLISHERS, MODEL_NAME_PREFIX_MODELS); - - private Constants() {} -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java deleted file mode 100644 index f12ae7c1b647..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.base.Preconditions.checkArgument; - -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.Part; -import com.google.common.base.Strings; - -/** - * Helper class to create content. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public class ContentMaker { - private static final String DEFAULT_ROLE = "user"; - - /** - * Creates a ContentMakerForRole for a given role. - * - * @param role Currently accepted role values are: "user", "model". No need to call forRole for - * the "user" role since it's the default role. - */ - public static ContentMakerForRole forRole(String role) { - return new ContentMakerForRole(role); - } - - private static Content fromStringWithRole(String role, String text) { - checkArgument(!Strings.isNullOrEmpty(text), "text message can't be null or empty."); - return Content.newBuilder().addParts(Part.newBuilder().setText(text)).setRole(role).build(); - } - - private static Content fromMultiModalDataWithRole(String role, Object... multiModalData) { - Content.Builder contentBuilder = Content.newBuilder().setRole(role); - for (Object partData : multiModalData) { - if (partData instanceof String) { - String textData = (String) partData; - contentBuilder.addParts(Part.newBuilder().setText(textData)); - } else if (partData instanceof Part) { - contentBuilder.addParts((Part) partData); - } else { - throw new IllegalArgumentException("Unsupported data type: " + partData.getClass()); - } - } - return contentBuilder.build(); - } - - /** - * Creates a content from a string, assuming the role is "user". - * - *

The resulting content will contain one single {@link com.google.cloud.vertexai.api.Part} - * with its text field set. - * - *

To create a text content for "model", use `ContentMaker.forRole("model").fromString(text); - */ - public static Content fromString(String text) { - return fromStringWithRole(DEFAULT_ROLE, text); - } - - /** - * Creates a content from an array of Objects, assuming the role is "user". - * - *

The resulting content can contain multiple {@link com.google.cloud.vertexai.api.Part}s. Each - * element in the array becomes one part. - * - *

To create a non-text modality content for any other - * - * @param multiModalData an array which contains the actual payload of each part. The element - * could be either a single String or a Part. When it's a single string, it's converted to a - * {@link com.google.cloud.vertexai.api.Part} that has the Text field set. - */ - // TODO(b/333097480) Deprecate ContentMakerForRole - public static Content fromMultiModalData(Object... multiModalData) { - return fromMultiModalDataWithRole(DEFAULT_ROLE, multiModalData); - } - - /** - * Helper class to create content for a given role. Instantiated by ContentMaker.forRole("role"). - */ - public static class ContentMakerForRole { - private String role; - - private ContentMakerForRole(String role) { - this.role = role; - } - - /** - * Creates a content from a string. - * - * @param text a string which will be converted to a {@link com.google.cloud.vertexai.api.Part} - * with its text field set. - */ - public Content fromString(String text) { - return fromStringWithRole(role, text); - } - - /** - * Creates a content from an array of Objects. - * - * @param multiModalData an array which contains the actual payload of each part. The element - * could be either a single String or a Part. When it's a single string, it's converted to a - * {@link com.google.cloud.vertexai.api.Part} that has the Text field set. - */ - public Content fromMultiModalData(Object... multiModalData) { - return fromMultiModalDataWithRole(role, multiModalData); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMaker.java deleted file mode 100644 index 610c82323468..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMaker.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.cloud.vertexai.api.FunctionDeclaration; -import com.google.cloud.vertexai.api.Schema; -import com.google.cloud.vertexai.api.Type; -import com.google.common.base.Strings; -import com.google.gson.JsonObject; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.util.JsonFormat; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.Parameter; - -/** - * Helper class to create {@link com.google.cloud.vertexai.api.FunctionDeclaration} - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class FunctionDeclarationMaker { - - /** - * Creates a FunctionDeclaration from a JsonString - * - * @param jsonString A valid Json String that can be parsed to a FunctionDeclaration. - * @return a {@link FunctionDeclaration} by parsing the input json String. - * @throws InvalidProtocolBufferException if the String can't be parsed into a FunctionDeclaration - * proto. - */ - public static FunctionDeclaration fromJsonString(String jsonString) - throws InvalidProtocolBufferException { - checkArgument(!Strings.isNullOrEmpty(jsonString), "Input String can't be null or empty."); - FunctionDeclaration.Builder builder = FunctionDeclaration.newBuilder(); - JsonFormat.parser().merge(jsonString, builder); - FunctionDeclaration declaration = builder.build(); - if (declaration.getName().isEmpty()) { - throw new IllegalArgumentException("name field must be present."); - } - return declaration; - } - - /** - * Creates a FunctionDeclaration from a JsonObject - * - * @param jsonObject A valid Json Object that can be parsed to a FunctionDeclaration. - * @return a {@link FunctionDeclaration} by parsing the input json Object. - * @throws InvalidProtocolBufferException if the jsonObject can't be parsed into a - * FunctionDeclaration proto. - */ - public static FunctionDeclaration fromJsonObject(JsonObject jsonObject) - throws InvalidProtocolBufferException { - checkNotNull(jsonObject, "JsonObject can't be null."); - return fromJsonString(jsonObject.toString()); - } - - /** - * Creates a FunctionDeclaration from a Java static method - * - *

Note:: If you don't want to manually provide parameter names, you can ignore - * `orderedParameterNames` and compile your code with the "-parameters" flag. In this case, the - * parameter names can be auto retrieved from reflection. - * - * @param functionDescription A description of the method. - * @param function A Java static method. - * @param orderedParameterNames A list of parameter names in the order they are passed to the - * method. - * @return a {@link com.google.cloud.vertexai.api.FunctionDeclaration} instance. - * @throws IllegalArgumentException if the method is not a static method or the number of provided - * parameter names doesn't match the number of parameters in the callable function or - * parameter types in this method are not String, boolean, int, double, or float. - * @throws IllegalStateException if the parameter names are not provided and cannot be retrieved - * from reflection - */ - public static FunctionDeclaration fromFunc( - String functionDescription, Method function, String... orderedParameterNames) { - if (!Modifier.isStatic(function.getModifiers())) { - throw new IllegalArgumentException( - "Instance methods are not supported. Please use static methods."); - } - Schema.Builder parametersBuilder = Schema.newBuilder().setType(Type.OBJECT); - - Parameter[] parameters = function.getParameters(); - // If parameter names are provided, the number of parameter names should match the number of - // parameters in the method. - if (orderedParameterNames.length > 0 && orderedParameterNames.length != parameters.length) { - throw new IllegalArgumentException( - "The number of parameter names does not match the number of parameters in the method."); - } - - for (int i = 0; i < parameters.length; i++) { - if (orderedParameterNames.length == 0) { - // If parameter names are not provided, try to retrieve them from reflection. - if (!parameters[i].isNamePresent()) { - throw new IllegalStateException( - "Failed to retrieve the parameter name from reflection. Please compile your" - + " code with \"-parameters\" flag or use `fromFunc(String, Method," - + " String...)` to manually enter parameter names"); - } - addParameterToParametersBuilder( - parametersBuilder, parameters[i].getName(), parameters[i].getType()); - } else { - addParameterToParametersBuilder( - parametersBuilder, orderedParameterNames[i], parameters[i].getType()); - } - } - - return FunctionDeclaration.newBuilder() - .setName(function.getName()) - .setDescription(functionDescription) - .setParameters(parametersBuilder) - .build(); - } - - /** Adds a parameter to the parameters builder. */ - private static void addParameterToParametersBuilder( - Schema.Builder parametersBuilder, String parameterName, Class parameterType) { - Schema.Builder parameterBuilder = Schema.newBuilder().setDescription(parameterName); - switch (parameterType.getName()) { - case "java.lang.String": - parameterBuilder.setType(Type.STRING); - break; - case "boolean": - parameterBuilder.setType(Type.BOOLEAN); - break; - case "int": - parameterBuilder.setType(Type.INTEGER); - break; - case "double": - case "float": - parameterBuilder.setType(Type.NUMBER); - break; - default: - throw new IllegalArgumentException( - "Unsupported parameter type " - + parameterType.getName() - + " for parameter " - + parameterName); - } - parametersBuilder - .addRequired(parameterName) - .putProperties(parameterName, parameterBuilder.build()); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java deleted file mode 100644 index 323e8df9f4d0..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java +++ /dev/null @@ -1,696 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.Tool; -import com.google.cloud.vertexai.api.ToolConfig; -import com.google.common.base.Strings; -import com.google.common.collect.ImmutableList; -import com.google.errorprone.annotations.CanIgnoreReturnValue; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - -/** - * This class holds a generative model that can complete what you provided. This class is - * thread-safe. - * - *

Note: The instances of {@link ChatSession} returned by {@link GenerativeModel#startChat()} are - * NOT thread-safe. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class GenerativeModel { - private final String modelName; - private final String resourceName; - private final VertexAI vertexAi; - private final GenerationConfig generationConfig; - private final ImmutableList safetySettings; - private final ImmutableList tools; - private final Optional toolConfig; - private final Optional systemInstruction; - - /** - * Constructs a GenerativeModel instance. - * - * @param modelName the name of the generative model. Supported format: "gemini-pro", - * "models/gemini-pro", "publishers/google/models/gemini-pro", where "gemini-pro" is the model - * name. Valid model names can be found at - * https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models - * @param vertexAi a {@link com.google.cloud.vertexai.VertexAI} that contains the default configs - * for the generative model - */ - public GenerativeModel(String modelName, VertexAI vertexAi) { - this( - modelName, - GenerationConfig.getDefaultInstance(), - ImmutableList.of(), - ImmutableList.of(), - Optional.empty(), - Optional.empty(), - vertexAi); - } - - /** - * Constructs a GenerativeModel instance with default generation config and safety settings. - * - * @param modelName the name of the generative model. Supported format: "gemini-pro", - * "models/gemini-pro", "publishers/google/models/gemini-pro" - * @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} instance that - * will be used by default for generating response - * @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} instances - * that will be used by default for generating response - * @param tools a list of {@link com.google.cloud.vertexai.api.Tool} instances that can be used by - * the model as auxiliary tools to generate content. - * @param toolConfig a {@link com.google.cloud.vertexai.api.ToolConfig} instance that will be used - * to specify the tool configuration. - * @param systemInstruction a {@link com.google.cloud.vertexai.api.Content} instance that will be - * used by default for generating response. - * @param vertexAi a {@link com.google.cloud.vertexai.VertexAI} that contains the default configs - * for the generative model - */ - private GenerativeModel( - String modelName, - GenerationConfig generationConfig, - ImmutableList safetySettings, - ImmutableList tools, - Optional toolConfig, - Optional systemInstruction, - VertexAI vertexAi) { - checkArgument( - !Strings.isNullOrEmpty(modelName), - "modelName can't be null or empty. Please refer to" - + " https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models" - + " to find the right model name."); - checkNotNull(vertexAi, "VertexAI can't be null."); - checkNotNull(generationConfig, "GenerationConfig can't be null."); - checkNotNull(safetySettings, "ImmutableList can't be null."); - checkNotNull(tools, "ImmutableList can't be null."); - checkNotNull(toolConfig, "Optional can't be null."); - checkNotNull(systemInstruction, "Optional can't be null."); - - this.resourceName = getResourceName(modelName, vertexAi); - // reconcileModelName should be called after getResourceName. - this.modelName = reconcileModelName(modelName); - this.vertexAi = vertexAi; - this.generationConfig = generationConfig; - this.safetySettings = safetySettings; - this.tools = tools; - this.toolConfig = toolConfig; - // We remove the role in the system instruction content because it's officially documented - // to be used without role specified: - // https://cloud.google.com/vertex-ai/generative-ai/docs/samples/generativeaionvertexai-gemini-system-instruction - // However, it's safe to have the role specified since it's currently ignored by - // the API. We don't want to be more restrictive than the API but also we - // don't want to depend on the API implementation detail. Thus we remove the - // role here. - if (systemInstruction.isPresent()) { - this.systemInstruction = - Optional.of(removeRoleInSystemInstructionContent(systemInstruction.get())); - } else { - this.systemInstruction = Optional.empty(); - } - } - - /** Builder class for {@link GenerativeModel}. */ - public static class Builder { - private String modelName; - private VertexAI vertexAi; - private GenerationConfig generationConfig = GenerationConfig.getDefaultInstance(); - private ImmutableList safetySettings = ImmutableList.of(); - private ImmutableList tools = ImmutableList.of(); - private Optional toolConfig = Optional.empty(); - private Optional systemInstruction = Optional.empty(); - - public GenerativeModel build() { - checkArgument( - !Strings.isNullOrEmpty(modelName), - "modelName is required. Please call setModelName() before building."); - checkNotNull(vertexAi, "vertexAi is required. Please call setVertexAi() before building."); - return new GenerativeModel( - modelName, - generationConfig, - safetySettings, - tools, - toolConfig, - systemInstruction, - vertexAi); - } - - /** - * Sets the name of the generative model. This is required for building a GenerativeModel - * instance. Supported format: "gemini-pro", "models/gemini-pro", - * "publishers/google/models/gemini-pro", where "gemini-pro" is the model name. Valid model - * names can be found in the Gemini models documentation: - * https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models - */ - @CanIgnoreReturnValue - public Builder setModelName(String modelName) { - checkArgument( - !Strings.isNullOrEmpty(modelName), - "modelName can't be null or empty. Please refer to" - + " https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models" - + " to find the right model name."); - - this.modelName = modelName; - return this; - } - - /** - * Sets {@link com.google.cloud.vertexai.VertexAI} that contains the default configs for the - * generative model. This is required for building a GenerativeModel instance. - */ - @CanIgnoreReturnValue - public Builder setVertexAi(VertexAI vertexAi) { - checkNotNull(vertexAi, "VertexAI can't be null."); - this.vertexAi = vertexAi; - return this; - } - - /** - * Sets {@link com.google.cloud.vertexai.api.GenerationConfig} that will be used by default to - * interact with the generative model. - */ - @CanIgnoreReturnValue - public Builder setGenerationConfig(GenerationConfig generationConfig) { - checkNotNull(generationConfig, "GenerationConfig can't be null."); - this.generationConfig = generationConfig; - return this; - } - - /** - * Sets a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will be used by - * default to interact with the generative model. - */ - @CanIgnoreReturnValue - public Builder setSafetySettings(List safetySettings) { - checkNotNull( - safetySettings, - "safetySettings can't be null. Use an empty list if no safety settings is intended."); - this.safetySettings = ImmutableList.copyOf(safetySettings); - return this; - } - - /** - * Sets a list of {@link com.google.cloud.vertexai.api.Tool} that will be used by default to - * interact with the generative model. - */ - @CanIgnoreReturnValue - public Builder setTools(List tools) { - checkNotNull(tools, "tools can't be null. Use an empty list if no tool is to be used."); - this.tools = ImmutableList.copyOf(tools); - return this; - } - - /** - * Sets a {@link com.google.cloud.vertexai.api.ToolConfig} that will be used by default to - * interact with the generative model. - */ - @CanIgnoreReturnValue - public Builder setToolConfig(ToolConfig toolConfig) { - checkNotNull( - toolConfig, - "toolConfig can't be null. Use Optional.empty() if no tool config is intended."); - this.toolConfig = Optional.of(toolConfig); - return this; - } - - /** - * Sets a system instruction that will be used by default to interact with the generative model. - */ - @CanIgnoreReturnValue - public Builder setSystemInstruction(Content systemInstruction) { - checkNotNull( - systemInstruction, - "system instruction can't be null. " - + "Use Optional.empty() if no system instruction should be provided."); - this.systemInstruction = Optional.of(systemInstruction); - return this; - } - } - - /** - * Creates a copy of the current model with updated GenerationConfig. - * - * @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} that will be - * used in the new model. - * @return a new {@link GenerativeModel} instance with the specified GenerationConfig. - */ - public GenerativeModel withGenerationConfig(GenerationConfig generationConfig) { - checkNotNull(generationConfig, "GenerationConfig can't be null."); - return new GenerativeModel( - modelName, - generationConfig, - safetySettings, - tools, - toolConfig, - systemInstruction, - vertexAi); - } - - /** - * Creates a copy of the current model with updated safetySettings. - * - * @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will - * be used in the new model. - * @return a new {@link GenerativeModel} instance with the specified safetySettings. - */ - public GenerativeModel withSafetySettings(List safetySettings) { - checkNotNull( - safetySettings, - "safetySettings can't be null. Use an empty list if no safety settings is intended."); - return new GenerativeModel( - modelName, - generationConfig, - ImmutableList.copyOf(safetySettings), - tools, - toolConfig, - systemInstruction, - vertexAi); - } - - /** - * Creates a copy of the current model with updated tools. - * - * @param tools a list of {@link com.google.cloud.vertexai.api.Tool} that will be used in the new - * model. - * @return a new {@link GenerativeModel} instance with the specified tools. - */ - public GenerativeModel withTools(List tools) { - checkNotNull(tools, "tools can't be null. Use an empty list if no tool is to be used."); - return new GenerativeModel( - modelName, - generationConfig, - safetySettings, - ImmutableList.copyOf(tools), - toolConfig, - systemInstruction, - vertexAi); - } - - /** - * Creates a copy of the current model with updated tool config. - * - * @param toolConfig a {@link com.google.cloud.vertexai.api.ToolConfig} that will be used in the - * new model. - * @return a new {@link GenerativeModel} instance with the specified tool config. - */ - public GenerativeModel withToolConfig(ToolConfig toolConfig) { - checkNotNull( - toolConfig, - "toolConfig can't be null. Use Optional.empty() if no tool config is intended."); - return new GenerativeModel( - modelName, - generationConfig, - safetySettings, - tools, - Optional.of(toolConfig), - systemInstruction, - vertexAi); - } - - /** - * Creates a copy of the current model with updated system instructions. - * - * @param systemInstruction a {@link com.google.cloud.vertexai.api.Content} containing system - * instructions. - * @return a new {@link GenerativeModel} instance with the specified tools. - */ - public GenerativeModel withSystemInstruction(Content systemInstruction) { - checkNotNull( - systemInstruction, - "system instruction can't be null. " - + "Use Optional.empty() if no system instruction should be provided."); - return new GenerativeModel( - modelName, - generationConfig, - safetySettings, - tools, - toolConfig, - Optional.of(systemInstruction), - vertexAi); - } - - /** - * Counts tokens in a text message. - * - * @param text a text message to count tokens - * @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the - * total tokens and total billable characters of the given list of contents - * @throws IOException if an I/O error occurs while making the API call - */ - @BetaApi - public CountTokensResponse countTokens(String text) throws IOException { - return countTokens(ContentMaker.fromString(text)); - } - - /** - * Counts tokens in a single content. - * - * @param content a {@link com.google.cloud.vertexai.api.Content} to count tokens - * @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the - * total tokens and total billable characters of the given list of contents - * @throws IOException if an I/O error occurs while making the API call - */ - @BetaApi - public CountTokensResponse countTokens(Content content) throws IOException { - return countTokens(Arrays.asList(content)); - } - - /** - * Counts tokens in a list of contents. - * - * @param contents a list of {@link com.google.cloud.vertexai.api.Content} to count tokens - * @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the - * total tokens and total billable characters of the given list of contents - * @throws IOException if an I/O error occurs while making the API call - */ - @BetaApi - public CountTokensResponse countTokens(List contents) throws IOException { - checkArgument(contents != null && !contents.isEmpty(), "contents can't be null or empty."); - CountTokensRequest request = - CountTokensRequest.newBuilder() - .setEndpoint(resourceName) - .setModel(resourceName) - .addAllContents(contents) - .build(); - return countTokensFromRequest(request); - } - - /** - * Sends CountTokensRequest given a request message. - * - * @param request a {@link com.google.cloud.vertexai.api.CountTokensRequest} that contains a list - * of contents - * @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the - * total tokens and total billable characters of the given list of contents - * @throws IOException if an I/O error occurs while making the API call - */ - private CountTokensResponse countTokensFromRequest(CountTokensRequest request) - throws IOException { - return vertexAi.getLlmUtilityClient().countTokens(request); - } - - /** - * Generates content from generative model given a text. - * - * @param text a text message to send to the generative model - * @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains - * response contents and other metadata - * @throws IOException if an I/O error occurs while making the API call - */ - public GenerateContentResponse generateContent(String text) throws IOException { - return generateContent(ContentMaker.fromString(text)); - } - - /** - * Generates content from this model given a single content. - * - * @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model - * @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains - * response contents and other metadata - * @throws IOException if an I/O error occurs while making the API call - */ - public GenerateContentResponse generateContent(Content content) throws IOException { - return generateContent(Arrays.asList(content)); - } - - /** - * Generates content from this model given a list of contents. - * - * @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the - * generative model - * @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains - * response contents and other metadata - * @throws IOException if an I/O error occurs while making the API call - */ - public GenerateContentResponse generateContent(List contents) throws IOException { - return generateContent(buildGenerateContentRequest(contents)); - } - - /** - * A base generateContent method that will be used internally. - * - * @param request a {@link com.google.cloud.vertexai.api.GenerateContentRequest} instance - * @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains - * response contents and other metadata - * @throws IOException if an I/O error occurs while making the API call - */ - private GenerateContentResponse generateContent(GenerateContentRequest request) - throws IOException { - return vertexAi.getPredictionServiceClient().generateContentCallable().call(request); - } - - /** - * Generates content with streaming support from generative model given a text. - * - * @param text a text message to send to the generative model - * @return a {@link ResponseStream} that contains a streaming of {@link - * com.google.cloud.vertexai.api.GenerateContentResponse} - * @throws IOException if an I/O error occurs while making the API call - */ - public ResponseStream generateContentStream(String text) - throws IOException { - return generateContentStream(ContentMaker.fromString(text)); - } - - /** - * Generates content with streaming support from generative model given a single Content. - * - * @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model. - * The role of the content is "user". - * @return a {@link ResponseStream} that contains a streaming of {@link - * com.google.cloud.vertexai.api.GenerateContentResponse} - * @throws IOException if an I/O error occurs while making the API call - */ - public ResponseStream generateContentStream(Content content) - throws IOException { - return generateContentStream(Arrays.asList(content)); - } - - /** - * Generates content with streaming support from generative model given a list of contents. - * - * @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the - * generative model - * @return a {@link ResponseStream} that contains a streaming of {@link - * com.google.cloud.vertexai.api.GenerateContentResponse} - * @throws IOException if an I/O error occurs while making the API call - */ - public ResponseStream generateContentStream(List contents) - throws IOException { - return generateContentStream(buildGenerateContentRequest(contents)); - } - - /** - * A base generateContentStream method that will be used internally. - * - * @param request a {@link com.google.cloud.vertexai.api.GenerateContentRequest} instance - * @return a {@link ResponseStream} that contains a streaming of {@link - * com.google.cloud.vertexai.api.GenerateContentResponse} - * @throws IOException if an I/O error occurs while making the API call - */ - private ResponseStream generateContentStream( - GenerateContentRequest request) throws IOException { - return new ResponseStream( - new ResponseStreamIteratorWithHistory( - vertexAi - .getPredictionServiceClient() - .streamGenerateContentCallable() - .call(request) - .iterator())); - } - - /** - * Asynchronously generates content from generative model given a text. - * - * @param text a text message to send to the generative model - * @return a {@link com.google.api.core.ApiFuture} represents the response of an asynchronous - * generateContent request - * @throws IOException if an I/O error occurs while making the API call - */ - public ApiFuture generateContentAsync(String text) throws IOException { - return generateContentAsync(ContentMaker.fromString(text)); - } - - /** - * Asynchronously generates content from generative model given a single Content. - * - * @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model. - * The role of the content is "user". - * @return a {@link com.google.api.core.ApiFuture} represents the response of an asynchronous - * generateContent request - * @throws IOException if an I/O error occurs while making the API call - */ - public ApiFuture generateContentAsync(Content content) - throws IOException { - return generateContentAsync(Arrays.asList(content)); - } - - /** - * Asynchronously generates content from generative model given a list of contents. - * - * @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the - * generative model - * @return a {@link com.google.api.core.ApiFuture} represents the response of an asynchronous - * generateContent request - * @throws IOException if an I/O error occurs while making the API call - */ - public ApiFuture generateContentAsync(List contents) - throws IOException { - return generateContentAsync(buildGenerateContentRequest(contents)); - } - - /** - * A base generateContentAsync method that will be used internally. - * - * @param request a {@link com.google.cloud.vertexai.api.GenerateContentRequest} instance - * @return a {@link com.google.api.core.ApiFuture} represents the response of an asynchronous - * generateContent request - * @throws IOException if an I/O error occurs while making the API call - */ - private ApiFuture generateContentAsync(GenerateContentRequest request) - throws IOException { - return vertexAi.getPredictionServiceClient().generateContentCallable().futureCall(request); - } - - /** - * Removes the role in the system instruction content. - * - * @param systemInstruction a {@link com.google.cloud.vertexai.api.Content} instance - * @return a {@link com.google.cloud.vertexai.api.Content} instance with the role removed - */ - private Content removeRoleInSystemInstructionContent(Content systemInstruction) { - return systemInstruction.toBuilder().clearRole().build(); - } - - /** - * Builds a {@link com.google.cloud.vertexai.api.GenerateContentRequest} based on a list of - * contents and model configurations. - */ - private GenerateContentRequest buildGenerateContentRequest(List contents) { - checkArgument(contents != null && !contents.isEmpty(), "contents can't be null or empty."); - GenerateContentRequest.Builder requestBuilder = - GenerateContentRequest.newBuilder() - .setModel(resourceName) - .addAllContents(contents) - .setGenerationConfig(generationConfig) - .addAllSafetySettings(safetySettings) - .addAllTools(tools); - - if (toolConfig.isPresent()) { - requestBuilder.setToolConfig(toolConfig.get()); - } - - if (systemInstruction.isPresent()) { - requestBuilder.setSystemInstruction(systemInstruction.get()); - } - - return requestBuilder.build(); - } - - /** Returns the model name of this generative model. */ - public String getModelName() { - return this.modelName; - } - - /** - * Returns the {@link com.google.cloud.vertexai.api.GenerationConfig} of this generative model. - */ - public GenerationConfig getGenerationConfig() { - return this.generationConfig; - } - - /** - * Returns a list of {@link com.google.cloud.vertexai.api.SafetySetting} of this generative model. - */ - public ImmutableList getSafetySettings() { - return safetySettings; - } - - /** Returns a list of {@link com.google.cloud.vertexai.api.Tool} of this generative model. */ - public ImmutableList getTools() { - return tools; - } - - /** - * Returns the optional {@link com.google.cloud.vertexai.api.ToolConfig} of this generative model. - */ - public Optional getToolConfig() { - return toolConfig; - } - - /** Returns the optional system instruction of this generative model. */ - public Optional getSystemInstruction() { - return systemInstruction; - } - - /** - * Returns a new {@link ChatSession} instance that can be used to start a chat with this model. - * - *

Note: the returned {@link ChatSession} instance is NOT thread-safe. - */ - public ChatSession startChat() { - return new ChatSession(this); - } - - /** Keeps the model name only, if users specify the resource name, and returns the model name. */ - private static String reconcileModelName(String modelName) { - for (String prefix : Constants.MODEL_NAME_PREFIXES) { - if (modelName.startsWith(prefix)) { - modelName = modelName.substring(modelName.lastIndexOf('/') + 1); - break; - } - } - return modelName; - } - - /** - * Computes resourceName based on original modelName. Note: this should happen before the - * modelName is reconciled. - */ - private static String getResourceName(String modelName, VertexAI vertexAi) { - if (modelName.startsWith(Constants.MODEL_NAME_PREFIX_PROJECTS)) { - return modelName; - } else if (modelName.startsWith(Constants.MODEL_NAME_PREFIX_PUBLISHERS)) { - return String.format( - "projects/%s/locations/%s/%s", - vertexAi.getProjectId(), vertexAi.getLocation(), modelName); - } else { - return String.format( - "projects/%s/locations/%s/publishers/google/models/%s", - vertexAi.getProjectId(), vertexAi.getLocation(), reconcileModelName(modelName)); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java deleted file mode 100644 index fa4bbe181ad3..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import com.google.cloud.vertexai.api.Blob; -import com.google.cloud.vertexai.api.FileData; -import com.google.cloud.vertexai.api.FunctionResponse; -import com.google.cloud.vertexai.api.Part; -import com.google.protobuf.ByteString; -import com.google.protobuf.NullValue; -import com.google.protobuf.Struct; -import com.google.protobuf.Value; -import java.net.URI; -import java.util.Map; - -/** - * Helper class to create {@link com.google.cloud.vertexai.api.Part} - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public class PartMaker { - - private PartMaker() {} - - /** - * Makes a {@link com.google.cloud.vertexai.api.Part} from mimeType and data (or link to the - * data). - * - * @param mimeType currently accepted values are "image/png", "image/jpeg", "video/mp4", - * "video/mpeg", "video/quicktime", "video/x-msvideo", "video/x-ms-wmv", "video/x-flv" - * @param partData the following types can be accepted. - *

    - *
  • a String representing the uri of the data. Resulting Part will have fileData field - * set. - *
  • a GCS URI object. Resulting Part will have fileData field set. - *
  • byte arrays that represents the actual data. Resulting Part will have inlineData - * field set. - *
  • com.google.protobuf.ByteString that represents the actual data. Resulting Part will - * have inlineData field set. - *
- */ - public static Part fromMimeTypeAndData(String mimeType, Object partData) { - Part part; - if (partData instanceof byte[]) { - byte[] bytes = (byte[]) partData; - ByteString byteData = ByteString.copyFrom(bytes); - part = - Part.newBuilder() - .setInlineData(Blob.newBuilder().setMimeType(mimeType).setData(byteData)) - .build(); - } else if (partData instanceof String) { - String uri = (String) partData; - part = - Part.newBuilder() - .setFileData(FileData.newBuilder().setMimeType(mimeType).setFileUri(uri)) - .build(); - } else if (partData instanceof URI) { - URI uri = (URI) partData; - part = - Part.newBuilder() - .setFileData(FileData.newBuilder().setMimeType(mimeType).setFileUri(uri.toString())) - .build(); - } else if (partData instanceof ByteString) { - ByteString byteData = (ByteString) partData; - part = - Part.newBuilder() - .setInlineData(Blob.newBuilder().setMimeType(mimeType).setData(byteData)) - .build(); - } else { - throw new IllegalArgumentException( - "The second element of the input List can only be one of the following format:" - + " byte[], String, URI, ByteString"); - } - return part; - } - - /** - * Makes a {@link com.google.cloud.vertexai.api.Part} from the output of {@link - * com.google.cloud.vertexai.api.FunctionCall}. - * - * @param name a string represents the name of the {@link - * com.google.cloud.vertexai.api.FunctionDeclaration} - * @param response a structured JSON object containing any output from the function call - */ - public static Part fromFunctionResponse(String name, Struct response) { - return Part.newBuilder() - .setFunctionResponse(FunctionResponse.newBuilder().setName(name).setResponse(response)) - .build(); - } - - /** - * Makes a {@link com.google.cloud.vertexai.api.Part} from the result output of {@link - * com.google.cloud.vertexai.api.FunctionCall}. - * - * @param name a string represents the name of the {@link - * com.google.cloud.vertexai.api.FunctionDeclaration} - * @param response a map containing the output from the function call, supported output type: - * String, Double, Boolean, null - */ - public static Part fromFunctionResponse(String name, Map response) { - Struct.Builder structBuilder = Struct.newBuilder(); - response.forEach( - (key, value) -> { - if (value instanceof String) { - String stringValue = (String) value; - structBuilder.putFields(key, Value.newBuilder().setStringValue(stringValue).build()); - } else if (value instanceof Number) { - // Convert a number to a double value since the proto only supports double. - double doubleValue = ((Number) value).doubleValue(); - structBuilder.putFields(key, Value.newBuilder().setNumberValue(doubleValue).build()); - } else if (value instanceof Boolean) { - Boolean boolValue = (Boolean) value; - structBuilder.putFields(key, Value.newBuilder().setBoolValue(boolValue).build()); - } else if (value == null) { - structBuilder.putFields( - key, Value.newBuilder().setNullValue(NullValue.NULL_VALUE).build()); - } else { - throw new IllegalArgumentException( - "The value in the map can only be one of the following format: " - + "String, Number, Boolean, null."); - } - }); - - return Part.newBuilder() - .setFunctionResponse(FunctionResponse.newBuilder().setName(name).setResponse(structBuilder)) - .build(); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseHandler.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseHandler.java deleted file mode 100644 index e1fee3712589..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseHandler.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import com.google.cloud.vertexai.api.Candidate; -import com.google.cloud.vertexai.api.Candidate.FinishReason; -import com.google.cloud.vertexai.api.Citation; -import com.google.cloud.vertexai.api.CitationMetadata; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.Part; -import com.google.common.collect.ImmutableList; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Helper class to post-process GenerateContentResponse. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public class ResponseHandler { - - /** - * Gets the text message in a GenerateContentResponse. - * - * @param response a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance - * @return a String that aggregates all the text parts in the response - * @throws IllegalArgumentException if the response has 0 or more than 1 candidates, or if the - * response is blocked by safety reason or unauthorized citations - */ - public static String getText(GenerateContentResponse response) { - checkFinishReason(getFinishReason(response)); - - String text = ""; - List parts = response.getCandidates(0).getContent().getPartsList(); - for (Part part : parts) { - text += part.getText(); - } - - return text; - } - - /** - * Gets the list of function calls in a GenerateContentResponse. - * - * @param response a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance - * @return a list of {@link com.google.cloud.vertexai.api.FunctionCall} in the response - * @throws IllegalArgumentException if the response has 0 or more than 1 candidates - */ - public static ImmutableList getFunctionCalls(GenerateContentResponse response) { - getFinishReason(response); - return response.getCandidates(0).getContent().getPartsList().stream() - .filter((part) -> part.hasFunctionCall()) - .map((part) -> part.getFunctionCall()) - .collect(ImmutableList.toImmutableList()); - } - - /** - * Gets the content in a GenerateContentResponse. - * - * @param response a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance - * @return the {@link com.google.cloud.vertexai.api.Content} in the response - * @throws IllegalArgumentException if the response has 0 or more than 1 candidates, or if the - * response is blocked by safety reason or unauthorized citations - */ - public static Content getContent(GenerateContentResponse response) { - checkFinishReason(getFinishReason(response)); - - return response.getCandidates(0).getContent(); - } - - /** - * Gets the finish reason in a GenerateContentResponse. - * - * @param response a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance - * @return the {@link com.google.cloud.vertexai.api.FinishReason} in the response - * @throws IllegalArgumentException if the response has 0 or more than 1 candidates - */ - public static FinishReason getFinishReason(GenerateContentResponse response) { - if (response.getCandidatesCount() != 1) { - throw new IllegalArgumentException( - String.format( - "This response should have exactly 1 candidate, but it has %s.", - response.getCandidatesCount())); - } - return response.getCandidates(0).getFinishReason(); - } - - /** Aggregates a stream of responses into a single GenerateContentResponse. */ - static GenerateContentResponse aggregateStreamIntoResponse( - ResponseStream responseStream) { - GenerateContentResponse res = GenerateContentResponse.getDefaultInstance(); - Map candidates = new HashMap<>(); - Map> aggregatedContentParts = new HashMap<>(); - Map> aggregatedCitationMetadata = new HashMap<>(); - - for (GenerateContentResponse response : responseStream) { - res = response; - for (Candidate candidate : response.getCandidatesList()) { - // Keep track of candidates by index - int index = candidate.getIndex(); - candidates.put(index, candidate); - - // Aggregates parts - if (candidate.hasContent()) { - List parts = candidate.getContent().getPartsList(); - List aggregatedParts = - aggregatedContentParts.containsKey(index) - ? aggregatedContentParts.get(index) - : new ArrayList<>(); - if (aggregatedParts.size() == 0 || parts.size() == 0) { - aggregatedParts.addAll(parts); - } else { - Part aggregatedTailPart = aggregatedParts.get(aggregatedParts.size() - 1); - Part currentResponseHeadPart = parts.get(0); - if (!aggregatedTailPart.hasText() || !currentResponseHeadPart.hasText()) { - aggregatedParts.addAll(parts); - } else { - aggregatedParts.remove(aggregatedParts.size() - 1); - aggregatedParts.add( - Part.newBuilder() - .setText(aggregatedTailPart.getText() + currentResponseHeadPart.getText()) - .build()); - aggregatedParts.addAll(parts.subList(1, parts.size())); - } - } - aggregatedContentParts.put(index, aggregatedParts); - } - - // Aggregates citations - if (candidate.hasCitationMetadata()) { - List citations = candidate.getCitationMetadata().getCitationsList(); - List aggregatedCitations = - aggregatedCitationMetadata.containsKey(index) - ? aggregatedCitationMetadata.get(index) - : new ArrayList<>(); - aggregatedCitations.addAll(citations); - aggregatedCitationMetadata.put(index, aggregatedCitations); - } - } - } - - // Update candidates with aggregated data - List aggregatedCandidates = new ArrayList<>(); - candidates.forEach( - (index, candidate) -> { - Candidate.Builder candidateBuilder = candidate.toBuilder(); - if (aggregatedContentParts.containsKey(index)) { - candidateBuilder.setContent( - Content.newBuilder() - .setRole("model") - .addAllParts(aggregatedContentParts.get(index))); - } - if (aggregatedCitationMetadata.containsKey(index)) { - candidateBuilder.setCitationMetadata( - CitationMetadata.newBuilder() - .addAllCitations(aggregatedCitationMetadata.get(index))); - } - aggregatedCandidates.add(candidateBuilder.build()); - }); - - res = res.toBuilder().clearCandidates().addAllCandidates(aggregatedCandidates).build(); - - return res; - } - - private static void checkFinishReason(FinishReason finishReason) { - if (finishReason == FinishReason.SAFETY) { - throw new IllegalArgumentException("The response is blocked due to safety reason."); - } else if (finishReason == FinishReason.RECITATION) { - throw new IllegalArgumentException("The response is blocked due to unauthorized citations."); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java deleted file mode 100644 index 1fc5de8f5183..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.util.Iterator; -import java.util.stream.Stream; -import java.util.stream.StreamSupport; - -/** - * An iterable of GenerateContentResponse. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public class ResponseStream implements Iterable { - - private ResponseStreamIteratorWithHistory iteratorWithHistory; - private boolean consumingStarted = false; - - public ResponseStream(ResponseStreamIteratorWithHistory iteratorWithHistory) { - this.iteratorWithHistory = iteratorWithHistory; - } - - @Override - public Iterator iterator() throws IllegalStateException { - if (!consumingStarted) { - consumingStarted = true; - return iteratorWithHistory; - } else if (iteratorWithHistory.isConsumed()) { - return iteratorWithHistory.getHistory().iterator(); - } else { - throw new IllegalStateException("The stream is being consumed but hasn't finished."); - } - } - - /** Makes a stream from the instance. */ - public Stream stream() { - return StreamSupport.stream(this.spliterator(), false); - } - - /** - * Whether the content has been consumed. - * - *

"consumed" means all the content has been iterated through. - */ - public boolean isConsumed() { - return iteratorWithHistory.isConsumed(); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java deleted file mode 100644 index 58e0b8cfee7f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import com.google.cloud.vertexai.api.GenerateContentResponse; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * Iterator of the ResponseStream that holds the response chunks. - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public class ResponseStreamIteratorWithHistory - implements Iterator { - Iterator serverStreamIterator = null; - List history = new ArrayList<>(); - private boolean consumed = false; - - public ResponseStreamIteratorWithHistory(Iterator serverStreamIterator) { - this.serverStreamIterator = serverStreamIterator; - } - - @Override - public boolean hasNext() { - boolean hasNextResponse = serverStreamIterator.hasNext(); - consumed = !hasNextResponse; - return hasNextResponse; - } - - @Override - public GenerateContentResponse next() { - GenerateContentResponse nextItem = (GenerateContentResponse) serverStreamIterator.next(); - history.add(nextItem); - return nextItem; - } - - /** Retrieves all the chunks in a stream of responses. */ - public List getHistory() { - return history; - } - - /** - * Whether the whole stream has been consumed. - * - *

Here "consumed" means we have reached the end of the stream. - */ - public boolean isConsumed() { - return consumed; - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/SchemaMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/SchemaMaker.java deleted file mode 100644 index af2e8382e7c9..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/SchemaMaker.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.cloud.vertexai.api.Schema; -import com.google.common.base.Strings; -import com.google.gson.JsonObject; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.util.JsonFormat; - -/** - * Helper class to create {@link com.google.cloud.vertexai.api.Schema} - * - * @deprecated This class and its package are deprecated. See the - * migration guide for more details. - */ -@Deprecated -public final class SchemaMaker { - - private SchemaMaker() {} - - /** - * Creates a Schema from a JsonString - * - * @param jsonString A valid Json String that can be parsed to a Schema object. - * @return a {@link com.google.cloud.vertexai.api.Schema} by parsing the input JSON string. - * @throws InvalidProtocolBufferException if the String can't be parsed into a Schema proto. - */ - public static Schema fromJsonString(String jsonString) throws InvalidProtocolBufferException { - checkArgument(!Strings.isNullOrEmpty(jsonString), "Input String can't be null or empty."); - Schema.Builder builder = Schema.newBuilder(); - JsonFormat.parser().merge(jsonString, builder); - - return builder.build(); - } - - /** - * Creates a Schema from a JsonObject - * - * @param jsonObject A valid JSON object that can be parsed to a Schema object. - * @return a {@link com.google.cloud.vertexai.api.Schema} by parsing the input JSON object. - * @throws InvalidProtocolBufferException if the jsonObject can't be parsed into a Schema proto. - */ - public static Schema fromJsonObject(JsonObject jsonObject) throws InvalidProtocolBufferException { - checkNotNull(jsonObject, "JsonObject can't be null."); - return fromJsonString(jsonObject.toString()); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.api/reflect-config.json b/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.api/reflect-config.json deleted file mode 100644 index 365b2c790cd6..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.api/reflect-config.json +++ /dev/null @@ -1,6482 +0,0 @@ -[ - { - "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.PythonSettings$ExperimentalFeatures", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.api.PythonSettings$ExperimentalFeatures$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.api.SelectiveGapicGeneration", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.api.SelectiveGapicGeneration$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.vertexai.api.AcceleratorType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ApiAuth", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ApiAuth$ApiKeyConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ApiAuth$ApiKeyConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ApiAuth$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Attribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Attribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutomaticResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutomaticResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutoscalingMetricSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutoscalingMetricSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AvroSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AvroSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BatchDedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BatchDedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQueryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQueryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQuerySource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQuerySource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Blob", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Blob$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BlurBaselineConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BlurBaselineConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BoolArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BoolArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CachedContent", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CachedContent$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CachedContent$UsageMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CachedContent$UsageMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate$FinishReason", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Citation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Citation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CitationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CitationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ClientConnectionConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ClientConnectionConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CodeExecutionResult", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CodeExecutionResult$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CodeExecutionResult$Outcome", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ComputeTokensRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ComputeTokensRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ComputeTokensResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ComputeTokensResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ContainerRegistryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ContainerRegistryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Content", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Content$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CorpusStatus", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CorpusStatus$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CorpusStatus$State", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel$Status", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel$Status$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeploymentStage", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectUploadSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectUploadSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DnsPeeringConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DnsPeeringConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DoubleArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DoubleArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DynamicRetrievalConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DynamicRetrievalConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DynamicRetrievalConfig$Mode", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentRequest$EmbeddingTaskType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentResponse$Embedding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EmbedContentResponse$Embedding$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EncryptionSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EncryptionSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Endpoint", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Endpoint$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EnterpriseWebSearch", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EnterpriseWebSearch$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExecutableCode", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExecutableCode$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExecutableCode$Language", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Explanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Explanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Encoding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$FeatureValueDomain", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$FeatureValueDomain$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$ColorMap", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$OverlayType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Polarity", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$OutputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$OutputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$InputMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$InputMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationParameters", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationParameters$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpecOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpecOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FasterDeploymentConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FasterDeploymentConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$NoiseSigmaForFeature", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$NoiseSigmaForFeature$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileData", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileData$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileStatus", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileStatus$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileStatus$State", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCall", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCall$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCallingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCallingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCallingConfig$Mode", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionDeclaration", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionDeclaration$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponseBlob", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponseBlob$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponseFileData", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponseFileData$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponsePart", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponsePart$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig$RagConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig$RagConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback$BlockedReason", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$UsageMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$UsageMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$AutoRoutingMode", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$AutoRoutingMode$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$AutoRoutingMode$ModelRoutingPreference", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$ManualRoutingMode", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$RoutingConfig$ManualRoutingMode$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$ThinkingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$ThinkingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenericOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenericOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GetEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GetEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleDriveSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleDriveSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleDriveSource$ResourceId", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleDriveSource$ResourceId$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleDriveSource$ResourceId$ResourceType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleMaps", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleMaps$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleSearchRetrieval", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GoogleSearchRetrieval$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps$PlaceAnswerSources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps$PlaceAnswerSources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps$PlaceAnswerSources$ReviewSnippet", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Maps$PlaceAnswerSources$ReviewSnippet$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$RetrievedContext", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$RetrievedContext$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Web", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingChunk$Web$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingMetadata$SourceFlaggingUri", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingMetadata$SourceFlaggingUri$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingSupport", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GroundingSupport$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.HarmCategory", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ImageConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ImageConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ImportRagFilesConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ImportRagFilesConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Int64Array", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Int64Array$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.IntegratedGradientsAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.IntegratedGradientsAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.JiraSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.JiraSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.JiraSource$JiraQueries", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.JiraSource$JiraQueries$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult$Candidate", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult$Candidate$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult$TopCandidates", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LogprobsResult$TopCandidates$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LustreMount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.LustreMount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MachineSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MachineSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Modality", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModalityTokenCount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModalityTokenCount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelArmorConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelArmorConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelExplanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelExplanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Neighbor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Neighbor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.NfsMount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.NfsMount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PSCAutomationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PSCAutomationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PSCAutomationState", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Part", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Part$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PartialArg", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PartialArg$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PersistentDiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PersistentDiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrebuiltVoiceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrebuiltVoiceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Modality", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Query", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateEndpoints", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateEndpoints$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateServiceConnectConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateServiceConnectConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PscAutomatedEndpoints", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PscAutomatedEndpoints$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PscInterfaceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PscInterfaceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagChunk", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagChunk$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagChunk$PageSpan", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagChunk$PageSpan$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagCorpus", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagCorpus$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEmbeddingModelConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEmbeddingModelConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEmbeddingModelConfig$VertexPredictionEndpoint", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEmbeddingModelConfig$VertexPredictionEndpoint$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEngineConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagEngineConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFile", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFile$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileChunkingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileChunkingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileChunkingConfig$FixedLengthChunking", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileChunkingConfig$FixedLengthChunking$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig$LayoutParser", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig$LayoutParser$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig$LlmParser", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileParsingConfig$LlmParser$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileTransformationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagFileTransformationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Basic", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Basic$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Scaled", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Scaled$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Unprovisioned", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagManagedDbConfig$Unprovisioned$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Filter", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Filter$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking$LlmRanker", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking$LlmRanker$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking$RankService", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagRetrievalConfig$Ranking$RankService$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$Pinecone", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$Pinecone$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb$ANN", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb$ANN$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb$KNN", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$RagManagedDb$KNN$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$VertexVectorSearch", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RagVectorDbConfig$VertexVectorSearch$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ReplicatedVoiceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ReplicatedVoiceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ReservationAffinity", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ReservationAffinity$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ReservationAffinity$Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ResourcesConsumed", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ResourcesConsumed$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Retrieval", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Retrieval$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RetrievalConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RetrievalConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RetrievalMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RetrievalMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating$HarmProbability", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating$HarmSeverity", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting$HarmBlockMethod", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting$HarmBlockThreshold", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SampledShapleyAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SampledShapleyAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Schema", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Schema$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SearchEntryPoint", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SearchEntryPoint$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Segment", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Segment$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SharePointSources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SharePointSources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SharePointSources$SharePointSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SharePointSources$SharePointSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ShieldedVmConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ShieldedVmConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource$SlackChannels", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource$SlackChannels$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource$SlackChannels$SlackChannel", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SlackSource$SlackChannels$SlackChannel$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SmoothGradConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SmoothGradConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeakerVoiceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeakerVoiceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec$DraftModelSpeculation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec$DraftModelSpeculation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec$NgramSpeculation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeculativeDecodingSpec$NgramSpeculation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeechConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SpeechConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamDirectRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StringArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StringArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TFRecordDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TFRecordDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor$DataType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TokensInfo", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TokensInfo$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$CodeExecution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$CodeExecution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$ComputerUse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$ComputerUse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$ComputerUse$Environment", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$GoogleSearch", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$GoogleSearch$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$PhishBlockThreshold", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ToolConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ToolConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UploadRagFileConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UploadRagFileConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlContext", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlContext$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlContextMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlContextMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UrlMetadata$UrlRetrievalStatus", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UsageMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UsageMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UsageMetadata$TrafficType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAISearch", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAISearch$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAISearch$DataStoreSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAISearch$DataStoreSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAiSearchConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexAiSearchConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexRagStore", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexRagStore$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexRagStore$RagResource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VertexRagStore$RagResource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VideoMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VideoMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VoiceConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VoiceConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.XraiAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.XraiAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$LogType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse$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$Edition", - "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$FeatureSet", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", - "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$EditionDefault", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", - "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$SymbolVisibility", - "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 - }, - { - "name": "com.google.type.Expr", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.type.Expr$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.type.LatLng", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.type.LatLng$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - } -] \ No newline at end of file diff --git a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1/reflect-config.json b/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1/reflect-config.json deleted file mode 100644 index 9338f3e579dc..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1/reflect-config.json +++ /dev/null @@ -1,3431 +0,0 @@ -[ - { - "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.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.vertexai.v1.AcceleratorType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Attribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Attribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AutomaticResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AutomaticResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AutoscalingMetricSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AutoscalingMetricSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AvroSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.AvroSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BatchDedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BatchDedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BigQueryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BigQueryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BigQuerySource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BigQuerySource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Blob", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Blob$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BlurBaselineConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BlurBaselineConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BoolArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.BoolArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ContainerRegistryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ContainerRegistryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Content", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Content$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CountTokensRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CountTokensRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CountTokensResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CountTokensResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CreateEndpointOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CreateEndpointOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CreateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CreateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CsvDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CsvDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CsvSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.CsvSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeleteEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeleteEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeleteOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeleteOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployedModel", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DeployedModel$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DirectRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DoubleArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.DoubleArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.EncryptionSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.EncryptionSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Endpoint", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Endpoint$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Examples", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Examples$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Examples$ExampleGcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Examples$ExampleGcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Examples$ExampleGcsSource$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExamplesOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExamplesOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExamplesOverride$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExamplesRestrictionsNamespace", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExamplesRestrictionsNamespace$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplainRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplainRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplainResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplainResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Explanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Explanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Encoding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$FeatureValueDomain", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$FeatureValueDomain$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization$ColorMap", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization$OverlayType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization$Polarity", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$InputMetadata$Visualization$Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$OutputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadata$OutputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadataOverride$InputMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationMetadataOverride$InputMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationParameters", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationParameters$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationSpecOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ExplanationSpecOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FeatureNoiseSigma", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FeatureNoiseSigma$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FeatureNoiseSigma$NoiseSigmaForFeature", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FeatureNoiseSigma$NoiseSigmaForFeature$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FileData", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FileData$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FunctionCall", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FunctionCall$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FunctionResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.FunctionResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GcsDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GcsDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GenericOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GenericOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GetEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.GetEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Int64Array", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Int64Array$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.IntegratedGradientsAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.IntegratedGradientsAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ListEndpointsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ListEndpointsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ListEndpointsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ListEndpointsResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MachineSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MachineSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ModelExplanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ModelExplanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.MutateDeployedModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Neighbor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Neighbor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.NfsMount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.NfsMount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Part", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Part$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PersistentDiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PersistentDiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Presets", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Presets$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Presets$Modality", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Presets$Query", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PrivateEndpoints", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.PrivateEndpoints$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.RawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.RawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ResourcesConsumed", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.ResourcesConsumed$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.SampledShapleyAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.SampledShapleyAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.SmoothGradConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.SmoothGradConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StreamingRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StringArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.StringArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.TFRecordDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.TFRecordDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Tensor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Tensor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.Tensor$DataType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UndeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UpdateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.UpdateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.VideoMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.VideoMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.XraiAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.v1.XraiAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$LogType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse$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.Expr", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.type.Expr$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - } -] \ No newline at end of file diff --git a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1beta1/reflect-config.json b/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1beta1/reflect-config.json deleted file mode 100644 index 151803f13059..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/main/resources/META-INF/native-image/com.google.cloud.vertexai.v1beta1/reflect-config.json +++ /dev/null @@ -1,3755 +0,0 @@ -[ - { - "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.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.vertexai.api.AcceleratorType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Attribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Attribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutomaticResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutomaticResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutoscalingMetricSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AutoscalingMetricSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AvroSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.AvroSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BatchDedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BatchDedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQueryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQueryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQuerySource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BigQuerySource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Blob", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Blob$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BlurBaselineConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BlurBaselineConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BoolArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.BoolArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Candidate$FinishReason", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Citation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Citation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CitationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CitationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ContainerRegistryDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ContainerRegistryDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Content", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Content$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CountTokensResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CreateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.CsvSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DedicatedResources", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DedicatedResources$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeleteOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DeployedModel$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DirectRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DoubleArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.DoubleArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EncryptionSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.EncryptionSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Endpoint", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Endpoint$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Examples$ExampleGcsSource$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesOverride$DataFormat", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse$ConcurrentExplanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplainResponse$ConcurrentExplanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Explanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Explanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Encoding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$FeatureValueDomain", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$FeatureValueDomain$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$ColorMap", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$OverlayType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Polarity", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$InputMetadata$Visualization$Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$OutputMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadata$OutputMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$InputMetadataOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationMetadataOverride$InputMetadataOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationParameters", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationParameters$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpecOverride", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ExplanationSpecOverride$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$NoiseSigmaForFeature", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FeatureNoiseSigma$NoiseSigmaForFeature$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileData", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FileData$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCall", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionCall$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionDeclaration", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionDeclaration$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.FunctionResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsSource", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GcsSource$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback$BlockedReason", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$PromptFeedback$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$UsageMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerateContentResponse$UsageMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenerationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenericOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GenericOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GetEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.GetEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.HarmCategory", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Int64Array", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Int64Array$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.IntegratedGradientsAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.IntegratedGradientsAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ListEndpointsResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MachineSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MachineSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelExplanation", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ModelExplanation$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.MutateDeployedModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Neighbor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Neighbor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.NfsMount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.NfsMount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Part", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Part$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PersistentDiskSpec", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PersistentDiskSpec$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Modality", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Presets$Query", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateEndpoints", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.PrivateEndpoints$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.RawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ResourcesConsumed", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.ResourcesConsumed$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetyRating$HarmProbability", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SafetySetting$HarmBlockThreshold", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SampledShapleyAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SampledShapleyAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Schema", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Schema$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SmoothGradConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.SmoothGradConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StreamingRawPredictResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StringArray", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.StringArray$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TFRecordDestination", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.TFRecordDestination$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tensor$DataType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Tool$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.Type", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelOperationMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelOperationMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UndeployModelResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.UpdateEndpointRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VideoMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.VideoMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.XraiAttribution", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.vertexai.api.XraiAttribution$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditConfigDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.AuditLogConfig$LogType", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Binding$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Action", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.BindingDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.GetPolicyOptions$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.Policy$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.PolicyDelta$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.iam.v1.TestIamPermissionsResponse$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 - }, - { - "name": "com.google.type.Expr", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.type.Expr$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - } -] \ No newline at end of file diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/VertexAITest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/VertexAITest.java deleted file mode 100644 index 58a20773dc30..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/VertexAITest.java +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mockStatic; -import static org.mockito.Mockito.when; - -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.auth.oauth2.GoogleCredentials; -import com.google.cloud.vertexai.api.LlmUtilityServiceClient; -import com.google.cloud.vertexai.api.LlmUtilityServiceSettings; -import com.google.cloud.vertexai.api.PredictionServiceClient; -import com.google.cloud.vertexai.api.PredictionServiceSettings; -import com.google.common.collect.ImmutableList; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.MockedStatic; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -@RunWith(JUnit4.class) -public final class VertexAITest { - private static final String TEST_PROJECT = "test_project"; - private static final String TEST_LOCATION = "test_location"; - private static final String TEST_ENDPOINT = "test_endpoint"; - private static final String TEST_DEFAULT_ENDPOINT = - String.format("%s-aiplatform.googleapis.com", TEST_LOCATION); - private static final Optional EMPTY_ENV_VAR_OPTIONAL = Optional.ofNullable(null); - - private VertexAI vertexAi; - @Rule public final MockitoRule mocksRule = MockitoJUnit.rule(); - - @Mock private GoogleCredentials mockGoogleCredentials; - - @Mock private PredictionServiceClient mockPredictionServiceClient; - - @Mock private LlmUtilityServiceClient mockLlmUtilityServiceClient; - - @Mock private GoogleCredentialsProvider.Builder mockCredentialsProviderBuilder; - - @Mock private GoogleCredentialsProvider mockCredentialsProvider; - - @Test - public void testInstantiateVertexAI_usingConstructor_shouldContainRightFields() - throws IOException { - vertexAi = new VertexAI(TEST_PROJECT, TEST_LOCATION); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo(TEST_LOCATION); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo(TEST_DEFAULT_ENDPOINT); - } - - @Test - public void - testInstantiateVertexAI_usingConstructorNoArgsProjectEnvVarSet_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central1"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central1-aiplatform.googleapis.com"); - } - } - - @Test - public void - testInstantiateVertexAI_usingConstructorNoArgsProjectEnvVarNotSet_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class); - MockedStatic mockStaticPredictionServiceSettings = - mockStatic(PredictionServiceSettings.class); ) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticPredictionServiceSettings - .when(() -> PredictionServiceSettings.defaultCredentialsProviderBuilder()) - .thenReturn(mockCredentialsProviderBuilder); - when(mockCredentialsProviderBuilder.build()).thenReturn(mockCredentialsProvider); - when(mockCredentialsProvider.getCredentials()).thenReturn(mockGoogleCredentials); - when(mockGoogleCredentials.getQuotaProjectId()).thenReturn(TEST_PROJECT); - - vertexAi = new VertexAI(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central1"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central1-aiplatform.googleapis.com"); - } - } - - @Test - public void - testConstructor_noArgsCredentialsProviderThrowsIOException_shouldThrowIllegalArgumentException() - throws IOException { - try (MockedStatic mockStatic = mockStatic(PredictionServiceSettings.class)) { - final String expectedErrorMessage = - ("Unable to infer your project. Please provide a project Id by one of the following:" - + "\n- Passing a constructor argument by using new VertexAI(String projectId, String" - + " location)" - + "\n- Setting project using 'gcloud config set project my-project'"); - mockStatic - .when(() -> PredictionServiceSettings.defaultCredentialsProviderBuilder()) - .thenReturn(mockCredentialsProviderBuilder); - when(mockCredentialsProviderBuilder.build()).thenReturn(mockCredentialsProvider); - when(mockCredentialsProvider.getCredentials()).thenThrow(new IOException("")); - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> new VertexAI()); - assertThat(thrown).hasMessageThat().contains(expectedErrorMessage); - } - } - - @Test - public void - testInstantiateVertexAI_usingConstructorLocationFromGOOGLE_CLOUD_REGION_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(Optional.of("us-central2")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(Optional.of("us-central3")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central2"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central2-aiplatform.googleapis.com"); - } - } - - @Test - public void - testInstantiateVertexAI_usingConstructorLocationFromCLOUD_ML_REGION_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(Optional.of("us-central2")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central2"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central2-aiplatform.googleapis.com"); - } - } - - @Test - public void testInstantiateVertexAI_builderWithCredentials_shouldContainRightFields() - throws IOException { - vertexAi = - new VertexAI.Builder() - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .setCredentials(mockGoogleCredentials) - .build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo(TEST_LOCATION); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo(TEST_DEFAULT_ENDPOINT); - assertThat(vertexAi.getCredentials()).isEqualTo(mockGoogleCredentials); - } - - @Test - public void testInstantiateVertexAI_builderNoArgsProjectEnvVarSet_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI.Builder().build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central1"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central1-aiplatform.googleapis.com"); - } - } - - @Test - public void testInstantiateVertexAI_builderNoArgsProjectEnvVarNotSet_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class); - MockedStatic mockStaticPredictionServiceSettings = - mockStatic(PredictionServiceSettings.class); ) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticPredictionServiceSettings - .when(() -> PredictionServiceSettings.defaultCredentialsProviderBuilder()) - .thenReturn(mockCredentialsProviderBuilder); - when(mockCredentialsProviderBuilder.build()).thenReturn(mockCredentialsProvider); - when(mockCredentialsProvider.getCredentials()).thenReturn(mockGoogleCredentials); - when(mockGoogleCredentials.getQuotaProjectId()).thenReturn(TEST_PROJECT); - - vertexAi = new VertexAI.Builder().build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central1"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central1-aiplatform.googleapis.com"); - } - } - - @Test - public void - testBuilder_noArgsCredentialsProviderThrowsIOException_shouldThrowIllegalArgumentException() - throws IOException { - try (MockedStatic mockStaticPredictionServiceSettings = - mockStatic(PredictionServiceSettings.class)) { - final String expectedErrorMessage = - ("Unable to infer your project. Please provide a project Id by one of the following:" - + "\n- Passing a constructor argument by using new VertexAI(String projectId, String" - + " location)" - + "\n- Setting project using 'gcloud config set project my-project'"); - mockStaticPredictionServiceSettings - .when(() -> PredictionServiceSettings.defaultCredentialsProviderBuilder()) - .thenReturn(mockCredentialsProviderBuilder); - when(mockCredentialsProviderBuilder.build()).thenReturn(mockCredentialsProvider); - when(mockCredentialsProvider.getCredentials()).thenThrow(new IOException("")); - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> new VertexAI.Builder().build()); - assertThat(thrown).hasMessageThat().contains(expectedErrorMessage); - } - } - - @Test - public void - testInstantiateVertexAI_builderLocationFromGOOGLE_CLOUD_REGION_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(Optional.of("us-central2")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(Optional.of("us-central3")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI.Builder().build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central2"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central2-aiplatform.googleapis.com"); - } - } - - @Test - public void testInstantiateVertexAI_builderLocationFromCLOUD_ML_REGION_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStaticVertexAI = mockStatic(VertexAI.class)) { - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_REGION")) - .thenReturn(EMPTY_ENV_VAR_OPTIONAL); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("CLOUD_ML_REGION")) - .thenReturn(Optional.of("us-central2")); - mockStaticVertexAI - .when(() -> VertexAI.getEnvironmentVariable("GOOGLE_CLOUD_PROJECT")) - .thenReturn(Optional.of(TEST_PROJECT)); - - vertexAi = new VertexAI.Builder().build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo("us-central2"); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.GRPC); - assertThat(vertexAi.getApiEndpoint()).isEqualTo("us-central2-aiplatform.googleapis.com"); - } - } - - @Test - public void testInstantiateVertexAI_builderWithScopes_throwsIlegalArgumentException() - throws IllegalArgumentException { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - new VertexAI.Builder() - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .setCredentials(mockGoogleCredentials) - .setScopes(ImmutableList.of("test_scope")) - .build()); - assertThat(thrown) - .hasMessageThat() - .isEqualTo("At most one of Credentials and scopes should be specified."); - } - - @Test - public void testInstantiateVertexAI_builderWithEndpoint_shouldContainRightFields() - throws IOException { - try (MockedStatic mockStatic = mockStatic(PredictionServiceClient.class)) { - mockStatic - .when(() -> PredictionServiceClient.create(any(PredictionServiceSettings.class))) - .thenReturn(mockPredictionServiceClient); - - vertexAi = - new VertexAI.Builder() - .setApiEndpoint(TEST_ENDPOINT) - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .build(); - - PredictionServiceClient unused = vertexAi.getPredictionServiceClient(); - - ArgumentCaptor settings = - ArgumentCaptor.forClass(PredictionServiceSettings.class); - mockStatic.verify(() -> PredictionServiceClient.create(settings.capture())); - - assertThat(settings.getValue().getEndpoint()) - .isEqualTo(String.format("%s:443", TEST_ENDPOINT)); - } - } - - @Test - public void testInstantiateVertexAI_builderWithTransport_shouldContainRightFields() - throws IOException { - - vertexAi = - new VertexAI.Builder() - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .setTransport(Transport.REST) - .build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo(TEST_LOCATION); - assertThat(vertexAi.getTransport()).isEqualTo(Transport.REST); - assertThat(vertexAi.getApiEndpoint()).isEqualTo(TEST_DEFAULT_ENDPOINT); - } - - @Test - public void testInstantiateVertexAI_builderWithCustomHeaders_shouldContainRightFields() - throws IOException { - Map customHeaders = new HashMap<>(); - customHeaders.put("test_key", "test_value"); - - vertexAi = - new VertexAI.Builder() - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .setCustomHeaders(customHeaders) - .build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo(TEST_LOCATION); - // headers should include both the sdk header and the custom headers - Map expectedHeaders = new HashMap<>(customHeaders); - expectedHeaders.put( - "user-agent", - String.format( - "%s/%s", - Constants.USER_AGENT_HEADER, - GaxProperties.getLibraryVersion(PredictionServiceSettings.class))); - assertThat(vertexAi.getHeaders()).isEqualTo(expectedHeaders); - - // make sure the custom headers are set correctly in the prediction service client - try (MockedStatic mockStatic = mockStatic(PredictionServiceClient.class)) { - mockStatic - .when(() -> PredictionServiceClient.create(any(PredictionServiceSettings.class))) - .thenReturn(mockPredictionServiceClient); - PredictionServiceClient unused = vertexAi.getPredictionServiceClient(); - - ArgumentCaptor settings = - ArgumentCaptor.forClass(PredictionServiceSettings.class); - mockStatic.verify(() -> PredictionServiceClient.create(settings.capture())); - - assertThat(settings.getValue().getHeaderProvider().getHeaders()).isEqualTo(expectedHeaders); - } - } - - @Test - public void - testInstantiateVertexAI_builderWithCustomHeadersWithSdkReservedKey_shouldContainRightFields() - throws IOException { - Map customHeadersWithSdkReservedKey = new HashMap<>(); - customHeadersWithSdkReservedKey.put("user-agent", "test_value"); - - vertexAi = - new VertexAI.Builder() - .setProjectId(TEST_PROJECT) - .setLocation(TEST_LOCATION) - .setCustomHeaders(customHeadersWithSdkReservedKey) - .build(); - - assertThat(vertexAi.getProjectId()).isEqualTo(TEST_PROJECT); - assertThat(vertexAi.getLocation()).isEqualTo(TEST_LOCATION); - // headers should include sdk reserved key with value of both the sdk header and the custom - // headers - Map expectedHeaders = new HashMap<>(); - expectedHeaders.put( - "user-agent", - String.format( - "%s/%s %s", - Constants.USER_AGENT_HEADER, - GaxProperties.getLibraryVersion(PredictionServiceSettings.class), - "test_value")); - assertThat(vertexAi.getHeaders()).isEqualTo(expectedHeaders); - - // make sure the custom headers are set correctly in the llm utility service client - try (MockedStatic mockStatic = mockStatic(LlmUtilityServiceClient.class)) { - mockStatic - .when(() -> LlmUtilityServiceClient.create(any(LlmUtilityServiceSettings.class))) - .thenReturn(mockLlmUtilityServiceClient); - LlmUtilityServiceClient unused = vertexAi.getLlmUtilityClient(); - - ArgumentCaptor settings = - ArgumentCaptor.forClass(LlmUtilityServiceSettings.class); - mockStatic.verify(() -> LlmUtilityServiceClient.create(settings.capture())); - - assertThat(settings.getValue().getHeaderProvider().getHeaders()).isEqualTo(expectedHeaders); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientHttpJsonTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientHttpJsonTest.java deleted file mode 100644 index 760b2f5d680f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientHttpJsonTest.java +++ /dev/null @@ -1,1604 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.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.vertexai.api.stub.HttpJsonEndpointServiceStub; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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.Map; -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 EndpointServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static EndpointServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonEndpointServiceStub.getMethodDescriptors(), - EndpointServiceSettings.getDefaultEndpoint()); - EndpointServiceSettings settings = - EndpointServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - EndpointServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = EndpointServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint).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 createEndpointExceptionTest() 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]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - client.createEndpointAsync(parent, endpoint).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createEndpointTest2() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Endpoint endpoint = Endpoint.newBuilder().build(); - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint).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 createEndpointExceptionTest2() 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"; - Endpoint endpoint = Endpoint.newBuilder().build(); - client.createEndpointAsync(parent, endpoint).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createEndpointTest3() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint, endpointId).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 createEndpointExceptionTest3() 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]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - client.createEndpointAsync(parent, endpoint, endpointId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createEndpointTest4() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint, endpointId).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 createEndpointExceptionTest4() 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"; - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - client.createEndpointAsync(parent, endpoint, endpointId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void getEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - - Endpoint actualResponse = client.getEndpoint(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 getEndpointExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - client.getEndpoint(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getEndpointTest2() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-6164/locations/location-6164/endpoints/endpoint-6164"; - - Endpoint actualResponse = client.getEndpoint(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 getEndpointExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-6164/locations/location-6164/endpoints/endpoint-6164"; - client.getEndpoint(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEndpointsTest() throws Exception { - Endpoint responsesElement = Endpoint.newBuilder().build(); - ListEndpointsResponse expectedResponse = - ListEndpointsResponse.newBuilder() - .setNextPageToken("") - .addAllEndpoints(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEndpointsList().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 listEndpointsExceptionTest() 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.listEndpoints(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEndpointsTest2() throws Exception { - Endpoint responsesElement = Endpoint.newBuilder().build(); - ListEndpointsResponse expectedResponse = - ListEndpointsResponse.newBuilder() - .setNextPageToken("") - .addAllEndpoints(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEndpointsList().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 listEndpointsExceptionTest2() 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.listEndpoints(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockService.addResponse(expectedResponse); - - Endpoint endpoint = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Endpoint actualResponse = client.updateEndpoint(endpoint, 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 updateEndpointExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Endpoint endpoint = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEndpoint(endpoint, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateEndpointLongRunningTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateEndpointLongRunningTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Endpoint endpoint = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - - Endpoint actualResponse = client.updateEndpointLongRunningAsync(endpoint).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 updateEndpointLongRunningExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Endpoint endpoint = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - client.updateEndpointLongRunningAsync(endpoint).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteEndpointTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - - client.deleteEndpointAsync(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 deleteEndpointExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - client.deleteEndpointAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteEndpointTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-6164/locations/location-6164/endpoints/endpoint-6164"; - - client.deleteEndpointAsync(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 deleteEndpointExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-6164/locations/location-6164/endpoints/endpoint-6164"; - client.deleteEndpointAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deployModelTest() throws Exception { - DeployModelResponse expectedResponse = - DeployModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - - DeployModelResponse actualResponse = - client.deployModelAsync(endpoint, deployedModel, trafficSplit).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 deployModelExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deployModelTest2() throws Exception { - DeployModelResponse expectedResponse = - DeployModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - - DeployModelResponse actualResponse = - client.deployModelAsync(endpoint, deployedModel, trafficSplit).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 deployModelExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void undeployModelTest() throws Exception { - UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("undeployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - - UndeployModelResponse actualResponse = - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).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 undeployModelExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void undeployModelTest2() throws Exception { - UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("undeployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - - UndeployModelResponse actualResponse = - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).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 undeployModelExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void mutateDeployedModelTest() throws Exception { - MutateDeployedModelResponse expectedResponse = - MutateDeployedModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("mutateDeployedModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MutateDeployedModelResponse actualResponse = - client.mutateDeployedModelAsync(endpoint, deployedModel, 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 mutateDeployedModelExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void mutateDeployedModelTest2() throws Exception { - MutateDeployedModelResponse expectedResponse = - MutateDeployedModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("mutateDeployedModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MutateDeployedModelResponse actualResponse = - client.mutateDeployedModelAsync(endpoint, deployedModel, 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 mutateDeployedModelExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientTest.java deleted file mode 100644 index 289838a85ae9..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/EndpointServiceClientTest.java +++ /dev/null @@ -1,1428 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.EndpointServiceClient.ListEndpointsPagedResponse; -import static com.google.cloud.vertexai.api.EndpointServiceClient.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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -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.Map; -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.Ignore; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class EndpointServiceClientTest { - private static MockEndpointService mockEndpointService; - private static MockIAMPolicy mockIAMPolicy; - private static MockLocations mockLocations; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private EndpointServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockEndpointService = new MockEndpointService(); - mockLocations = new MockLocations(); - mockIAMPolicy = new MockIAMPolicy(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockEndpointService, mockLocations, mockIAMPolicy)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - EndpointServiceSettings settings = - EndpointServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = EndpointServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - client.createEndpointAsync(parent, endpoint).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 createEndpointTest2() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String parent = "parent-995424086"; - Endpoint endpoint = Endpoint.newBuilder().build(); - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createEndpointExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String parent = "parent-995424086"; - Endpoint endpoint = Endpoint.newBuilder().build(); - client.createEndpointAsync(parent, endpoint).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 createEndpointTest3() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint, endpointId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(endpointId, actualRequest.getEndpointId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createEndpointExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - client.createEndpointAsync(parent, endpoint, endpointId).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 createEndpointTest4() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String parent = "parent-995424086"; - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - - Endpoint actualResponse = client.createEndpointAsync(parent, endpoint, endpointId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateEndpointRequest actualRequest = ((CreateEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(endpointId, actualRequest.getEndpointId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createEndpointExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String parent = "parent-995424086"; - Endpoint endpoint = Endpoint.newBuilder().build(); - String endpointId = "endpointId-1837754992"; - client.createEndpointAsync(parent, endpoint, endpointId).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 getEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockEndpointService.addResponse(expectedResponse); - - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - - Endpoint actualResponse = client.getEndpoint(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - client.getEndpoint(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getEndpointTest2() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockEndpointService.addResponse(expectedResponse); - - String name = "name3373707"; - - Endpoint actualResponse = client.getEndpoint(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetEndpointRequest actualRequest = ((GetEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getEndpointExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String name = "name3373707"; - client.getEndpoint(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEndpointsTest() throws Exception { - Endpoint responsesElement = Endpoint.newBuilder().build(); - ListEndpointsResponse expectedResponse = - ListEndpointsResponse.newBuilder() - .setNextPageToken("") - .addAllEndpoints(Arrays.asList(responsesElement)) - .build(); - mockEndpointService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEndpointsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listEndpoints(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listEndpointsTest2() throws Exception { - Endpoint responsesElement = Endpoint.newBuilder().build(); - ListEndpointsResponse expectedResponse = - ListEndpointsResponse.newBuilder() - .setNextPageToken("") - .addAllEndpoints(Arrays.asList(responsesElement)) - .build(); - mockEndpointService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListEndpointsPagedResponse pagedListResponse = client.listEndpoints(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEndpointsList().get(0), resources.get(0)); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListEndpointsRequest actualRequest = ((ListEndpointsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listEndpointsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listEndpoints(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateEndpointTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - mockEndpointService.addResponse(expectedResponse); - - Endpoint endpoint = Endpoint.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Endpoint actualResponse = client.updateEndpoint(endpoint, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateEndpointRequest actualRequest = ((UpdateEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - Endpoint endpoint = Endpoint.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEndpoint(endpoint, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - @Ignore - public void updateEndpointLongRunningTest() throws Exception { - Endpoint expectedResponse = - Endpoint.newBuilder() - .setName( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDeployedModels(new ArrayList()) - .putAllTrafficSplit(new HashMap()) - .setEtag("etag3123477") - .putAllLabels(new HashMap()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEncryptionSpec(EncryptionSpec.newBuilder().build()) - .setNetwork("network1843485230") - .setEnablePrivateServiceConnect(true) - .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) - .setModelDeploymentMonitoringJob("modelDeploymentMonitoringJob-1178077657") - .setPredictRequestResponseLoggingConfig( - PredictRequestResponseLoggingConfig.newBuilder().build()) - .setDedicatedEndpointEnabled(true) - .setDedicatedEndpointDns("dedicatedEndpointDns1492154853") - .setClientConnectionConfig(ClientConnectionConfig.newBuilder().build()) - .setSatisfiesPzs(true) - .setSatisfiesPzi(true) - .setGenAiAdvancedFeaturesConfig(GenAiAdvancedFeaturesConfig.newBuilder().build()) - .setPrivateModelServerEnabled(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateEndpointLongRunningTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - Endpoint endpoint = Endpoint.newBuilder().build(); - - Endpoint actualResponse = client.updateEndpointLongRunningAsync(endpoint).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateEndpointLongRunningRequest actualRequest = - ((UpdateEndpointLongRunningRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @Ignore - public void updateEndpointLongRunningExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - Endpoint endpoint = Endpoint.newBuilder().build(); - client.updateEndpointLongRunningAsync(endpoint).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 deleteEndpointTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - - client.deleteEndpointAsync(name).get(); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteEndpointRequest actualRequest = ((DeleteEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteEndpointExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - EndpointName name = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - client.deleteEndpointAsync(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 deleteEndpointTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteEndpointTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteEndpointAsync(name).get(); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteEndpointRequest actualRequest = ((DeleteEndpointRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteEndpointExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String name = "name3373707"; - client.deleteEndpointAsync(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 deployModelTest() throws Exception { - DeployModelResponse expectedResponse = - DeployModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - - DeployModelResponse actualResponse = - client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeployModelRequest actualRequest = ((DeployModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); - Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - client.deployModelAsync(endpoint, deployedModel, trafficSplit).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 deployModelTest2() throws Exception { - DeployModelResponse expectedResponse = - DeployModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String endpoint = "endpoint1741102485"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - - DeployModelResponse actualResponse = - client.deployModelAsync(endpoint, deployedModel, trafficSplit).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeployModelRequest actualRequest = ((DeployModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); - Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deployModelExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - Map trafficSplit = new HashMap<>(); - client.deployModelAsync(endpoint, deployedModel, trafficSplit).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 undeployModelTest() throws Exception { - UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("undeployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - - UndeployModelResponse actualResponse = - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UndeployModelRequest actualRequest = ((UndeployModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); - Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void undeployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).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 undeployModelTest2() throws Exception { - UndeployModelResponse expectedResponse = UndeployModelResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("undeployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String endpoint = "endpoint1741102485"; - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - - UndeployModelResponse actualResponse = - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UndeployModelRequest actualRequest = ((UndeployModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); - Assert.assertEquals(trafficSplit, actualRequest.getTrafficSplitMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void undeployModelExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - String deployedModelId = "deployedModelId-1817547906"; - Map trafficSplit = new HashMap<>(); - client.undeployModelAsync(endpoint, deployedModelId, trafficSplit).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 mutateDeployedModelTest() throws Exception { - MutateDeployedModelResponse expectedResponse = - MutateDeployedModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("mutateDeployedModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MutateDeployedModelResponse actualResponse = - client.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - MutateDeployedModelRequest actualRequest = ((MutateDeployedModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void mutateDeployedModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.mutateDeployedModelAsync(endpoint, deployedModel, 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 mutateDeployedModelTest2() throws Exception { - MutateDeployedModelResponse expectedResponse = - MutateDeployedModelResponse.newBuilder() - .setDeployedModel(DeployedModel.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("mutateDeployedModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEndpointService.addResponse(resultOperation); - - String endpoint = "endpoint1741102485"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - MutateDeployedModelResponse actualResponse = - client.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEndpointService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - MutateDeployedModelRequest actualRequest = ((MutateDeployedModelRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(deployedModel, actualRequest.getDeployedModel()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void mutateDeployedModelExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockEndpointService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - DeployedModel deployedModel = DeployedModel.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.mutateDeployedModelAsync(endpoint, deployedModel, 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 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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockIAMPolicy.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientHttpJsonTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientHttpJsonTest.java deleted file mode 100644 index ee70b196cc33..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientHttpJsonTest.java +++ /dev/null @@ -1,576 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.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.vertexai.api.stub.HttpJsonLlmUtilityServiceStub; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.FieldMask; -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 LlmUtilityServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static LlmUtilityServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonLlmUtilityServiceStub.getMethodDescriptors(), - LlmUtilityServiceSettings.getDefaultEndpoint()); - LlmUtilityServiceSettings settings = - LlmUtilityServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - LlmUtilityServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = LlmUtilityServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void countTokensTest() throws Exception { - CountTokensResponse expectedResponse = - CountTokensResponse.newBuilder() - .setTotalTokens(730673909) - .setTotalBillableCharacters(1242495501) - .addAllPromptTokensDetails(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - - CountTokensResponse actualResponse = client.countTokens(endpoint, instances); - 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 countTokensExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - client.countTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void countTokensTest2() throws Exception { - CountTokensResponse expectedResponse = - CountTokensResponse.newBuilder() - .setTotalTokens(730673909) - .setTotalBillableCharacters(1242495501) - .addAllPromptTokensDetails(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - - CountTokensResponse actualResponse = client.countTokens(endpoint, instances); - 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 countTokensExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - client.countTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void computeTokensTest() throws Exception { - ComputeTokensResponse expectedResponse = - ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - - ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); - 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 computeTokensExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - client.computeTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void computeTokensTest2() throws Exception { - ComputeTokensResponse expectedResponse = - ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - - ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); - 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 computeTokensExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - client.computeTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientTest.java deleted file mode 100644 index 7e180e5f0574..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/LlmUtilityServiceClientTest.java +++ /dev/null @@ -1,535 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.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.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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.FieldMask; -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 LlmUtilityServiceClientTest { - private static MockIAMPolicy mockIAMPolicy; - private static MockLlmUtilityService mockLlmUtilityService; - private static MockLocations mockLocations; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private LlmUtilityServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockLlmUtilityService = new MockLlmUtilityService(); - mockLocations = new MockLocations(); - mockIAMPolicy = new MockIAMPolicy(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockLlmUtilityService, mockLocations, mockIAMPolicy)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - LlmUtilityServiceSettings settings = - LlmUtilityServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = LlmUtilityServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void countTokensTest() throws Exception { - CountTokensResponse expectedResponse = - CountTokensResponse.newBuilder() - .setTotalTokens(730673909) - .setTotalBillableCharacters(1242495501) - .addAllPromptTokensDetails(new ArrayList()) - .build(); - mockLlmUtilityService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - - CountTokensResponse actualResponse = client.countTokens(endpoint, instances); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockLlmUtilityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CountTokensRequest actualRequest = ((CountTokensRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void countTokensExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockLlmUtilityService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - client.countTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void countTokensTest2() throws Exception { - CountTokensResponse expectedResponse = - CountTokensResponse.newBuilder() - .setTotalTokens(730673909) - .setTotalBillableCharacters(1242495501) - .addAllPromptTokensDetails(new ArrayList()) - .build(); - mockLlmUtilityService.addResponse(expectedResponse); - - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - - CountTokensResponse actualResponse = client.countTokens(endpoint, instances); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockLlmUtilityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CountTokensRequest actualRequest = ((CountTokensRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void countTokensExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockLlmUtilityService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - client.countTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void computeTokensTest() throws Exception { - ComputeTokensResponse expectedResponse = - ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); - mockLlmUtilityService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - - ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockLlmUtilityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void computeTokensExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockLlmUtilityService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - client.computeTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void computeTokensTest2() throws Exception { - ComputeTokensResponse expectedResponse = - ComputeTokensResponse.newBuilder().addAllTokensInfo(new ArrayList()).build(); - mockLlmUtilityService.addResponse(expectedResponse); - - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - - ComputeTokensResponse actualResponse = client.computeTokens(endpoint, instances); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockLlmUtilityService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ComputeTokensRequest actualRequest = ((ComputeTokensRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void computeTokensExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockLlmUtilityService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - client.computeTokens(endpoint, instances); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockIAMPolicy.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointService.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointService.java deleted file mode 100644 index 4aeb9309a2ab..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 MockEndpointService implements MockGrpcService { - private final MockEndpointServiceImpl serviceImpl; - - public MockEndpointService() { - serviceImpl = new MockEndpointServiceImpl(); - } - - @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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointServiceImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointServiceImpl.java deleted file mode 100644 index 9ae52b16bef5..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockEndpointServiceImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.core.BetaApi; -import com.google.cloud.vertexai.api.EndpointServiceGrpc.EndpointServiceImplBase; -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 MockEndpointServiceImpl extends EndpointServiceImplBase { - private List requests; - private Queue responses; - - public MockEndpointServiceImpl() { - 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 createEndpoint( - CreateEndpointRequest 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 CreateEndpoint, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getEndpoint(GetEndpointRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Endpoint) { - requests.add(request); - responseObserver.onNext(((Endpoint) 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 GetEndpoint, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Endpoint.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listEndpoints( - ListEndpointsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListEndpointsResponse) { - requests.add(request); - responseObserver.onNext(((ListEndpointsResponse) 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 ListEndpoints, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListEndpointsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateEndpoint( - UpdateEndpointRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Endpoint) { - requests.add(request); - responseObserver.onNext(((Endpoint) 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 UpdateEndpoint, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Endpoint.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateEndpointLongRunning( - UpdateEndpointLongRunningRequest 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 UpdateEndpointLongRunning, expected %s" - + " or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteEndpoint( - DeleteEndpointRequest 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 DeleteEndpoint, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deployModel(DeployModelRequest 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 DeployModel, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void undeployModel( - UndeployModelRequest 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 UndeployModel, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void mutateDeployedModel( - MutateDeployedModelRequest 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 MutateDeployedModel, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicy.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicy.java deleted file mode 100644 index cb507556d993..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicy.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 MockIAMPolicy implements MockGrpcService { - private final MockIAMPolicyImpl serviceImpl; - - public MockIAMPolicy() { - serviceImpl = new MockIAMPolicyImpl(); - } - - @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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicyImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicyImpl.java deleted file mode 100644 index 66d15e1a8c9f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockIAMPolicyImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.core.BetaApi; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -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 MockIAMPolicyImpl extends IAMPolicyImplBase { - private List requests; - private Queue responses; - - public MockIAMPolicyImpl() { - 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 testIamPermissions( - TestIamPermissionsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof TestIamPermissionsResponse) { - requests.add(request); - responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - TestIamPermissionsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityService.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityService.java deleted file mode 100644 index 2fb863119343..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 MockLlmUtilityService implements MockGrpcService { - private final MockLlmUtilityServiceImpl serviceImpl; - - public MockLlmUtilityService() { - serviceImpl = new MockLlmUtilityServiceImpl(); - } - - @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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityServiceImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityServiceImpl.java deleted file mode 100644 index 25628b6236ae..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLlmUtilityServiceImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.core.BetaApi; -import com.google.cloud.vertexai.api.LlmUtilityServiceGrpc.LlmUtilityServiceImplBase; -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 MockLlmUtilityServiceImpl extends LlmUtilityServiceImplBase { - private List requests; - private Queue responses; - - public MockLlmUtilityServiceImpl() { - 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 countTokens( - CountTokensRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof CountTokensResponse) { - requests.add(request); - responseObserver.onNext(((CountTokensResponse) 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 CountTokens, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - CountTokensResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void computeTokens( - ComputeTokensRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ComputeTokensResponse) { - requests.add(request); - responseObserver.onNext(((ComputeTokensResponse) 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 ComputeTokens, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ComputeTokensResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocations.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocations.java deleted file mode 100644 index 4abfd5efd4fd..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocations.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocationsImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocationsImpl.java deleted file mode 100644 index 8e177a0511d3..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockLocationsImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionService.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionService.java deleted file mode 100644 index 53975ebe8a8f..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 MockPredictionService implements MockGrpcService { - private final MockPredictionServiceImpl serviceImpl; - - public MockPredictionService() { - serviceImpl = new MockPredictionServiceImpl(); - } - - @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-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java deleted file mode 100644 index 6b833b125b3c..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import com.google.api.HttpBody; -import com.google.api.core.BetaApi; -import com.google.cloud.vertexai.api.PredictionServiceGrpc.PredictionServiceImplBase; -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 MockPredictionServiceImpl extends PredictionServiceImplBase { - private List requests; - private Queue responses; - - public MockPredictionServiceImpl() { - 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 predict(PredictRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof PredictResponse) { - requests.add(request); - responseObserver.onNext(((PredictResponse) 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 Predict, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - PredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void rawPredict(RawPredictRequest 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 RawPredict, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HttpBody.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void streamRawPredict( - StreamRawPredictRequest 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 StreamRawPredict, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HttpBody.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void directPredict( - DirectPredictRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DirectPredictResponse) { - requests.add(request); - responseObserver.onNext(((DirectPredictResponse) 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 DirectPredict, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DirectPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void directRawPredict( - DirectRawPredictRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DirectRawPredictResponse) { - requests.add(request); - responseObserver.onNext(((DirectRawPredictResponse) 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 DirectRawPredict, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DirectRawPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public StreamObserver streamDirectPredict( - final StreamObserver responseObserver) { - StreamObserver requestObserver = - new StreamObserver() { - @Override - public void onNext(StreamDirectPredictRequest value) { - requests.add(value); - final Object response = responses.remove(); - if (response instanceof StreamDirectPredictResponse) { - responseObserver.onNext(((StreamDirectPredictResponse) response)); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method StreamDirectPredict, expected" - + " %s or %s", - response == null ? "null" : response.getClass().getName(), - StreamDirectPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void onError(Throwable t) { - responseObserver.onError(t); - } - - @Override - public void onCompleted() { - responseObserver.onCompleted(); - } - }; - return requestObserver; - } - - @Override - public StreamObserver streamDirectRawPredict( - final StreamObserver responseObserver) { - StreamObserver requestObserver = - new StreamObserver() { - @Override - public void onNext(StreamDirectRawPredictRequest value) { - requests.add(value); - final Object response = responses.remove(); - if (response instanceof StreamDirectRawPredictResponse) { - responseObserver.onNext(((StreamDirectRawPredictResponse) response)); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method StreamDirectRawPredict," - + " expected %s or %s", - response == null ? "null" : response.getClass().getName(), - StreamDirectRawPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void onError(Throwable t) { - responseObserver.onError(t); - } - - @Override - public void onCompleted() { - responseObserver.onCompleted(); - } - }; - return requestObserver; - } - - @Override - public StreamObserver streamingPredict( - final StreamObserver responseObserver) { - StreamObserver requestObserver = - new StreamObserver() { - @Override - public void onNext(StreamingPredictRequest value) { - requests.add(value); - final Object response = responses.remove(); - if (response instanceof StreamingPredictResponse) { - responseObserver.onNext(((StreamingPredictResponse) response)); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method StreamingPredict, expected %s" - + " or %s", - response == null ? "null" : response.getClass().getName(), - StreamingPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void onError(Throwable t) { - responseObserver.onError(t); - } - - @Override - public void onCompleted() { - responseObserver.onCompleted(); - } - }; - return requestObserver; - } - - @Override - public void serverStreamingPredict( - StreamingPredictRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof StreamingPredictResponse) { - requests.add(request); - responseObserver.onNext(((StreamingPredictResponse) 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 ServerStreamingPredict, expected %s or" - + " %s", - response == null ? "null" : response.getClass().getName(), - StreamingPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public StreamObserver streamingRawPredict( - final StreamObserver responseObserver) { - StreamObserver requestObserver = - new StreamObserver() { - @Override - public void onNext(StreamingRawPredictRequest value) { - requests.add(value); - final Object response = responses.remove(); - if (response instanceof StreamingRawPredictResponse) { - responseObserver.onNext(((StreamingRawPredictResponse) response)); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method StreamingRawPredict, expected" - + " %s or %s", - response == null ? "null" : response.getClass().getName(), - StreamingRawPredictResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void onError(Throwable t) { - responseObserver.onError(t); - } - - @Override - public void onCompleted() { - responseObserver.onCompleted(); - } - }; - return requestObserver; - } - - @Override - public void explain(ExplainRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ExplainResponse) { - requests.add(request); - responseObserver.onNext(((ExplainResponse) 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 Explain, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ExplainResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void generateContent( - GenerateContentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GenerateContentResponse) { - requests.add(request); - responseObserver.onNext(((GenerateContentResponse) 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 GenerateContent, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - GenerateContentResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void streamGenerateContent( - GenerateContentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GenerateContentResponse) { - requests.add(request); - responseObserver.onNext(((GenerateContentResponse) 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 StreamGenerateContent, expected %s or" - + " %s", - response == null ? "null" : response.getClass().getName(), - GenerateContentResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void embedContent( - EmbedContentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof EmbedContentResponse) { - requests.add(request); - responseObserver.onNext(((EmbedContentResponse) 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 EmbedContent, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - EmbedContentResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java deleted file mode 100644 index fbbafc1a0cf4..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java +++ /dev/null @@ -1,1031 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -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.location.GetLocationRequest; -import com.google.cloud.location.ListLocationsRequest; -import com.google.cloud.location.ListLocationsResponse; -import com.google.cloud.location.Location; -import com.google.cloud.vertexai.api.stub.HttpJsonPredictionServiceStub; -import com.google.common.collect.Lists; -import com.google.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -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 PredictionServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static PredictionServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonPredictionServiceStub.getMethodDescriptors(), - PredictionServiceSettings.getDefaultEndpoint()); - PredictionServiceSettings settings = - PredictionServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - PredictionServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = PredictionServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void predictTest() throws Exception { - PredictResponse expectedResponse = - PredictResponse.newBuilder() - .addAllPredictions(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .setModel("model104069929") - .setModelVersionId("modelVersionId-2006125846") - .setModelDisplayName("modelDisplayName1578770308") - .setMetadata(Value.newBuilder().setBoolValue(true).build()) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - - PredictResponse actualResponse = client.predict(endpoint, instances, parameters); - 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 predictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - client.predict(endpoint, instances, parameters); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void predictTest2() throws Exception { - PredictResponse expectedResponse = - PredictResponse.newBuilder() - .addAllPredictions(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .setModel("model104069929") - .setModelVersionId("modelVersionId-2006125846") - .setModelDisplayName("modelDisplayName1578770308") - .setMetadata(Value.newBuilder().setBoolValue(true).build()) - .build(); - mockService.addResponse(expectedResponse); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - - PredictResponse actualResponse = client.predict(endpoint, instances, parameters); - 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 predictExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - client.predict(endpoint, instances, parameters); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rawPredictTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - HttpBody httpBody = HttpBody.newBuilder().build(); - - HttpBody actualResponse = client.rawPredict(endpoint, httpBody); - 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 rawPredictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - HttpBody httpBody = HttpBody.newBuilder().build(); - client.rawPredict(endpoint, httpBody); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rawPredictTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - HttpBody httpBody = HttpBody.newBuilder().build(); - - HttpBody actualResponse = client.rawPredict(endpoint, httpBody); - 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 rawPredictExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - HttpBody httpBody = HttpBody.newBuilder().build(); - client.rawPredict(endpoint, httpBody); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamRawPredictTest() throws Exception {} - - @Test - public void streamRawPredictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - } - - @Test - public void directPredictTest() throws Exception { - DirectPredictResponse expectedResponse = - DirectPredictResponse.newBuilder() - .addAllOutputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - DirectPredictRequest request = - DirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - DirectPredictResponse actualResponse = client.directPredict(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 directPredictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DirectPredictRequest request = - DirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - client.directPredict(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void directRawPredictTest() throws Exception { - DirectRawPredictResponse expectedResponse = - DirectRawPredictResponse.newBuilder().setOutput(ByteString.EMPTY).build(); - mockService.addResponse(expectedResponse); - - DirectRawPredictRequest request = - DirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - DirectRawPredictResponse actualResponse = client.directRawPredict(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 directRawPredictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DirectRawPredictRequest request = - DirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - client.directRawPredict(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamDirectPredictUnsupportedMethodTest() throws Exception { - // The streamDirectPredict() method is not supported in REST transport. - // This empty test is generated for technical reasons. - } - - @Test - public void streamDirectRawPredictUnsupportedMethodTest() throws Exception { - // The streamDirectRawPredict() method is not supported in REST transport. - // This empty test is generated for technical reasons. - } - - @Test - public void streamingPredictUnsupportedMethodTest() throws Exception { - // The streamingPredict() method is not supported in REST transport. - // This empty test is generated for technical reasons. - } - - @Test - public void serverStreamingPredictTest() throws Exception {} - - @Test - public void serverStreamingPredictExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - } - - @Test - public void streamingRawPredictUnsupportedMethodTest() throws Exception { - // The streamingRawPredict() method is not supported in REST transport. - // This empty test is generated for technical reasons. - } - - @Test - public void explainTest() throws Exception { - ExplainResponse expectedResponse = - ExplainResponse.newBuilder() - .addAllExplanations(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .addAllPredictions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - - ExplainResponse actualResponse = - client.explain(endpoint, instances, parameters, deployedModelId); - 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 explainExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void explainTest2() throws Exception { - ExplainResponse expectedResponse = - ExplainResponse.newBuilder() - .addAllExplanations(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .addAllPredictions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - - ExplainResponse actualResponse = - client.explain(endpoint, instances, parameters, deployedModelId); - 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 explainExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String endpoint = "projects/project-6526/locations/location-6526/endpoints/endpoint-6526"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void generateContentTest() throws Exception { - GenerateContentResponse expectedResponse = - GenerateContentResponse.newBuilder() - .addAllCandidates(new ArrayList()) - .setModelVersion("modelVersion212437359") - .setCreateTime(Timestamp.newBuilder().build()) - .setResponseId("responseId-633138884") - .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) - .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String model = "projects/project-1054/locations/location-1054/endpoints/endpoint-1054"; - List contents = new ArrayList<>(); - - GenerateContentResponse actualResponse = client.generateContent(model, contents); - 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 generateContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String model = "projects/project-1054/locations/location-1054/endpoints/endpoint-1054"; - List contents = new ArrayList<>(); - client.generateContent(model, contents); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamGenerateContentTest() throws Exception {} - - @Test - public void streamGenerateContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - } - - @Test - public void embedContentTest() throws Exception { - EmbedContentResponse expectedResponse = - EmbedContentResponse.newBuilder() - .setEmbedding(EmbedContentResponse.Embedding.newBuilder().build()) - .setUsageMetadata(UsageMetadata.newBuilder().build()) - .setTruncated(true) - .build(); - mockService.addResponse(expectedResponse); - - EndpointName model = - EndpointName.ofProjectLocationPublisherModelName( - "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]"); - Content content = Content.newBuilder().build(); - - EmbedContentResponse actualResponse = client.embedContent(model, content); - 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 embedContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - EndpointName model = - EndpointName.ofProjectLocationPublisherModelName( - "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]"); - Content content = Content.newBuilder().build(); - client.embedContent(model, content); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void embedContentTest2() throws Exception { - EmbedContentResponse expectedResponse = - EmbedContentResponse.newBuilder() - .setEmbedding(EmbedContentResponse.Embedding.newBuilder().build()) - .setUsageMetadata(UsageMetadata.newBuilder().build()) - .setTruncated(true) - .build(); - mockService.addResponse(expectedResponse); - - String model = - "projects/project-3045/locations/location-3045/publishers/publisher-3045/models/model-3045"; - Content content = Content.newBuilder().build(); - - EmbedContentResponse actualResponse = client.embedContent(model, content); - 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 embedContentExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String model = - "projects/project-3045/locations/location-3045/publishers/publisher-3045/models/model-3045"; - Content content = Content.newBuilder().build(); - client.embedContent(model, content); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(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 setIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockService.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(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 getIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(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 testIamPermissionsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java deleted file mode 100644 index de4efdb2cda4..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java +++ /dev/null @@ -1,1348 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; - -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.grpc.testing.MockStreamObserver; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiStreamObserver; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.ServerStreamingCallable; -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.iam.v1.AuditConfig; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.GetPolicyOptions; -import com.google.iam.v1.Policy; -import com.google.iam.v1.SetIamPolicyRequest; -import com.google.iam.v1.TestIamPermissionsRequest; -import com.google.iam.v1.TestIamPermissionsResponse; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.ByteString; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -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 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 PredictionServiceClientTest { - private static MockIAMPolicy mockIAMPolicy; - private static MockLocations mockLocations; - private static MockPredictionService mockPredictionService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private PredictionServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockPredictionService = new MockPredictionService(); - mockLocations = new MockLocations(); - mockIAMPolicy = new MockIAMPolicy(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockPredictionService, mockLocations, mockIAMPolicy)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - PredictionServiceSettings settings = - PredictionServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = PredictionServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void predictTest() throws Exception { - PredictResponse expectedResponse = - PredictResponse.newBuilder() - .addAllPredictions(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .setModel("model104069929") - .setModelVersionId("modelVersionId-2006125846") - .setModelDisplayName("modelDisplayName1578770308") - .setMetadata(Value.newBuilder().setBoolValue(true).build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - - PredictResponse actualResponse = client.predict(endpoint, instances, parameters); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PredictRequest actualRequest = ((PredictRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertEquals(parameters, actualRequest.getParameters()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void predictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - client.predict(endpoint, instances, parameters); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void predictTest2() throws Exception { - PredictResponse expectedResponse = - PredictResponse.newBuilder() - .addAllPredictions(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .setModel("model104069929") - .setModelVersionId("modelVersionId-2006125846") - .setModelDisplayName("modelDisplayName1578770308") - .setMetadata(Value.newBuilder().setBoolValue(true).build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - - PredictResponse actualResponse = client.predict(endpoint, instances, parameters); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PredictRequest actualRequest = ((PredictRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertEquals(parameters, actualRequest.getParameters()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void predictExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - client.predict(endpoint, instances, parameters); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rawPredictTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - HttpBody httpBody = HttpBody.newBuilder().build(); - - HttpBody actualResponse = client.rawPredict(endpoint, httpBody); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RawPredictRequest actualRequest = ((RawPredictRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(httpBody, actualRequest.getHttpBody()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void rawPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - HttpBody httpBody = HttpBody.newBuilder().build(); - client.rawPredict(endpoint, httpBody); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void rawPredictTest2() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - String endpoint = "endpoint1741102485"; - HttpBody httpBody = HttpBody.newBuilder().build(); - - HttpBody actualResponse = client.rawPredict(endpoint, httpBody); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RawPredictRequest actualRequest = ((RawPredictRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(httpBody, actualRequest.getHttpBody()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void rawPredictExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - HttpBody httpBody = HttpBody.newBuilder().build(); - client.rawPredict(endpoint, httpBody); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamRawPredictTest() throws Exception { - HttpBody expectedResponse = - HttpBody.newBuilder() - .setContentType("contentType-389131437") - .setData(ByteString.EMPTY) - .addAllExtensions(new ArrayList()) - .build(); - mockPredictionService.addResponse(expectedResponse); - StreamRawPredictRequest request = - StreamRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setHttpBody(HttpBody.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.streamRawPredictCallable(); - callable.serverStreamingCall(request, responseObserver); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamRawPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamRawPredictRequest request = - StreamRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setHttpBody(HttpBody.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.streamRawPredictCallable(); - callable.serverStreamingCall(request, responseObserver); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void directPredictTest() throws Exception { - DirectPredictResponse expectedResponse = - DirectPredictResponse.newBuilder() - .addAllOutputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - DirectPredictRequest request = - DirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - DirectPredictResponse actualResponse = client.directPredict(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DirectPredictRequest actualRequest = ((DirectPredictRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getEndpoint(), actualRequest.getEndpoint()); - Assert.assertEquals(request.getInputsList(), actualRequest.getInputsList()); - Assert.assertEquals(request.getParameters(), actualRequest.getParameters()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void directPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - DirectPredictRequest request = - DirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - client.directPredict(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void directRawPredictTest() throws Exception { - DirectRawPredictResponse expectedResponse = - DirectRawPredictResponse.newBuilder().setOutput(ByteString.EMPTY).build(); - mockPredictionService.addResponse(expectedResponse); - - DirectRawPredictRequest request = - DirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - DirectRawPredictResponse actualResponse = client.directRawPredict(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DirectRawPredictRequest actualRequest = ((DirectRawPredictRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getEndpoint(), actualRequest.getEndpoint()); - Assert.assertEquals(request.getMethodName(), actualRequest.getMethodName()); - Assert.assertEquals(request.getInput(), actualRequest.getInput()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void directRawPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - DirectRawPredictRequest request = - DirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - client.directRawPredict(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamDirectPredictTest() throws Exception { - StreamDirectPredictResponse expectedResponse = - StreamDirectPredictResponse.newBuilder() - .addAllOutputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - StreamDirectPredictRequest request = - StreamDirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamDirectPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - requestObserver.onCompleted(); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamDirectPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamDirectPredictRequest request = - StreamDirectPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamDirectPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void streamDirectRawPredictTest() throws Exception { - StreamDirectRawPredictResponse expectedResponse = - StreamDirectRawPredictResponse.newBuilder().setOutput(ByteString.EMPTY).build(); - mockPredictionService.addResponse(expectedResponse); - StreamDirectRawPredictRequest request = - StreamDirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - MockStreamObserver responseObserver = - new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamDirectRawPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - requestObserver.onCompleted(); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamDirectRawPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamDirectRawPredictRequest request = - StreamDirectRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - MockStreamObserver responseObserver = - new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamDirectRawPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void streamingPredictTest() throws Exception { - StreamingPredictResponse expectedResponse = - StreamingPredictResponse.newBuilder() - .addAllOutputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - StreamingPredictRequest request = - StreamingPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamingPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - requestObserver.onCompleted(); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamingPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamingPredictRequest request = - StreamingPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamingPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void serverStreamingPredictTest() throws Exception { - StreamingPredictResponse expectedResponse = - StreamingPredictResponse.newBuilder() - .addAllOutputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - StreamingPredictRequest request = - StreamingPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.serverStreamingPredictCallable(); - callable.serverStreamingCall(request, responseObserver); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void serverStreamingPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamingPredictRequest request = - StreamingPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllInputs(new ArrayList()) - .setParameters(Tensor.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.serverStreamingPredictCallable(); - callable.serverStreamingCall(request, responseObserver); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void streamingRawPredictTest() throws Exception { - StreamingRawPredictResponse expectedResponse = - StreamingRawPredictResponse.newBuilder().setOutput(ByteString.EMPTY).build(); - mockPredictionService.addResponse(expectedResponse); - StreamingRawPredictRequest request = - StreamingRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamingRawPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - requestObserver.onCompleted(); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamingRawPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - StreamingRawPredictRequest request = - StreamingRawPredictRequest.newBuilder() - .setEndpoint( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setMethodName("methodName-723163380") - .setInput(ByteString.EMPTY) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - BidiStreamingCallable callable = - client.streamingRawPredictCallable(); - ApiStreamObserver requestObserver = - callable.bidiStreamingCall(responseObserver); - - requestObserver.onNext(request); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void explainTest() throws Exception { - ExplainResponse expectedResponse = - ExplainResponse.newBuilder() - .addAllExplanations(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .addAllPredictions(new ArrayList()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - - ExplainResponse actualResponse = - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExplainRequest actualRequest = ((ExplainRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint.toString(), actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertEquals(parameters, actualRequest.getParameters()); - Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void explainExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - EndpointName endpoint = - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void explainTest2() throws Exception { - ExplainResponse expectedResponse = - ExplainResponse.newBuilder() - .addAllExplanations(new ArrayList()) - .setDeployedModelId("deployedModelId-1817547906") - .addAllPredictions(new ArrayList()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - - ExplainResponse actualResponse = - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExplainRequest actualRequest = ((ExplainRequest) actualRequests.get(0)); - - Assert.assertEquals(endpoint, actualRequest.getEndpoint()); - Assert.assertEquals(instances, actualRequest.getInstancesList()); - Assert.assertEquals(parameters, actualRequest.getParameters()); - Assert.assertEquals(deployedModelId, actualRequest.getDeployedModelId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void explainExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - String endpoint = "endpoint1741102485"; - List instances = new ArrayList<>(); - Value parameters = Value.newBuilder().setBoolValue(true).build(); - String deployedModelId = "deployedModelId-1817547906"; - client.explain(endpoint, instances, parameters, deployedModelId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void generateContentTest() throws Exception { - GenerateContentResponse expectedResponse = - GenerateContentResponse.newBuilder() - .addAllCandidates(new ArrayList()) - .setModelVersion("modelVersion212437359") - .setCreateTime(Timestamp.newBuilder().build()) - .setResponseId("responseId-633138884") - .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) - .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - - String model = "model104069929"; - List contents = new ArrayList<>(); - - GenerateContentResponse actualResponse = client.generateContent(model, contents); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GenerateContentRequest actualRequest = ((GenerateContentRequest) actualRequests.get(0)); - - Assert.assertEquals(model, actualRequest.getModel()); - Assert.assertEquals(contents, actualRequest.getContentsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void generateContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - String model = "model104069929"; - List contents = new ArrayList<>(); - client.generateContent(model, contents); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void streamGenerateContentTest() throws Exception { - GenerateContentResponse expectedResponse = - GenerateContentResponse.newBuilder() - .addAllCandidates(new ArrayList()) - .setModelVersion("modelVersion212437359") - .setCreateTime(Timestamp.newBuilder().build()) - .setResponseId("responseId-633138884") - .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) - .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) - .build(); - mockPredictionService.addResponse(expectedResponse); - GenerateContentRequest request = - GenerateContentRequest.newBuilder() - .setModel("model104069929") - .addAllContents(new ArrayList()) - .setSystemInstruction(Content.newBuilder().build()) - .setCachedContent( - CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) - .addAllTools(new ArrayList()) - .setToolConfig(ToolConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllSafetySettings(new ArrayList()) - .setModelArmorConfig(ModelArmorConfig.newBuilder().build()) - .setGenerationConfig(GenerationConfig.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.streamGenerateContentCallable(); - callable.serverStreamingCall(request, responseObserver); - - List actualResponses = responseObserver.future().get(); - Assert.assertEquals(1, actualResponses.size()); - Assert.assertEquals(expectedResponse, actualResponses.get(0)); - } - - @Test - public void streamGenerateContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - GenerateContentRequest request = - GenerateContentRequest.newBuilder() - .setModel("model104069929") - .addAllContents(new ArrayList()) - .setSystemInstruction(Content.newBuilder().build()) - .setCachedContent( - CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) - .addAllTools(new ArrayList()) - .setToolConfig(ToolConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .addAllSafetySettings(new ArrayList()) - .setModelArmorConfig(ModelArmorConfig.newBuilder().build()) - .setGenerationConfig(GenerationConfig.newBuilder().build()) - .build(); - - MockStreamObserver responseObserver = new MockStreamObserver<>(); - - ServerStreamingCallable callable = - client.streamGenerateContentCallable(); - callable.serverStreamingCall(request, responseObserver); - - try { - List actualResponses = responseObserver.future().get(); - Assert.fail("No exception thrown"); - } catch (ExecutionException e) { - Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void embedContentTest() throws Exception { - EmbedContentResponse expectedResponse = - EmbedContentResponse.newBuilder() - .setEmbedding(EmbedContentResponse.Embedding.newBuilder().build()) - .setUsageMetadata(UsageMetadata.newBuilder().build()) - .setTruncated(true) - .build(); - mockPredictionService.addResponse(expectedResponse); - - EndpointName model = - EndpointName.ofProjectLocationPublisherModelName( - "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]"); - Content content = Content.newBuilder().build(); - - EmbedContentResponse actualResponse = client.embedContent(model, content); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - EmbedContentRequest actualRequest = ((EmbedContentRequest) actualRequests.get(0)); - - Assert.assertEquals(model.toString(), actualRequest.getModel()); - Assert.assertEquals(content, actualRequest.getContent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void embedContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - EndpointName model = - EndpointName.ofProjectLocationPublisherModelName( - "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]"); - Content content = Content.newBuilder().build(); - client.embedContent(model, content); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void embedContentTest2() throws Exception { - EmbedContentResponse expectedResponse = - EmbedContentResponse.newBuilder() - .setEmbedding(EmbedContentResponse.Embedding.newBuilder().build()) - .setUsageMetadata(UsageMetadata.newBuilder().build()) - .setTruncated(true) - .build(); - mockPredictionService.addResponse(expectedResponse); - - String model = "model104069929"; - Content content = Content.newBuilder().build(); - - EmbedContentResponse actualResponse = client.embedContent(model, content); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - EmbedContentRequest actualRequest = ((EmbedContentRequest) actualRequests.get(0)); - - Assert.assertEquals(model, actualRequest.getModel()); - Assert.assertEquals(content, actualRequest.getContent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void embedContentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - String model = "model104069929"; - Content content = Content.newBuilder().build(); - client.embedContent(model, content); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @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. - } - } - - @Test - public void setIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Policy actualResponse = client.setIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void setIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - SetIamPolicyRequest request = - SetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setPolicy(Policy.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.setIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getIamPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setVersion(351608024) - .addAllBindings(new ArrayList()) - .addAllAuditConfigs(new ArrayList()) - .setEtag(ByteString.EMPTY) - .build(); - mockIAMPolicy.addResponse(expectedResponse); - - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - - Policy actualResponse = client.getIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - GetIamPolicyRequest request = - GetIamPolicyRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .setOptions(GetPolicyOptions.newBuilder().build()) - .build(); - client.getIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void testIamPermissionsTest() throws Exception { - TestIamPermissionsResponse expectedResponse = - TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); - mockIAMPolicy.addResponse(expectedResponse); - - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - - TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockIAMPolicy.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void testIamPermissionsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockIAMPolicy.addException(exception); - - try { - TestIamPermissionsRequest request = - TestIamPermissionsRequest.newBuilder() - .setResource( - EndpointName.ofProjectLocationEndpointName( - "[PROJECT]", "[LOCATION]", "[ENDPOINT]") - .toString()) - .addAllPermissions(new ArrayList()) - .build(); - client.testIamPermissions(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponderTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponderTest.java deleted file mode 100644 index eefd1993456d..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponderTest.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.protobuf.Struct; -import com.google.protobuf.Value; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class AutomaticFunctionCallingResponderTest { - private static final int MAX_FUNCTION_CALLS = 5; - private static final int DEFAULT_MAX_FUNCTION_CALLS = 1; - private static final String FUNCTION_NAME_1 = "getCurrentWeather"; - private static final String FUNCTION_NAME_2 = "getCurrentTemperature"; - private static final String STRING_PARAMETER_NAME = "location"; - private static final FunctionCall FUNCTION_CALL_1 = - FunctionCall.newBuilder() - .setName(FUNCTION_NAME_1) - .setArgs( - Struct.newBuilder() - .putFields( - STRING_PARAMETER_NAME, Value.newBuilder().setStringValue("Boston").build())) - .build(); - private static final FunctionCall FUNCTION_CALL_2 = - FunctionCall.newBuilder() - .setName(FUNCTION_NAME_2) - .setArgs( - Struct.newBuilder() - .putFields( - STRING_PARAMETER_NAME, - Value.newBuilder().setStringValue("Vancouver").build())) - .build(); - private static final FunctionCall FUNCTION_CALL_WITH_FALSE_FUNCTION_NAME = - FunctionCall.newBuilder() - .setName("nonExistFunction") - .setArgs( - Struct.newBuilder() - .putFields( - STRING_PARAMETER_NAME, Value.newBuilder().setStringValue("Boston").build())) - .build(); - private static final FunctionCall FUNCTION_CALL_WITH_FALSE_PARAMETER_NAME = - FunctionCall.newBuilder() - .setName(FUNCTION_NAME_1) - .setArgs( - Struct.newBuilder() - .putFields( - "nonExistParameter", Value.newBuilder().setStringValue("Boston").build())) - .build(); - private static final FunctionCall FUNCTION_CALL_WITH_FALSE_PARAMETER_VALUE = - FunctionCall.newBuilder() - .setName(FUNCTION_NAME_1) - .setArgs( - Struct.newBuilder() - .putFields(STRING_PARAMETER_NAME, Value.newBuilder().setBoolValue(false).build())) - .build(); - - public static String getCurrentWeather(String location) { - if (location.equals("Boston")) { - return "snowing"; - } else if (location.equals("Vancouver")) { - return "raining"; - } else { - return "sunny"; - } - } - - public static int getCurrentTemperature(String location) { - if (location.equals("Boston")) { - return 32; - } else if (location.equals("Vancouver")) { - return 45; - } else { - return 75; - } - } - - public boolean nonStaticMethod() { - return true; - } - - @Test - public void testInitAutomaticFunctionCallingResponder_containsRightFields() { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - - assertThat(responder.getMaxFunctionCalls()).isEqualTo(DEFAULT_MAX_FUNCTION_CALLS); - } - - @Test - public void testInitAutomaticFunctionCallingResponderWithMaxFunctionCalls_containsRightFields() { - AutomaticFunctionCallingResponder responder = - new AutomaticFunctionCallingResponder(MAX_FUNCTION_CALLS); - - assertThat(responder.getMaxFunctionCalls()).isEqualTo(MAX_FUNCTION_CALLS); - } - - @Test - public void testSetMaxFunctionCalls_containsRightFields() { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.setMaxFunctionCalls(MAX_FUNCTION_CALLS); - - assertThat(responder.getMaxFunctionCalls()).isEqualTo(MAX_FUNCTION_CALLS); - } - - @Test - public void testAddCallableFunctionWithoutOrderedParameterNames_throwsIllegalArgumentException() - throws NoSuchMethodException { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - - IllegalStateException thrown = - assertThrows( - IllegalStateException.class, - () -> responder.addCallableFunction(FUNCTION_NAME_1, callableFunction)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "Failed to retrieve the parameter name from reflection. Please compile your code with" - + " \"-parameters\" flag or use `addCallableFunction(String, Method, String...)`" - + " to manually enter parameter names"); - } - - @Test - public void testAddNonStaticCallableFunction_throwsIllegalArgumentException() - throws NoSuchMethodException { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method nonStaticMethod = - AutomaticFunctionCallingResponderTest.class.getMethod("nonStaticMethod"); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - responder.addCallableFunction( - FUNCTION_NAME_1, nonStaticMethod, STRING_PARAMETER_NAME)); - assertThat(thrown).hasMessageThat().isEqualTo("Function calling only supports static methods."); - } - - @Test - public void testAddRepeatedCallableFunction_throwsIllegalArgumentException() - throws NoSuchMethodException { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction, STRING_PARAMETER_NAME); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - responder.addCallableFunction( - FUNCTION_NAME_1, callableFunction, STRING_PARAMETER_NAME)); - assertThat(thrown).hasMessageThat().isEqualTo("Duplicate function name: " + FUNCTION_NAME_1); - } - - @Test - public void testAddCallableFunctionWithWrongParameterNames_throwsIllegalArgumentException() - throws NoSuchMethodException { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - responder.addCallableFunction( - FUNCTION_NAME_1, callableFunction, STRING_PARAMETER_NAME, "anotherParameter")); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "The number of provided parameter names doesn't match the number of parameters in the" - + " callable function."); - } - - @Test - public void testRespondToFunctionCall_returnsCorrectResponse() throws Exception { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(2); - Method callableFunction1 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - Method callableFunction2 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_2, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction1, STRING_PARAMETER_NAME); - responder.addCallableFunction(FUNCTION_NAME_2, callableFunction2, STRING_PARAMETER_NAME); - List functionCalls = Arrays.asList(FUNCTION_CALL_1, FUNCTION_CALL_2); - - Content response = responder.getContentFromFunctionCalls(functionCalls); - - Content expectedResponse = - ContentMaker.fromMultiModalData( - PartMaker.fromFunctionResponse( - FUNCTION_NAME_1, Collections.singletonMap("result", "snowing")), - PartMaker.fromFunctionResponse( - FUNCTION_NAME_2, Collections.singletonMap("result", 45))); - - assertThat(response).isEqualTo(expectedResponse); - } - - @Test - public void testRespondToFunctionCallExceedsMaxFunctionCalls_throwsIllegalStateException() - throws Exception { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction1 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - Method callableFunction2 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_2, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction1, STRING_PARAMETER_NAME); - responder.addCallableFunction(FUNCTION_NAME_2, callableFunction2, STRING_PARAMETER_NAME); - List functionCalls = Arrays.asList(FUNCTION_CALL_1, FUNCTION_CALL_2); - - IllegalStateException thrown = - assertThrows( - IllegalStateException.class, - () -> responder.getContentFromFunctionCalls(functionCalls)); - assertThat(thrown) - .hasMessageThat() - .contains("Exceeded the maximum number of continuous automatic function calls"); - } - - @Test - public void testRespondToFunctionCallWithNonExistFunction_throwsIllegalArgumentException() - throws Exception { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction1 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction1, STRING_PARAMETER_NAME); - List functionCalls = Arrays.asList(FUNCTION_CALL_WITH_FALSE_FUNCTION_NAME); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> responder.getContentFromFunctionCalls(functionCalls)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo("Model has asked to call function \"nonExistFunction\" which was not found."); - } - - @Test - public void testRespondToFunctionCallWithNonExistParameter_throwsIllegalArgumentException() - throws Exception { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction1 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction1, STRING_PARAMETER_NAME); - List functionCalls = Arrays.asList(FUNCTION_CALL_WITH_FALSE_PARAMETER_NAME); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> responder.getContentFromFunctionCalls(functionCalls)); - assertThat(thrown) - .hasMessageThat() - .contains( - "The parameter \"" - + STRING_PARAMETER_NAME - + "\" was not found in the arguments requested by the" - + " model."); - } - - @Test - public void testRespondToFunctionCallWithWrongParameterValue_throwsIllegalStateException() - throws Exception { - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - Method callableFunction1 = - AutomaticFunctionCallingResponderTest.class.getMethod(FUNCTION_NAME_1, String.class); - responder.addCallableFunction(FUNCTION_NAME_1, callableFunction1, STRING_PARAMETER_NAME); - List functionCalls = Arrays.asList(FUNCTION_CALL_WITH_FALSE_PARAMETER_VALUE); - - IllegalStateException thrown = - assertThrows( - IllegalStateException.class, - () -> responder.getContentFromFunctionCalls(functionCalls)); - assertThat(thrown) - .hasMessageThat() - .contains( - "Error raised when calling function \"" - + FUNCTION_NAME_1 - + "\" as requested by the model. "); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ChatSessionTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ChatSessionTest.java deleted file mode 100644 index aa0c7bf911df..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ChatSessionTest.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Candidate; -import com.google.cloud.vertexai.api.Candidate.FinishReason; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.cloud.vertexai.api.FunctionCallingConfig; -import com.google.cloud.vertexai.api.FunctionDeclaration; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.HarmCategory; -import com.google.cloud.vertexai.api.Part; -import com.google.cloud.vertexai.api.PredictionServiceClient; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold; -import com.google.cloud.vertexai.api.Schema; -import com.google.cloud.vertexai.api.Tool; -import com.google.cloud.vertexai.api.ToolConfig; -import com.google.cloud.vertexai.api.Type; -import com.google.protobuf.Struct; -import com.google.protobuf.Value; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -@RunWith(JUnit4.class) -public final class ChatSessionTest { - private static final String PROJECT = "test_project"; - private static final String LOCATION = "test_location"; - - private static final String FUNCTION_CALL_MESSAGE = "What is the current weather in Boston?"; - private static final String FUNCTION_CALL_NAME = "getCurrentWeather"; - private static final String FUNCTION_CALL_PARAMETER_NAME = "location"; - - private static final String SAMPLE_MESSAGE1 = "how are you?"; - private static final String RESPONSE_STREAM_CHUNK1_TEXT = "I do not have any feelings"; - private static final String RESPONSE_STREAM_CHUNK2_TEXT = "But I'm happy to help you!"; - private static final String FULL_RESPONSE_TEXT = - RESPONSE_STREAM_CHUNK1_TEXT + RESPONSE_STREAM_CHUNK2_TEXT; - private static final String SAMPLE_MESSAGE_2 = "What can you do for me?"; - private static final String RESPONSE_TEXT_2 = "I can summarize a bo"; - private static final GenerateContentResponse RESPONSE_STREAM_CHUNK1_RESPONSE = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setContent( - Content.newBuilder() - .addParts(Part.newBuilder().setText(RESPONSE_STREAM_CHUNK1_TEXT)))) - .build(); - private static final GenerateContentResponse RESPONSE_STREAM_CHUNK2_RESPONSE = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setFinishReason(FinishReason.MAX_TOKENS) - .setContent( - Content.newBuilder() - .addParts(Part.newBuilder().setText(RESPONSE_STREAM_CHUNK2_TEXT)))) - .build(); - private static final GenerateContentResponse - RESPONSE_STREAM_CHUNK2_RESPONSE_WITHOUT_FINISH_REASON = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setContent( - Content.newBuilder() - .addParts(Part.newBuilder().setText(RESPONSE_STREAM_CHUNK2_TEXT)))) - .build(); - private static final GenerateContentResponse RESPONSE_FROM_UNARY_CALL = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setFinishReason(FinishReason.STOP) - .setContent( - Content.newBuilder().addParts(Part.newBuilder().setText(FULL_RESPONSE_TEXT)))) - .build(); - private static final GenerateContentResponse RESPONSE_FROM_UNARY_CALL_2 = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setFinishReason(FinishReason.MAX_TOKENS) - .setContent( - Content.newBuilder().addParts(Part.newBuilder().setText(RESPONSE_TEXT_2)))) - .build(); - - private static final GenerateContentResponse RESPONSE_FROM_UNARY_CALL_WITH_OTHER_FINISH_REASON = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setFinishReason(FinishReason.SAFETY) - .setContent( - Content.newBuilder().addParts(Part.newBuilder().setText(FULL_RESPONSE_TEXT)))) - .build(); - private static final GenerateContentResponse RESPONSE_WITH_FUNCTION_CALL = - GenerateContentResponse.newBuilder() - .addCandidates( - Candidate.newBuilder() - .setFinishReason(FinishReason.STOP) - .setContent( - Content.newBuilder() - .addParts( - Part.newBuilder() - .setFunctionCall( - FunctionCall.newBuilder() - .setName(FUNCTION_CALL_NAME) - .setArgs( - Struct.newBuilder() - .putFields( - FUNCTION_CALL_PARAMETER_NAME, - Value.newBuilder() - .setStringValue("Boston") - .build())))))) - .build(); - private static final Content FUNCTION_RESPONSE_CONTENT = - ContentMaker.fromMultiModalData( - PartMaker.fromFunctionResponse( - FUNCTION_CALL_NAME, Collections.singletonMap("result", "snowing"))); - - private static final GenerationConfig GENERATION_CONFIG = - GenerationConfig.newBuilder().setCandidateCount(1).build(); - private static final SafetySetting SAFETY_SETTING = - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT) - .setThreshold(HarmBlockThreshold.BLOCK_LOW_AND_ABOVE) - .build(); - private static final Tool TOOL = - Tool.newBuilder() - .addFunctionDeclarations( - FunctionDeclaration.newBuilder() - .setName("getCurrentWeather") - .setDescription("Get the current weather in a given location") - .setParameters( - Schema.newBuilder() - .setType(Type.OBJECT) - .putProperties( - "location", - Schema.newBuilder() - .setType(Type.STRING) - .setDescription("location") - .build()) - .addRequired("location"))) - .build(); - private static final ToolConfig TOOL_CONFIG = - ToolConfig.newBuilder() - .setFunctionCallingConfig( - FunctionCallingConfig.newBuilder() - .setMode(FunctionCallingConfig.Mode.ANY) - .addAllowedFunctionNames("getCurrentWeather")) - .build(); - private static final Content SYSTEM_INSTRUCTION = - ContentMaker.fromString( - "You're a helpful assistant that starts all its answers with: \"COOL\""); - - @Rule public final MockitoRule mocksRule = MockitoJUnit.rule(); - - @Mock private GenerativeModel mockGenerativeModel; - @Mock private Iterator mockServerStreamIterator; - - @Mock private PredictionServiceClient mockPredictionServiceClient; - - @Mock private UnaryCallable mockUnaryCallable; - - @Mock private GenerateContentResponse mockGenerateContentResponse; - - private ChatSession chat; - - /** Callable function getCurrentWeather for testing automatic function calling. */ - public static String getCurrentWeather(String location) { - if (location.equals("Boston")) { - return "snowing"; - } else if (location.equals("Vancouver")) { - return "raining"; - } else { - return "sunny"; - } - } - - @Before - public void doBeforeEachTest() { - chat = new ChatSession(mockGenerativeModel); - } - - @Test - public void sendMessageStreamWithText_historyContainsTwoTurns() throws IOException { - // (Arrange) Set up the responseStream - ResponseStream responseStream = - new ResponseStream(new ResponseStreamIteratorWithHistory(mockServerStreamIterator)); - when(mockServerStreamIterator.hasNext()).thenReturn(true, true, false); - when(mockServerStreamIterator.next()) - .thenReturn(RESPONSE_STREAM_CHUNK1_RESPONSE, RESPONSE_STREAM_CHUNK2_RESPONSE); - - // (Arrange) Set up the return value of the generateContentStream - when(mockGenerativeModel.generateContentStream( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(responseStream); - - // (Act) send request, consume response and get history - ResponseStream returnedResponseStream = - chat.sendMessageStream(SAMPLE_MESSAGE1); - // User needs to consume the response stream; - returnedResponseStream.stream().forEach(element -> {}); - - List history = chat.getHistory(); - // (Assert) 1. The request message is in the first content of history. 2. The streamed output is - // combined into the second content of history. - assertThat(history.get(0).getParts(0).getText()).isEqualTo(SAMPLE_MESSAGE1); - assertThat(history.get(1).getParts(0).getText()).isEqualTo(FULL_RESPONSE_TEXT); - } - - @Test - public void sendMessageStreamWithText_throwsIllegalStateExceptionIfResponseNotConsumed() - throws IOException { - // (Arrange) Set up the responseStream - ResponseStream responseStream = - new ResponseStream(new ResponseStreamIteratorWithHistory(mockServerStreamIterator)); - - // (Arrange) Set up the return value of the generateContentStream - when(mockGenerativeModel.generateContentStream( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(responseStream); - - // (Act & Assert) Send request, consume response and get history, but not consume the response - // Assert IllegalStateException will be thrown. - ResponseStream returnedResponseStream = - chat.sendMessageStream(SAMPLE_MESSAGE1); - - IllegalStateException thrown = - assertThrows(IllegalStateException.class, () -> chat.getHistory()); - assertThat(thrown).hasMessageThat().isEqualTo("Response stream is not consumed"); - } - - @Test - public void sendMessageWithText_historyContainsTwoTurns() throws IOException { - - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(RESPONSE_FROM_UNARY_CALL); - - // (Act) Send text message via sendMessage and get the history. - GenerateContentResponse response = chat.sendMessage(SAMPLE_MESSAGE1); - List history = chat.getHistory(); - // (Assert) Assert that 1) the first content contains the user request text, and 2) the second - // content in history contains the response. - assertThat(history.get(0).getParts(0).getText()).isEqualTo(SAMPLE_MESSAGE1); - assertThat(history.get(1).getParts(0).getText()).isEqualTo(FULL_RESPONSE_TEXT); - } - - @Test - public void sendMessageWithTextThenModifyHistory_historyChangedToNewContentList() - throws IOException { - - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(RESPONSE_FROM_UNARY_CALL); - - // (Act) Send text message via sendMessage and get the history. - GenerateContentResponse response = chat.sendMessage(SAMPLE_MESSAGE1); - List history = chat.getHistory(); - // (Assert) Assert that 1) the first content contains the user request text, and 2) the second - // content in history contains the response. - assertThat(history.get(0).getParts(0).getText()).isEqualTo(SAMPLE_MESSAGE1); - assertThat(history.get(1).getParts(0).getText()).isEqualTo(FULL_RESPONSE_TEXT); - - // (Act) Set history to an empty list - chat.setHistory(Arrays.asList()); - // (Assert) Asser that the history is empty. - assertThat(chat.getHistory().size()).isEqualTo(0); - } - - @Test - public void sendMessageStreamWithText_throwsIllegalStateExceptionWhenFinishReasonIsNotSTOP() - throws IOException { - // (Arrange) Set up the responseStream - ResponseStream responseStream = - new ResponseStream(new ResponseStreamIteratorWithHistory(mockServerStreamIterator)); - when(mockServerStreamIterator.hasNext()).thenReturn(true, true, false); - when(mockServerStreamIterator.next()) - .thenReturn( - RESPONSE_STREAM_CHUNK1_RESPONSE, RESPONSE_STREAM_CHUNK2_RESPONSE_WITHOUT_FINISH_REASON); - - // (Arrange) Set up the return value of the generateContentStream - when(mockGenerativeModel.generateContentStream( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(responseStream); - - // (Act) send request, consume response - ResponseStream returndResponseStream = - chat.sendMessageStream(SAMPLE_MESSAGE1); - returndResponseStream.stream().forEach(element -> {}); - - // (Act & Assert) get history and assert IllegalStateException for not having the right finish - // reason. - IllegalStateException thrown = - assertThrows(IllegalStateException.class, () -> chat.getHistory()); - assertThat(thrown).hasMessageThat().isEqualTo("Rerun getHistory() to get cleaned history."); - - // Assert that the history can be fetched again and it's empty. - List history = chat.getHistory(); - assertThat(history.size()).isEqualTo(0); - } - - @Test - public void sendMessageWithText_throwsIllegalStateExceptionWhenFinishReasonIsNotSTOP() - throws IOException { - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(SAMPLE_MESSAGE1)))) - .thenReturn(RESPONSE_FROM_UNARY_CALL_WITH_OTHER_FINISH_REASON); - - // (Act) Send text message via sendMessage - GenerateContentResponse response = chat.sendMessage(SAMPLE_MESSAGE1); - - // (Act & Assert) get history and assert IllegalStateException for not having the right finish - // reason. - IllegalStateException thrown = - assertThrows(IllegalStateException.class, () -> chat.getHistory()); - assertThat(thrown).hasMessageThat().isEqualTo("Rerun getHistory() to get cleaned history."); - // Assert that the history can be fetched again and it's empty. - List history = chat.getHistory(); - assertThat(history.size()).isEqualTo(0); - } - - @Test - public void sendMessageWithAutomaticFunctionCallingResponder_autoRespondsToFunctionCalls() - throws IOException, NoSuchMethodException { - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(FUNCTION_CALL_MESSAGE)))) - .thenReturn(RESPONSE_WITH_FUNCTION_CALL); - when(mockGenerativeModel.generateContent( - Arrays.asList( - ContentMaker.fromString(FUNCTION_CALL_MESSAGE), - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT))) - .thenReturn(RESPONSE_FROM_UNARY_CALL); - - // (Act) Send text message via sendMessage - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.addCallableFunction( - FUNCTION_CALL_NAME, - ChatSessionTest.class.getMethod(FUNCTION_CALL_NAME, String.class), - FUNCTION_CALL_PARAMETER_NAME); - GenerateContentResponse response = - chat.withAutomaticFunctionCallingResponder(responder).sendMessage(FUNCTION_CALL_MESSAGE); - - // (Act & Assert) get history and assert that the history contains 4 contents and the response - // is the final response instead of the intermediate one. - assertThat(chat.getHistory().size()).isEqualTo(4); - assertThat(response).isEqualTo(RESPONSE_FROM_UNARY_CALL); - } - - @Test - public void sendMessageWithAutomaticFunctionCallingResponderIOException_chatHistoryGetReverted() - throws IOException, NoSuchMethodException { - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(FUNCTION_CALL_MESSAGE)))) - .thenReturn(RESPONSE_WITH_FUNCTION_CALL); - when(mockGenerativeModel.generateContent( - Arrays.asList( - ContentMaker.fromString(FUNCTION_CALL_MESSAGE), - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT))) - .thenThrow(new IOException("Server error")); - - // (Act) Send text message via sendMessage - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.addCallableFunction( - FUNCTION_CALL_NAME, - ChatSessionTest.class.getMethod(FUNCTION_CALL_NAME, String.class), - FUNCTION_CALL_PARAMETER_NAME); - - IOException thrown = - assertThrows( - IOException.class, - () -> - chat.withAutomaticFunctionCallingResponder(responder) - .sendMessage(FUNCTION_CALL_MESSAGE)); - assertThat(thrown).hasMessageThat().isEqualTo("Server error"); - - // (Act & Assert) get history and assert that the history contains no contents since the - // intermediate response got an error and all contents got reverted. - assertThat(chat.getHistory().size()).isEqualTo(0); - } - - @Test - public void - sendMessageWithAutomaticFunctionCallingResponderIllegalStateException_chatHistoryGetReverted() - throws IOException, NoSuchMethodException { - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(FUNCTION_CALL_MESSAGE)))) - .thenReturn(RESPONSE_WITH_FUNCTION_CALL); - when(mockGenerativeModel.generateContent( - Arrays.asList( - ContentMaker.fromString(FUNCTION_CALL_MESSAGE), - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT))) - .thenReturn(RESPONSE_WITH_FUNCTION_CALL); - when(mockGenerativeModel.generateContent( - Arrays.asList( - ContentMaker.fromString(FUNCTION_CALL_MESSAGE), - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT, - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT))) - .thenReturn(RESPONSE_FROM_UNARY_CALL); - - // (Act) Send text message via sendMessage - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.addCallableFunction( - FUNCTION_CALL_NAME, - ChatSessionTest.class.getMethod(FUNCTION_CALL_NAME, String.class), - FUNCTION_CALL_PARAMETER_NAME); - - // After mocking, there should be 2 consecutive auto function calls, but the max number of - // function calls in the responder is 1, so an IllegalStateException will be thrown. - IllegalStateException thrown = - assertThrows( - IllegalStateException.class, - () -> - chat.withAutomaticFunctionCallingResponder(responder) - .sendMessage(FUNCTION_CALL_MESSAGE)); - assertThat(thrown) - .hasMessageThat() - .contains("Exceeded the maximum number of continuous automatic function calls"); - - // (Act & Assert) get history and assert that the history contains no contents since the - // intermediate response got an error and all contents got reverted. - assertThat(chat.getHistory().size()).isEqualTo(0); - } - - @Test - public void - sendMessageWithAutomaticFunctionCallingResponderFinishReasonNotStop_chatHistoryGetReverted() - throws IOException, NoSuchMethodException { - // (Arrange) Set up the return value of the generateContent - when(mockGenerativeModel.generateContent( - Arrays.asList(ContentMaker.fromString(FUNCTION_CALL_MESSAGE)))) - .thenReturn(RESPONSE_WITH_FUNCTION_CALL); - when(mockGenerativeModel.generateContent( - Arrays.asList( - ContentMaker.fromString(FUNCTION_CALL_MESSAGE), - ResponseHandler.getContent(RESPONSE_WITH_FUNCTION_CALL), - FUNCTION_RESPONSE_CONTENT))) - .thenReturn(RESPONSE_FROM_UNARY_CALL_WITH_OTHER_FINISH_REASON); - - // (Act) Send text message via sendMessage - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.addCallableFunction( - FUNCTION_CALL_NAME, - ChatSessionTest.class.getMethod(FUNCTION_CALL_NAME, String.class), - FUNCTION_CALL_PARAMETER_NAME); - GenerateContentResponse response = - chat.withAutomaticFunctionCallingResponder(responder).sendMessage(FUNCTION_CALL_MESSAGE); - - // (Act & Assert) get history will throw since the final response stopped with error. The - // history should be reverted. - assertThat(response).isEqualTo(RESPONSE_FROM_UNARY_CALL_WITH_OTHER_FINISH_REASON); - IllegalStateException thrown = - assertThrows(IllegalStateException.class, () -> chat.getHistory()); - assertThat(thrown).hasMessageThat().isEqualTo("Rerun getHistory() to get cleaned history."); - // Assert that the history can be fetched again and it's empty. - List history = chat.getHistory(); - assertThat(history.size()).isEqualTo(0); - } - - @Test - public void testChatSessionMergeHistoryToRootChatSession() throws Exception { - - // (Arrange) Set up the return value of the generateContent - - VertexAI vertexAi = - new VertexAI.Builder() - .setProjectId(PROJECT) - .setLocation(LOCATION) - .setPredictionClientSupplier(() -> mockPredictionServiceClient) - .build(); - - GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi); - - when(mockPredictionServiceClient.generateContentCallable()).thenReturn(mockUnaryCallable); - when(mockUnaryCallable.call(any(GenerateContentRequest.class))) - .thenReturn(RESPONSE_FROM_UNARY_CALL) - .thenReturn(RESPONSE_FROM_UNARY_CALL_2); - - // (Act) Send text message in root chat - ChatSession rootChat = model.startChat(); - GenerateContentResponse response = rootChat.sendMessage(SAMPLE_MESSAGE1); - // (Act) Create a child chat session and send message again - ChatSession childChat = - rootChat - .withGenerationConfig(GENERATION_CONFIG) - .withSafetySettings(Arrays.asList(SAFETY_SETTING)) - .withTools(Arrays.asList(TOOL)) - .withToolConfig(TOOL_CONFIG) - .withSystemInstruction(SYSTEM_INSTRUCTION); - response = childChat.sendMessage(SAMPLE_MESSAGE_2); - - // (Assert) root chat history should contain all 4 contents - List history = rootChat.getHistory(); - assertThat(history.get(0).getParts(0).getText()).isEqualTo(SAMPLE_MESSAGE1); - assertThat(history.get(1).getParts(0).getText()).isEqualTo(FULL_RESPONSE_TEXT); - assertThat(history.get(2).getParts(0).getText()).isEqualTo(SAMPLE_MESSAGE_2); - assertThat(history.get(3).getParts(0).getText()).isEqualTo(RESPONSE_TEXT_2); - - // (Assert) the second request (from child chat) should contained updated configurations - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable, times(2)).call(request.capture()); - Content expectedSystemInstruction = SYSTEM_INSTRUCTION.toBuilder().clearRole().build(); - assertThat(request.getAllValues().get(1).getGenerationConfig()).isEqualTo(GENERATION_CONFIG); - assertThat(request.getAllValues().get(1).getSafetySettings(0)).isEqualTo(SAFETY_SETTING); - assertThat(request.getAllValues().get(1).getTools(0)).isEqualTo(TOOL); - assertThat(request.getAllValues().get(1).getToolConfig()).isEqualTo(TOOL_CONFIG); - assertThat(request.getAllValues().get(1).getSystemInstruction()) - .isEqualTo(expectedSystemInstruction); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ContentMakerTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ContentMakerTest.java deleted file mode 100644 index 3a318aaeb453..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ContentMakerTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.cloud.vertexai.api.Content; -import com.google.protobuf.ByteString; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class ContentMakerTest { - @Test - public void fromString_returnsContentWithText() { - String stringInput = "string input"; - Content content = ContentMaker.fromString(stringInput); - - assertThat(content.getRole()).isEqualTo("user"); - assertThat(content.getParts(0).getText()).isEqualTo(stringInput); - } - - @Test - public void fromString_throwsIllegalArgumentException_withEmptyString() { - String stringInput = ""; - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> ContentMaker.fromString(stringInput)); - assertThat(thrown).hasMessageThat().isEqualTo("text message can't be null or empty."); - } - - @Test - public void fromString_throwsIllegalArgumentException_withNullString() { - String stringInput = null; - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> ContentMaker.fromString(stringInput)); - assertThat(thrown).hasMessageThat().isEqualTo("text message can't be null or empty."); - } - - @Test - public void forRole_returnsContentWithArbitraryRoleSet() { - // Although in our docstring, we said only three roles are acceptable, we make sure the code - // can evolve with arbitrary roles (the backend API doesn't reject any role, nor is it forbidden - // as model input. But the model wasn't trained/evaluated this way). - String role = "arbitrary_role"; - String stringInput = "string input"; - - Content content = ContentMaker.forRole(role).fromString(stringInput); - assertThat(content.getRole()).isEqualTo(role); - assertThat(content.getParts(0).getText()).isEqualTo(stringInput); - - // Make sure when we use the ContentMaker without `forRole` again, the default role becomes - // "user". - Content anotherContent = ContentMaker.fromString(stringInput); - assertThat(anotherContent.getRole()).isEqualTo("user"); - assertThat(anotherContent.getParts(0).getText()).isEqualTo(stringInput); - } - - @Test - public void fromMultiModalData_returnsContentWithMultiModalityParts() - throws MalformedURLException, URISyntaxException { - String stringInput = "string input"; - - String mimeTypeForBytes = "application/octet-stream"; - byte[] bytesInput = new byte[] {1, 2, 3}; - - String mimeTypeForURIinString = "image/jpeg"; - String fileUriInString = "gs://my-bucket/image.jpg"; - - String mimeTypeForURI = "image/gif"; - URI fileUri = new URI("gs://my-bucket/image.gif"); - - String mimeTypeForByteString = "image/gif"; - ByteString byteString = ByteString.copyFrom(bytesInput); - - Content content = - ContentMaker.fromMultiModalData( - stringInput, - PartMaker.fromMimeTypeAndData(mimeTypeForBytes, bytesInput), - PartMaker.fromMimeTypeAndData(mimeTypeForURIinString, fileUriInString), - PartMaker.fromMimeTypeAndData(mimeTypeForURI, fileUri), - PartMaker.fromMimeTypeAndData(mimeTypeForByteString, byteString)); - - assertThat(content.getRole()).isEqualTo("user"); - - assertThat(content.getParts(0).getText()).isEqualTo(stringInput); - - assertThat(content.getParts(1).getInlineData().getMimeType()) - .isEqualTo("application/octet-stream"); - assertThat(content.getParts(1).getInlineData().getData()) - .isEqualTo(ByteString.copyFrom(bytesInput)); - - assertThat(content.getParts(2).getFileData().getMimeType()).isEqualTo("image/jpeg"); - assertThat(content.getParts(2).getFileData().getFileUri()).isEqualTo(fileUriInString); - - assertThat(content.getParts(3).getFileData().getMimeType()).isEqualTo("image/gif"); - assertThat(content.getParts(3).getFileData().getFileUri()).isEqualTo(fileUri.toString()); - - assertThat(content.getParts(4).getInlineData().getMimeType()).isEqualTo("image/gif"); - assertThat(content.getParts(4).getInlineData().getData()).isEqualTo(byteString); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMakerTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMakerTest.java deleted file mode 100644 index a17c81a4d94c..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMakerTest.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.cloud.vertexai.api.FunctionDeclaration; -import com.google.cloud.vertexai.api.Schema; -import com.google.cloud.vertexai.api.Type; -import com.google.common.collect.ImmutableList; -import com.google.gson.Gson; -import com.google.gson.JsonObject; -import com.google.protobuf.InvalidProtocolBufferException; -import java.lang.reflect.Method; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class FunctionDeclarationMakerTest { - private static final String FUNCTION_NAME = "functionName"; - private static final String FUNCTION_DESCRIPTION = "functionDescription"; - private static final String STRING_PARAM_NAME = "stringParam"; - private static final String INTEGER_PARAM_NAME = "integerParam"; - private static final String DOUBLE_PARAM_NAME = "doubleParam"; - private static final String FLOAT_PARAM_NAME = "floatParam"; - private static final String BOOLEAN_PARAM_NAME = "booleanParam"; - private static final ImmutableList REQUIRED_PARAM_NAMES = - ImmutableList.of( - STRING_PARAM_NAME, - INTEGER_PARAM_NAME, - DOUBLE_PARAM_NAME, - FLOAT_PARAM_NAME, - BOOLEAN_PARAM_NAME); - - private static final FunctionDeclaration EXPECTED_FUNCTION_DECLARATION = - FunctionDeclaration.newBuilder() - .setName(FUNCTION_NAME) - .setDescription(FUNCTION_DESCRIPTION) - .setParameters( - Schema.newBuilder() - .setType(Type.OBJECT) - .putProperties( - STRING_PARAM_NAME, - Schema.newBuilder() - .setType(Type.STRING) - .setDescription(STRING_PARAM_NAME) - .build()) - .putProperties( - INTEGER_PARAM_NAME, - Schema.newBuilder() - .setType(Type.INTEGER) - .setDescription(INTEGER_PARAM_NAME) - .build()) - .putProperties( - DOUBLE_PARAM_NAME, - Schema.newBuilder() - .setType(Type.NUMBER) - .setDescription(DOUBLE_PARAM_NAME) - .build()) - .putProperties( - FLOAT_PARAM_NAME, - Schema.newBuilder() - .setType(Type.NUMBER) - .setDescription(FLOAT_PARAM_NAME) - .build()) - .putProperties( - BOOLEAN_PARAM_NAME, - Schema.newBuilder() - .setType(Type.BOOLEAN) - .setDescription(BOOLEAN_PARAM_NAME) - .build()) - .addAllRequired(REQUIRED_PARAM_NAMES)) - .build(); - - /** A function (static method) to test fromFunc functionalities. */ - public static int functionName( - String stringParam, - int integerParam, - double doubleParam, - float floatParam, - boolean booleanParam) { - return 0; - } - - /** An instance method to test fromFunc. */ - public int instanceMethod(String stringParam) { - return 1; - } - - /** A function with invalid parameter type to test fromFunc. */ - public static int functionWithInvalidType(Object objectParam) { - return 2; - } - - @Test - public void fromValidJsonStringTested_returnsFunctionDeclaration() - throws InvalidProtocolBufferException { - String jsonString = - "{\n" - + " \"name\": \"functionName\",\n" - + " \"description\": \"functionDescription\",\n" - + " \"parameters\": {\n" - + " \"type\": \"OBJECT\", \n" - + " \"properties\": {\n" - + " \"stringParam\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"stringParam\"\n" - + " },\n" - + " \"integerParam\": {\n" - + " \"type\": \"INTEGER\",\n" - + " \"description\": \"integerParam\"\n" - + " },\n" - + " \"doubleParam\": {\n" - + " \"type\": \"NUMBER\",\n" - + " \"description\": \"doubleParam\"\n" - + " },\n" - + " \"floatParam\": {\n" - + " \"type\": \"NUMBER\",\n" - + " \"description\": \"floatParam\"\n" - + " },\n" - + " \"booleanParam\": {\n" - + " \"type\": \"BOOLEAN\",\n" - + " \"description\": \"booleanParam\"\n" - + " }\n" - + " },\n" - + " \"required\": [\"stringParam\", \"integerParam\", \"doubleParam\"," - + " \"floatParam\", \"booleanParam\"]\n" - + " }\n" - + "}"; - - FunctionDeclaration functionDeclaration = FunctionDeclarationMaker.fromJsonString(jsonString); - - assertThat(functionDeclaration).isEqualTo(EXPECTED_FUNCTION_DECLARATION); - } - - @Test - public void fromJsonStringWithInvalidType_throwsInvalidProtocolBufferException() - throws InvalidProtocolBufferException { - // Here we use "parameter" (singular) instead of "parameters" - String jsonString = - "{\n" - + " \"name\": \"functionName\",\n" - + " \"parameter\": {\n" - + " \"type\": \"OBJECT\", \n" - + " \"properties\": {\n" - + " \"param1\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"param1Description\"\n" - + " }\n" - + " }\n" - + " }\n" - + "}"; - assertThrows( - InvalidProtocolBufferException.class, - () -> FunctionDeclarationMaker.fromJsonString(jsonString)); - } - - @Test - public void fromJsonStringNameMissing_throwsIllegalArgumentException() - throws InvalidProtocolBufferException { - String jsonString = - "{\n" - + " \"description\": \"functionDescription\",\n" - + " \"parameters\": {\n" - + " \"type\": \"OBJECT\", \n" - + " \"properties\": {\n" - + " \"param1\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"param1Description\"\n" - + " }\n" - + " }\n" - + " }\n" - + "}"; - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> FunctionDeclarationMaker.fromJsonString(jsonString)); - assertThat(thrown).hasMessageThat().isEqualTo("name field must be present."); - } - - @Test - public void fromEmptyString_throwsIllegalArgumentException() - throws InvalidProtocolBufferException { - String jsonString = ""; - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> FunctionDeclarationMaker.fromJsonString(jsonString)); - assertThat(thrown).hasMessageThat().isEqualTo("Input String can't be null or empty."); - } - - @Test - public void fromJsonStringStringIsNull_throwsIllegalArgumentException() - throws InvalidProtocolBufferException { - String jsonString = null; - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> FunctionDeclarationMaker.fromJsonString(jsonString)); - assertThat(thrown).hasMessageThat().isEqualTo("Input String can't be null or empty."); - } - - @Test - public void fromValidJsonObject_returnsFunctionDeclaration() - throws InvalidProtocolBufferException { - JsonObject stringParamJsonObject = new JsonObject(); - stringParamJsonObject.addProperty("type", "STRING"); - stringParamJsonObject.addProperty("description", STRING_PARAM_NAME); - - JsonObject integerParamJsonObject = new JsonObject(); - integerParamJsonObject.addProperty("type", "INTEGER"); - integerParamJsonObject.addProperty("description", INTEGER_PARAM_NAME); - - JsonObject doubleParamJsonObject = new JsonObject(); - doubleParamJsonObject.addProperty("type", "NUMBER"); - doubleParamJsonObject.addProperty("description", DOUBLE_PARAM_NAME); - - JsonObject floatParamJsonObject = new JsonObject(); - floatParamJsonObject.addProperty("type", "NUMBER"); - floatParamJsonObject.addProperty("description", FLOAT_PARAM_NAME); - - JsonObject booleanParamJsonObject = new JsonObject(); - booleanParamJsonObject.addProperty("type", "BOOLEAN"); - booleanParamJsonObject.addProperty("description", BOOLEAN_PARAM_NAME); - - JsonObject propertiesJsonObject = new JsonObject(); - propertiesJsonObject.add(STRING_PARAM_NAME, stringParamJsonObject); - propertiesJsonObject.add(INTEGER_PARAM_NAME, integerParamJsonObject); - propertiesJsonObject.add(DOUBLE_PARAM_NAME, doubleParamJsonObject); - propertiesJsonObject.add(FLOAT_PARAM_NAME, floatParamJsonObject); - propertiesJsonObject.add(BOOLEAN_PARAM_NAME, booleanParamJsonObject); - - JsonObject parametersJsonObject = new JsonObject(); - parametersJsonObject.addProperty("type", "OBJECT"); - parametersJsonObject.add("properties", propertiesJsonObject); - parametersJsonObject.add( - "required", new Gson().toJsonTree(REQUIRED_PARAM_NAMES).getAsJsonArray()); - - JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty("name", FUNCTION_NAME); - jsonObject.addProperty("description", FUNCTION_DESCRIPTION); - jsonObject.add("parameters", parametersJsonObject); - - FunctionDeclaration functionDeclaration = FunctionDeclarationMaker.fromJsonObject(jsonObject); - - assertThat(functionDeclaration).isEqualTo(EXPECTED_FUNCTION_DECLARATION); - } - - @Test - public void fromFuncWithoutParameterNamesWithoutReflection_throwsIllegalStateException() - throws NoSuchMethodException { - Method function = - FunctionDeclarationMakerTest.class.getMethod( - FUNCTION_NAME, String.class, int.class, double.class, float.class, boolean.class); - - IllegalStateException thrown = - assertThrows( - IllegalStateException.class, - () -> FunctionDeclarationMaker.fromFunc(FUNCTION_DESCRIPTION, function)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "Failed to retrieve the parameter name from reflection. Please compile your" - + " code with \"-parameters\" flag or use `fromFunc(String, Method," - + " String...)` to manually enter parameter names"); - } - - @Test - public void fromFuncWithParameterNames_returnsFunctionDeclaration() throws NoSuchMethodException { - Method function = - FunctionDeclarationMakerTest.class.getMethod( - FUNCTION_NAME, String.class, int.class, double.class, float.class, boolean.class); - - FunctionDeclaration functionDeclaration = - FunctionDeclarationMaker.fromFunc( - FUNCTION_DESCRIPTION, - function, - STRING_PARAM_NAME, - INTEGER_PARAM_NAME, - DOUBLE_PARAM_NAME, - FLOAT_PARAM_NAME, - BOOLEAN_PARAM_NAME); - - assertThat(functionDeclaration).isEqualTo(EXPECTED_FUNCTION_DECLARATION); - } - - @Test - public void fromFuncWithInstanceMethod_throwsIllegalArgumentException() - throws NoSuchMethodException { - Method function = FunctionDeclarationMakerTest.class.getMethod("instanceMethod", String.class); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - FunctionDeclarationMaker.fromFunc( - FUNCTION_DESCRIPTION, function, STRING_PARAM_NAME)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo("Instance methods are not supported. Please use static methods."); - } - - @Test - public void fromFuncWithInvalidParameterType_throwsIllegalArgumentException() - throws NoSuchMethodException { - Method function = - FunctionDeclarationMakerTest.class.getMethod("functionWithInvalidType", Object.class); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> FunctionDeclarationMaker.fromFunc(FUNCTION_DESCRIPTION, function, "objectParam")); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "Unsupported parameter type " + Object.class.getName() + " for parameter objectParam"); - } - - @Test - public void fromFuncWithUnmatchedParameterNames_throwsIllegalArgumentException() - throws NoSuchMethodException { - Method function = - FunctionDeclarationMakerTest.class.getMethod( - FUNCTION_NAME, String.class, int.class, double.class, float.class, boolean.class); - - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> - FunctionDeclarationMaker.fromFunc( - FUNCTION_DESCRIPTION, function, STRING_PARAM_NAME)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "The number of parameter names does not match the number of parameters in the method."); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/GenerativeModelTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/GenerativeModelTest.java deleted file mode 100644 index b767479300ec..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/GenerativeModelTest.java +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import com.google.api.core.ApiFuture; -import com.google.api.gax.rpc.ServerStream; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.auth.oauth2.GoogleCredentials; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.CountTokensRequest; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.cloud.vertexai.api.FunctionCallingConfig; -import com.google.cloud.vertexai.api.FunctionDeclaration; -import com.google.cloud.vertexai.api.GenerateContentRequest; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.GoogleSearchRetrieval; -import com.google.cloud.vertexai.api.HarmCategory; -import com.google.cloud.vertexai.api.LlmUtilityServiceClient; -import com.google.cloud.vertexai.api.PredictionServiceClient; -import com.google.cloud.vertexai.api.Retrieval; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold; -import com.google.cloud.vertexai.api.Schema; -import com.google.cloud.vertexai.api.Tool; -import com.google.cloud.vertexai.api.ToolConfig; -import com.google.cloud.vertexai.api.Type; -import com.google.cloud.vertexai.api.VertexAISearch; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -@RunWith(JUnit4.class) -public final class GenerativeModelTest { - private static final String PROJECT = "test_project"; - private static final String LOCATION = "test_location"; - private static final String MODEL_NAME = "gemini-pro"; - private static final GenerationConfig GENERATION_CONFIG = - GenerationConfig.newBuilder().setCandidateCount(1).build(); - private static final GenerationConfig DEFAULT_GENERATION_CONFIG = - GenerationConfig.newBuilder().setCandidateCount(2).build(); - private static final SafetySetting SAFETY_SETTING = - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT) - .setThreshold(HarmBlockThreshold.BLOCK_LOW_AND_ABOVE) - .build(); - private static final SafetySetting DEFAULT_SAFETY_SETTING = - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_HATE_SPEECH) - .setThreshold(HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE) - .build(); - private static final Tool TOOL = - Tool.newBuilder() - .addFunctionDeclarations( - FunctionDeclaration.newBuilder() - .setName("getCurrentWeather") - .setDescription("Get the current weather in a given location") - .setParameters( - Schema.newBuilder() - .setType(Type.OBJECT) - .putProperties( - "location", - Schema.newBuilder() - .setType(Type.STRING) - .setDescription("location") - .build()) - .addRequired("location"))) - .build(); - private static final ToolConfig DEFAULT_TOOL_CONFIG = - ToolConfig.newBuilder() - .setFunctionCallingConfig( - FunctionCallingConfig.newBuilder() - .setMode(FunctionCallingConfig.Mode.ANY) - .addAllowedFunctionNames("getCurrentWeather")) - .build(); - private static final Content DEFAULT_SYSTEM_INSTRUCTION = - ContentMaker.fromString( - "You're a helpful assistant that starts all its answers with: \"COOL\""); - private static final Tool GOOGLE_SEARCH_TOOL = - Tool.newBuilder().setGoogleSearchRetrieval(GoogleSearchRetrieval.newBuilder()).build(); - private static final Tool VERTEX_AI_SEARCH_TOOL = - Tool.newBuilder() - .setRetrieval( - Retrieval.newBuilder() - .setVertexAiSearch( - VertexAISearch.newBuilder() - .setDatastore( - "projects/test_project/locations/global/collections/default_collection/dataStores/test_123")) - .setDisableAttribution(false)) - .build(); - - private static final String TEXT = "What is your name?"; - private static final Content CONTENT = ContentMaker.fromString(TEXT); - - private VertexAI vertexAi; - private GenerativeModel model; - private List safetySettings = Arrays.asList(SAFETY_SETTING); - private List defaultSafetySettings = Arrays.asList(DEFAULT_SAFETY_SETTING); - private List tools = Arrays.asList(TOOL, GOOGLE_SEARCH_TOOL, VERTEX_AI_SEARCH_TOOL); - - @Rule public final MockitoRule mocksRule = MockitoJUnit.rule(); - - @Mock private GoogleCredentials mockGoogleCredentials; - - @Mock private PredictionServiceClient mockPredictionServiceClient; - @Mock private LlmUtilityServiceClient mockLlmUtilityServiceClient; - - @Mock - private ServerStreamingCallable - mockServerStreamCallable; - - @Mock private UnaryCallable mockUnaryCallable; - - @Mock private GenerateContentResponse mockGenerateContentResponse; - @Mock private ServerStream mockServerStream; - @Mock private Iterator mockServerStreamIterator; - @Mock private ApiFuture mockApiFuture; - - @Before - public void setUp() { - // Mock Unary generateContent - when(mockPredictionServiceClient.generateContentCallable()).thenReturn(mockUnaryCallable); - when(mockUnaryCallable.call(any(GenerateContentRequest.class))) - .thenReturn(mockGenerateContentResponse); - // Mock stream generateContent - when(mockPredictionServiceClient.streamGenerateContentCallable()) - .thenReturn(mockServerStreamCallable); - when(mockServerStreamCallable.call(any(GenerateContentRequest.class))) - .thenReturn(mockServerStream); - when(mockServerStream.iterator()).thenReturn(mockServerStreamIterator); - // Mock async generateContent - when(mockUnaryCallable.futureCall(any(GenerateContentRequest.class))).thenReturn(mockApiFuture); - - vertexAi = - new VertexAI.Builder() - .setProjectId(PROJECT) - .setLocation(LOCATION) - .setCredentials(mockGoogleCredentials) - .setLlmClientSupplier(() -> mockLlmUtilityServiceClient) - .setPredictionClientSupplier(() -> mockPredictionServiceClient) - .build(); - } - - @Test - public void instantiate_hasCorrectFields() { - model = new GenerativeModel(MODEL_NAME, vertexAi); - assertThat(model.getModelName()).isEqualTo(MODEL_NAME); - assertThat(model.getGenerationConfig()).isEqualTo(GenerationConfig.getDefaultInstance()); - assertThat(model.getSafetySettings()).isEmpty(); - assertThat(model.getTools()).isEmpty(); - } - - @Test - public void instantiate_withModelNameStartingFromProjects_hasCorrectFields() { - model = - new GenerativeModel( - "projects/test_project/locations/test_location/publishers/google/models/gemini-pro", - vertexAi); - assertThat(model.getModelName()).isEqualTo(MODEL_NAME); - assertThat(model.getGenerationConfig()).isEqualTo(GenerationConfig.getDefaultInstance()); - assertThat(model.getSafetySettings()).isEmpty(); - assertThat(model.getTools()).isEmpty(); - } - - @Test - public void instantiateWithBuilder_hasCorrectFields() { - model = new GenerativeModel.Builder().setModelName(MODEL_NAME).setVertexAi(vertexAi).build(); - assertThat(model.getModelName()).isEqualTo(MODEL_NAME); - assertThat(model.getGenerationConfig()).isEqualTo(GenerationConfig.getDefaultInstance()); - assertThat(model.getSafetySettings()).isEmpty(); - assertThat(model.getTools()).isEmpty(); - } - - @Test - public void instantiateWithBuilder_withAllConfigs_hasCorrectFields() { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setGenerationConfig(GENERATION_CONFIG) - .setSafetySettings(safetySettings) - .setTools(tools) - .build(); - assertThat(model.getModelName()).isEqualTo(MODEL_NAME); - assertThat(model.getGenerationConfig()).isEqualTo(GENERATION_CONFIG); - assertThat(model.getSafetySettings()).isEqualTo(safetySettings); - assertThat(model.getTools()).isEqualTo(tools); - } - - @Test - public void instantiateWithBuilder_missingModelName_throwsIllegalArgumentException() { - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> new GenerativeModel.Builder().build()); - assertThat(thrown) - .hasMessageThat() - .isEqualTo("modelName is required. Please call setModelName() before building."); - } - - @Test - public void instantiateWithBuilder_emptyModelName_throwsIllegalArgumentException() { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> new GenerativeModel.Builder().setModelName("").build()); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "modelName can't be null or empty. Please refer to" - + " https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models" - + " to find the right model name."); - } - - @Test - public void instantiateWithBuilder_nullModelName_throwsIllegalArgumentException() { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> new GenerativeModel.Builder().setModelName(null).build()); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "modelName can't be null or empty. Please refer to" - + " https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models" - + " to find the right model name."); - } - - @Test - public void instantiateWithBuilder_missingVertexAi_throwsNullPointerException() { - NullPointerException thrown = - assertThrows( - NullPointerException.class, - () -> new GenerativeModel.Builder().setModelName(MODEL_NAME).build()); - assertThat(thrown) - .hasMessageThat() - .isEqualTo("vertexAi is required. Please call setVertexAi() before building."); - } - - @Test - public void countTokens_withText_requestHasCorrectText() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - CountTokensResponse unused = model.countTokens(TEXT); - - ArgumentCaptor request = ArgumentCaptor.forClass(CountTokensRequest.class); - verify(mockLlmUtilityServiceClient).countTokens(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - } - - @Test - public void countTokens_withContent_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - CountTokensResponse unused = model.countTokens(CONTENT); - - ArgumentCaptor request = ArgumentCaptor.forClass(CountTokensRequest.class); - verify(mockLlmUtilityServiceClient).countTokens(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void countTokens_withContents_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - CountTokensResponse unused = model.countTokens(Arrays.asList(CONTENT)); - - ArgumentCaptor request = ArgumentCaptor.forClass(CountTokensRequest.class); - verify(mockLlmUtilityServiceClient).countTokens(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContent_withText_requestHasCorrectFields() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getModel()) - .isEqualTo( - "projects/test_project/locations/test_location/publishers/google/models/gemini-pro"); - } - - @Test - public void generateContent_withFullModelName_requestHasCorrectResourceName() throws Exception { - model = - new GenerativeModel( - "projects/another_project/locations/europe-west4/publishers/google/models/another_model", - vertexAi); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getModel()) - .isEqualTo( - "projects/another_project/locations/europe-west4/publishers/google/models/another_model"); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - } - - @Test - public void generateContent_withContent_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - GenerateContentResponse unused = model.generateContent(CONTENT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContent_withContents_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - GenerateContentResponse unused = model.generateContent(Arrays.asList(CONTENT)); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContent_withDefaultGenerationConfig_requestHasCorrectGenerationConfigAndText() - throws Exception { - model = - new GenerativeModel.Builder() - .setVertexAi(vertexAi) - .setModelName(MODEL_NAME) - .setGenerationConfig(DEFAULT_GENERATION_CONFIG) - .build(); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getGenerationConfig()).isEqualTo(DEFAULT_GENERATION_CONFIG); - } - - @Test - public void generateContent_withDefaultSafetySettings_requestHasCorrectSafetySettingsAndText() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setSafetySettings(defaultSafetySettings) - .setVertexAi(vertexAi) - .build(); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getSafetySettings(0)).isEqualTo(DEFAULT_SAFETY_SETTING); - } - - @Test - public void generateContent_withDefaultTools_requestHasCorrectToolsAndText() throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setTools(tools) - .build(); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getTools(0)).isEqualTo(TOOL); - } - - @Test - public void generateContent_withDefaultToolConfig_requestHasCorrectToolConfigAndText() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setToolConfig(DEFAULT_TOOL_CONFIG) - .build(); - - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getToolConfig()).isEqualTo(DEFAULT_TOOL_CONFIG); - } - - @Test - public void - generateContent_withDefaultSystemInstruction_requestHasCorrectSystemInstructionAndText() - throws Exception { - model = - new GenerativeModel.Builder() - .setVertexAi(vertexAi) - .setModelName(MODEL_NAME) - .setSystemInstruction(DEFAULT_SYSTEM_INSTRUCTION) - .build(); - GenerateContentResponse unused = model.generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - Content expectedSystemInstruction = DEFAULT_SYSTEM_INSTRUCTION.toBuilder().clearRole().build(); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getSystemInstruction()).isEqualTo(expectedSystemInstruction); - } - - @Test - public void generateContent_withAllConfigsInFluentApi_requestHasCorrectFields() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - GenerateContentResponse unused = - model - .withGenerationConfig(GENERATION_CONFIG) - .withSafetySettings(safetySettings) - .withTools(tools) - .withToolConfig(DEFAULT_TOOL_CONFIG) - .withSystemInstruction(DEFAULT_SYSTEM_INSTRUCTION) - .generateContent(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).call(request.capture()); - Content expectedSystemInstruction = DEFAULT_SYSTEM_INSTRUCTION.toBuilder().clearRole().build(); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getGenerationConfig()).isEqualTo(GENERATION_CONFIG); - assertThat(request.getValue().getSafetySettings(0)).isEqualTo(SAFETY_SETTING); - assertThat(request.getValue().getTools(0)).isEqualTo(TOOL); - assertThat(request.getValue().getToolConfig()).isEqualTo(DEFAULT_TOOL_CONFIG); - assertThat(request.getValue().getSystemInstruction()).isEqualTo(expectedSystemInstruction); - } - - @Test - public void generateContent_withNullContents_throwsIllegalArgumentException() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - List contents = null; - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> model.generateContent(contents)); - assertThat(thrown).hasMessageThat().isEqualTo("contents can't be null or empty."); - } - - @Test - public void generateContentStream_withText_requestHasCorrectText() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - } - - @Test - public void generateContentStream_withContent_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ResponseStream unused = model.generateContentStream(CONTENT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContentStream_withContents_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ResponseStream unused = model.generateContentStream(Arrays.asList(CONTENT)); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContentStream_withDefaultGenerationConfig_requestHasCorrectGenerationConfig() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setGenerationConfig(DEFAULT_GENERATION_CONFIG) - .setVertexAi(vertexAi) - .build(); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getGenerationConfig()).isEqualTo(DEFAULT_GENERATION_CONFIG); - } - - @Test - public void generateContentStream_withDefaultSafetySettings_requestHasCorrectSafetySettings() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setSafetySettings(defaultSafetySettings) - .setVertexAi(vertexAi) - .build(); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getSafetySettings(0)).isEqualTo(DEFAULT_SAFETY_SETTING); - } - - @Test - public void generateContentStream_withDefaultTools_requestHasCorrectTools() throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setTools(tools) - .build(); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getTools(0)).isEqualTo(TOOL); - } - - @Test - public void generateContentStream_withDefaultToolConfig_requestHasCorrectToolConfig() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setToolConfig(DEFAULT_TOOL_CONFIG) - .build(); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - assertThat(request.getValue().getToolConfig()).isEqualTo(DEFAULT_TOOL_CONFIG); - } - - @Test - public void - generateContentStream_withDefaultSystemInstruction_requestHasCorrectSystemInstruction() - throws Exception { - model = - new GenerativeModel.Builder() - .setModelName(MODEL_NAME) - .setVertexAi(vertexAi) - .setSystemInstruction(DEFAULT_SYSTEM_INSTRUCTION) - .build(); - - ResponseStream unused = model.generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - Content expectedSystemInstruction = DEFAULT_SYSTEM_INSTRUCTION.toBuilder().clearRole().build(); - assertThat(request.getValue().getSystemInstruction()).isEqualTo(expectedSystemInstruction); - } - - @Test - public void generateContentStream_withAllConfigsInFluentApi_requestHasCorrectFields() - throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ResponseStream unused = - model - .withGenerationConfig(GENERATION_CONFIG) - .withSafetySettings(safetySettings) - .withTools(tools) - .withToolConfig(DEFAULT_TOOL_CONFIG) - .withSystemInstruction(DEFAULT_SYSTEM_INSTRUCTION) - .generateContentStream(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockServerStreamCallable).call(request.capture()); - Content expectedSystemInstruction = DEFAULT_SYSTEM_INSTRUCTION.toBuilder().clearRole().build(); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - assertThat(request.getValue().getGenerationConfig()).isEqualTo(GENERATION_CONFIG); - assertThat(request.getValue().getSafetySettings(0)).isEqualTo(SAFETY_SETTING); - assertThat(request.getValue().getTools(0)).isEqualTo(TOOL); - assertThat(request.getValue().getToolConfig()).isEqualTo(DEFAULT_TOOL_CONFIG); - assertThat(request.getValue().getSystemInstruction()).isEqualTo(expectedSystemInstruction); - } - - @Test - public void generateContentStream_withEmptyContents_throwsIllegalArgumentException() - throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - List contents = new ArrayList<>(); - - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> model.generateContentStream(contents)); - assertThat(thrown).hasMessageThat().isEqualTo("contents can't be null or empty."); - } - - @Test - public void generateContentAsync_withText_requestHasCorrectText() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ApiFuture unused = model.generateContentAsync(TEXT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).futureCall(request.capture()); - assertThat(request.getValue().getContents(0).getParts(0).getText()).isEqualTo(TEXT); - } - - @Test - public void generateContentAsync_withContent_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ApiFuture unused = model.generateContentAsync(CONTENT); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).futureCall(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } - - @Test - public void generateContentAsync_withContents_requestHasCorrectContent() throws Exception { - model = new GenerativeModel(MODEL_NAME, vertexAi); - - ApiFuture unused = model.generateContentAsync(Arrays.asList(CONTENT)); - - ArgumentCaptor request = - ArgumentCaptor.forClass(GenerateContentRequest.class); - verify(mockUnaryCallable).futureCall(request.capture()); - assertThat(request.getValue().getContents(0)).isEqualTo(CONTENT); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/PartMakerTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/PartMakerTest.java deleted file mode 100644 index eb5037cc6e96..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/PartMakerTest.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.cloud.vertexai.api.Part; -import com.google.protobuf.ByteString; -import com.google.protobuf.Struct; -import com.google.protobuf.Value; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class PartMakerTest { - @Test - public void fromMimeTypeAndData_dataInByteArray() { - String mimeTypeForBytes = "application/octet-stream"; - byte[] bytesInput = new byte[] {1, 2, 3}; - - Part part = PartMaker.fromMimeTypeAndData(mimeTypeForBytes, bytesInput); - - assertThat(part.getInlineData().getMimeType()).isEqualTo("application/octet-stream"); - assertThat(part.getInlineData().getData()).isEqualTo(ByteString.copyFrom(bytesInput)); - } - - @Test - public void fromMimeTypeAndData_dataInByteString() { - String mimeTypeForByteString = "image/gif"; - byte[] bytesInput = new byte[] {1, 2, 3}; - ByteString byteString = ByteString.copyFrom(bytesInput); - - Part part = PartMaker.fromMimeTypeAndData(mimeTypeForByteString, byteString); - - assertThat(part.getInlineData().getMimeType()).isEqualTo("image/gif"); - assertThat(part.getInlineData().getData()).isEqualTo(byteString); - } - - @Test - public void fromMimeTypeAndData_dataInString() { - String mimeTypeForURIinString = "image/jpeg"; - String fileUriInString = "gs://my-bucket/image.jpg"; - - Part part = PartMaker.fromMimeTypeAndData(mimeTypeForURIinString, fileUriInString); - - assertThat(part.getFileData().getMimeType()).isEqualTo("image/jpeg"); - assertThat(part.getFileData().getFileUri()).isEqualTo(fileUriInString); - } - - @Test - public void fromMimeTypeAndData_dataInURI() throws URISyntaxException { - - String mimeTypeForURI = "image/png"; - URI fileUri = new URI("gs://my-bucket/image.png"); - Part part = PartMaker.fromMimeTypeAndData(mimeTypeForURI, fileUri); - - assertThat(part.getFileData().getMimeType()).isEqualTo("image/png"); - assertThat(part.getFileData().getFileUri()).isEqualTo(fileUri.toString()); - } - - @Test - public void testFromFunctionResponseWithStruct_containsRightNameAndValues() { - String functionName = "getCurrentWeather"; - Struct functionResponse = - Struct.newBuilder() - .putFields("currentWeather", Value.newBuilder().setStringValue("Super nice!").build()) - .putFields("currentTemperature", Value.newBuilder().setNumberValue(85.0).build()) - .putFields("isRaining", Value.newBuilder().setBoolValue(false).build()) - .build(); - - Part part = PartMaker.fromFunctionResponse(functionName, functionResponse); - - assertThat(part.getFunctionResponse().getName()).isEqualTo("getCurrentWeather"); - assertThat(part.getFunctionResponse().getResponse()).isEqualTo(functionResponse); - } - - @Test - public void testFromFunctionResponseWithMap_containsRightNameAndValues() { - String functionName = "getCurrentWeather"; - Map functionResponse = new HashMap<>(); - functionResponse.put("currentWeather", "Super nice!"); - functionResponse.put("currentTemperature", 85.0); - functionResponse.put("isRaining", false); - functionResponse.put("other", null); - - Part part = PartMaker.fromFunctionResponse(functionName, functionResponse); - - assertThat(part.getFunctionResponse().getName()).isEqualTo("getCurrentWeather"); - - Map fieldsMap = part.getFunctionResponse().getResponse().getFieldsMap(); - assertThat(fieldsMap.get("currentWeather").getStringValue()).isEqualTo("Super nice!"); - assertThat(fieldsMap.get("currentTemperature").getNumberValue()).isEqualTo(85.0); - assertThat(fieldsMap.get("isRaining").getBoolValue()).isEqualTo(false); - assertThat(fieldsMap.get("other").hasNullValue()).isEqualTo(true); - } - - @Test - public void testFromFunctionResponseWithNumberValues_containsRightNameAndValues() { - String functionName = "getCurrentWeather"; - Map functionResponse = new HashMap<>(); - functionResponse.put("integerNumber", 85); - functionResponse.put("doubleNumber", 85.0); - functionResponse.put("floatNumber", 85.0f); - functionResponse.put("longNumber", 85L); - functionResponse.put("shortNumber", (short) 85); - - Part part = PartMaker.fromFunctionResponse(functionName, functionResponse); - Map fieldsMap = part.getFunctionResponse().getResponse().getFieldsMap(); - - assertThat(part.getFunctionResponse().getName()).isEqualTo("getCurrentWeather"); - assertThat(fieldsMap.get("integerNumber").getNumberValue()).isEqualTo(85.0); - assertThat(fieldsMap.get("doubleNumber").getNumberValue()).isEqualTo(85.0); - assertThat(fieldsMap.get("floatNumber").getNumberValue()).isEqualTo(85.0); - assertThat(fieldsMap.get("longNumber").getNumberValue()).isEqualTo(85.0); - assertThat(fieldsMap.get("shortNumber").getNumberValue()).isEqualTo(85.0); - } - - @Test - public void testFromFunctionResponseWithInvalidMap_throwsIllegalArgumentException() { - String functionName = "getCurrentWeather"; - Map invalidResponse = new HashMap<>(); - invalidResponse.put("currentWeather", new byte[] {1, 2, 3}); - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> PartMaker.fromFunctionResponse(functionName, invalidResponse)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "The value in the map can only be one of the following format: " - + "String, Number, Boolean, null."); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ResponseHandlerTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ResponseHandlerTest.java deleted file mode 100644 index 80487e7355fe..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/ResponseHandlerTest.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; -import static org.mockito.Mockito.when; - -import com.google.cloud.vertexai.api.Candidate; -import com.google.cloud.vertexai.api.Candidate.FinishReason; -import com.google.cloud.vertexai.api.Citation; -import com.google.cloud.vertexai.api.CitationMetadata; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.FunctionCall; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.Part; -import com.google.common.collect.ImmutableList; -import java.util.Arrays; -import java.util.Iterator; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -@RunWith(JUnit4.class) -public final class ResponseHandlerTest { - private static final String TEXT_1 = "test "; - private static final String TEXT_2 = "response."; - private static final Content CONTENT = - Content.newBuilder() - .setRole("model") - .addParts(Part.newBuilder().setText(TEXT_1)) - .addParts(Part.newBuilder().setText(TEXT_2)) - .build(); - private static final Content CONTENT_WITH_FNCTION_CALL = - Content.newBuilder() - .addParts(Part.newBuilder().setText(TEXT_1)) - .addParts(Part.newBuilder().setFunctionCall(FunctionCall.getDefaultInstance())) - .addParts(Part.newBuilder().setText(TEXT_2)) - .addParts(Part.newBuilder().setFunctionCall(FunctionCall.getDefaultInstance())) - .build(); - private static final Citation CITATION_1 = - Citation.newBuilder().setUri("gs://citation1").setStartIndex(1).setEndIndex(2).build(); - private static final Citation CITATION_2 = - Citation.newBuilder().setUri("gs://citation2").setStartIndex(10).setEndIndex(11).build(); - private static final Candidate CANDIDATE_1 = - Candidate.newBuilder() - .setContent(CONTENT) - .setCitationMetadata(CitationMetadata.newBuilder().addCitations(CITATION_1)) - .build(); - private static final Candidate CANDIDATE_2 = - Candidate.newBuilder() - .setContent(CONTENT) - .setCitationMetadata(CitationMetadata.newBuilder().addCitations(CITATION_2)) - .build(); - private static final Candidate CANDIDATE_3 = - Candidate.newBuilder().setContent(CONTENT_WITH_FNCTION_CALL).build(); - private static final GenerateContentResponse RESPONSE_1 = - GenerateContentResponse.newBuilder().addCandidates(CANDIDATE_1).build(); - private static final GenerateContentResponse RESPONSE_2 = - GenerateContentResponse.newBuilder().addCandidates(CANDIDATE_2).build(); - private static final GenerateContentResponse RESPONSE_3 = - GenerateContentResponse.newBuilder().addCandidates(CANDIDATE_3).build(); - private static final GenerateContentResponse INVALID_RESPONSE = - GenerateContentResponse.newBuilder() - .addCandidates(CANDIDATE_1) - .addCandidates(CANDIDATE_2) - .build(); - - @Rule public final MockitoRule mocksRule = MockitoJUnit.rule(); - - @Mock private Iterator mockServerStreamIterator; - - @Test - public void testGetTextFromResponse() { - String text = ResponseHandler.getText(RESPONSE_1); - assertThat(text).isEqualTo(TEXT_1 + TEXT_2); - } - - @Test - public void testGetTextFromInvalidResponse() { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, () -> ResponseHandler.getText(INVALID_RESPONSE)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - String.format( - "This response should have exactly 1 candidate, but it has %s.", - INVALID_RESPONSE.getCandidatesCount())); - } - - @Test - public void testGetFunctionCallsFromResponse() { - ImmutableList functionCalls = ResponseHandler.getFunctionCalls(RESPONSE_3); - assertThat(functionCalls.size()).isEqualTo(2); - assertThat(functionCalls.get(0)).isEqualTo(FunctionCall.getDefaultInstance()); - assertThat(functionCalls.get(1)).isEqualTo(FunctionCall.getDefaultInstance()); - } - - @Test - public void testGetFunctionCallsFromInvalidResponse() { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, - () -> ResponseHandler.getFunctionCalls(INVALID_RESPONSE)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - String.format( - "This response should have exactly 1 candidate, but it has %s.", - INVALID_RESPONSE.getCandidatesCount())); - } - - @Test - public void testGetContentFromResponse() { - Content content = ResponseHandler.getContent(RESPONSE_1); - assertThat(content).isEqualTo(CONTENT); - } - - @Test - public void testGetContentFromInvalidResponse() { - IllegalArgumentException thrown = - assertThrows( - IllegalArgumentException.class, () -> ResponseHandler.getContent(INVALID_RESPONSE)); - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - String.format( - "This response should have exactly 1 candidate, but it has %s.", - INVALID_RESPONSE.getCandidatesCount())); - } - - @Test - public void getFinishReason_unspecified() { - FinishReason finishReason = ResponseHandler.getFinishReason(RESPONSE_1); - assertThat(finishReason).isEqualTo(FinishReason.FINISH_REASON_UNSPECIFIED); - } - - @Test - public void testAggregateStreamIntoResponse() { - ResponseStream responseStream = - new ResponseStream(new ResponseStreamIteratorWithHistory(mockServerStreamIterator)); - when(mockServerStreamIterator.hasNext()).thenReturn(true, true, false); - when(mockServerStreamIterator.next()).thenReturn(RESPONSE_1, RESPONSE_2); - - GenerateContentResponse response = ResponseHandler.aggregateStreamIntoResponse(responseStream); - assertThat(ResponseHandler.getText(response)).isEqualTo(TEXT_1 + TEXT_2 + TEXT_1 + TEXT_2); - assertThat(response.getCandidates(0).getCitationMetadata().getCitationsList()) - .isEqualTo(Arrays.asList(CITATION_1, CITATION_2)); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/SchemaMakerTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/SchemaMakerTest.java deleted file mode 100644 index 28a093435d54..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/generativeai/SchemaMakerTest.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.generativeai; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.cloud.vertexai.api.Schema; -import com.google.cloud.vertexai.api.Type; -import com.google.gson.JsonObject; -import com.google.protobuf.InvalidProtocolBufferException; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class SchemaMakerTest { - private static final String STRING_PARAM_NAME = "stringParam"; - private static final String INTEGER_PARAM_NAME = "integerParam"; - private static final String DOUBLE_PARAM_NAME = "doubleParam"; - private static final String FLOAT_PARAM_NAME = "floatParam"; - private static final String BOOLEAN_PARAM_NAME = "booleanParam"; - - private static final Schema EXPECTED_SCHEMA = - Schema.newBuilder() - .setType(Type.OBJECT) - .putProperties( - STRING_PARAM_NAME, - Schema.newBuilder().setType(Type.STRING).setDescription(STRING_PARAM_NAME).build()) - .putProperties( - INTEGER_PARAM_NAME, - Schema.newBuilder().setType(Type.INTEGER).setDescription(INTEGER_PARAM_NAME).build()) - .putProperties( - DOUBLE_PARAM_NAME, - Schema.newBuilder().setType(Type.NUMBER).setDescription(DOUBLE_PARAM_NAME).build()) - .putProperties( - FLOAT_PARAM_NAME, - Schema.newBuilder().setType(Type.NUMBER).setDescription(FLOAT_PARAM_NAME).build()) - .putProperties( - BOOLEAN_PARAM_NAME, - Schema.newBuilder().setType(Type.BOOLEAN).setDescription(BOOLEAN_PARAM_NAME).build()) - .build(); - - @Test - public void fromJsonString_withValidJsonString_returnsSchema() - throws InvalidProtocolBufferException { - String jsonString = - "{\n" - + " \"type\": \"OBJECT\",\n" - + " \"properties\": {\n" - + " \"stringParam\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"stringParam\"\n" - + " },\n" - + " \"integerParam\": {\n" - + " \"type\": \"INTEGER\",\n" - + " \"description\": \"integerParam\"\n" - + " },\n" - + " \"doubleParam\": {\n" - + " \"type\": \"NUMBER\",\n" - + " \"description\": \"doubleParam\"\n" - + " },\n" - + " \"floatParam\": {\n" - + " \"type\": \"NUMBER\",\n" - + " \"description\": \"floatParam\"\n" - + " },\n" - + " \"booleanParam\": {\n" - + " \"type\": \"BOOLEAN\",\n" - + " \"description\": \"booleanParam\"\n" - + " }\n" - + " }\n" - + "}"; - - Schema schema = SchemaMaker.fromJsonString(jsonString); - - assertThat(schema).isEqualTo(EXPECTED_SCHEMA); - } - - @Test - public void fromJsonString_withInvalidJsonString_throwsInvalidProtocolBufferException() - throws InvalidProtocolBufferException { - // Here we use "property" (singular) instead of "properties" - String jsonString = - "{\n" - + " \"type\": \"OBJECT\",\n" - + " \"property\": {\n" - + " \"stringParam\": {\n" - + " \"type\": \"STRING\",\n" - + " \"description\": \"stringParam\"\n" - + " }\n" - + " }\n" - + "}"; - assertThrows( - InvalidProtocolBufferException.class, () -> SchemaMaker.fromJsonString(jsonString)); - } - - @Test - public void fromJsonString_withEmptyString_throwsIllegalArgumentException() - throws InvalidProtocolBufferException { - String jsonString = ""; - IllegalArgumentException thrown = - assertThrows(IllegalArgumentException.class, () -> SchemaMaker.fromJsonString(jsonString)); - assertThat(thrown).hasMessageThat().isEqualTo("Input String can't be null or empty."); - } - - @Test - public void fromJsonObject_withValidJsonObject_returnsSchema() - throws InvalidProtocolBufferException { - JsonObject stringParamJsonObject = new JsonObject(); - stringParamJsonObject.addProperty("type", "STRING"); - stringParamJsonObject.addProperty("description", STRING_PARAM_NAME); - - JsonObject integerParamJsonObject = new JsonObject(); - integerParamJsonObject.addProperty("type", "INTEGER"); - integerParamJsonObject.addProperty("description", INTEGER_PARAM_NAME); - - JsonObject doubleParamJsonObject = new JsonObject(); - doubleParamJsonObject.addProperty("type", "NUMBER"); - doubleParamJsonObject.addProperty("description", DOUBLE_PARAM_NAME); - - JsonObject floatParamJsonObject = new JsonObject(); - floatParamJsonObject.addProperty("type", "NUMBER"); - floatParamJsonObject.addProperty("description", FLOAT_PARAM_NAME); - - JsonObject booleanParamJsonObject = new JsonObject(); - booleanParamJsonObject.addProperty("type", "BOOLEAN"); - booleanParamJsonObject.addProperty("description", BOOLEAN_PARAM_NAME); - - JsonObject propertiesJsonObject = new JsonObject(); - propertiesJsonObject.add(STRING_PARAM_NAME, stringParamJsonObject); - propertiesJsonObject.add(INTEGER_PARAM_NAME, integerParamJsonObject); - propertiesJsonObject.add(DOUBLE_PARAM_NAME, doubleParamJsonObject); - propertiesJsonObject.add(FLOAT_PARAM_NAME, floatParamJsonObject); - propertiesJsonObject.add(BOOLEAN_PARAM_NAME, booleanParamJsonObject); - - JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty("type", "OBJECT"); - jsonObject.add("properties", propertiesJsonObject); - - Schema schema = SchemaMaker.fromJsonObject(jsonObject); - - assertThat(schema).isEqualTo(EXPECTED_SCHEMA); - } - - @Test - public void fromJsonObject_withInvalidJsonObject_throwsInvalidProtocolBufferException() - throws InvalidProtocolBufferException { - // Here we use "property" (singular) instead of "properties" - JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty("type", "OBJECT"); - jsonObject.add("property", new JsonObject()); - - assertThrows( - InvalidProtocolBufferException.class, () -> SchemaMaker.fromJsonObject(jsonObject)); - } - - @Test - public void fromJsonObject_withNullJsonObject_throwsNullPointerException() - throws InvalidProtocolBufferException { - JsonObject jsonObject = null; - assertThrows(NullPointerException.class, () -> SchemaMaker.fromJsonObject(jsonObject)); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITChatSessionIntegrationTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITChatSessionIntegrationTest.java deleted file mode 100644 index 7f738594942a..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITChatSessionIntegrationTest.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.it; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.HarmCategory; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.api.Tool; -import com.google.cloud.vertexai.generativeai.AutomaticFunctionCallingResponder; -import com.google.cloud.vertexai.generativeai.ChatSession; -import com.google.cloud.vertexai.generativeai.ContentMaker; -import com.google.cloud.vertexai.generativeai.FunctionDeclarationMaker; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.PartMaker; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import com.google.common.collect.ImmutableList; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.Collections; -import java.util.logging.Logger; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class ITChatSessionIntegrationTest { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String MODEL_NAME_TEXT = "gemini-1.5-pro-002"; - private static final String LOCATION = "us-central1"; - private static final Logger logger = - Logger.getLogger(ITGenerativeModelIntegrationTest.class.getName()); - - private VertexAI vertexAi; - private GenerativeModel model; - private ChatSession chat; - - /** Callable function getCurrentWeather for testing automatic function calling. */ - public static String getCurrentWeather(String location) { - if (location.equals("Boston")) { - return "snowing"; - } else if (location.equals("Vancouver")) { - return "raining"; - } else { - return "sunny"; - } - } - - @Before - public void setUp() throws IOException { - vertexAi = new VertexAI(PROJECT_ID, LOCATION); - // Set temperature to 0 to reduce randomness on model responses - GenerationConfig defaultGenerationConfig = - GenerationConfig.newBuilder().setTemperature(0).build(); - model = - new GenerativeModel(MODEL_NAME_TEXT, vertexAi) - .withGenerationConfig(defaultGenerationConfig); - } - - @After - public void tearDown() throws IOException { - vertexAi.close(); - } - - private static void assertSizeAndAlternatingRolesInHistory( - String methodName, - ImmutableList history, - int expectedSize, - ImmutableList expectedUserContent) { - // GenAI output is flaky so we always print out the response. - // For the same reason, we don't do assertions much. - logger.info(String.format("%s: The whole history is:\n%s", methodName, history)); - assertThat(history.size()).isEqualTo(expectedSize); - for (int i = 1; i < expectedSize; i += 2) { - if (!expectedUserContent.isEmpty()) { - assertThat(history.get(i - 1)).isEqualTo(expectedUserContent.get((i - 1) / 2)); - } - assertThat(history.get(i - 1).getRole()).isEqualTo("user"); - assertThat(history.get(i).getRole()).isEqualTo("model"); - } - } - - @Test - public void sendMessageMixedStreamAndUnary_historyOfFour() throws IOException { - // Arrange - String firstMessage = "hello!"; - String secondMessage = "how old are you?"; - Content expectedFirstContent = ContentMaker.fromString(firstMessage); - Content expectedThirdContent = ContentMaker.fromString(secondMessage); - - // Act - chat = model.startChat(); - ResponseStream stream = chat.sendMessageStream(firstMessage); - // We consume the stream before sending another message - for (GenerateContentResponse resp : stream) { - // Assert while consuming - assertThat(resp.getCandidatesList()).isNotEmpty(); - } - GenerateContentResponse response = chat.sendMessage(secondMessage); - ImmutableList history = chat.getHistory(); - - // Assert - assertSizeAndAlternatingRolesInHistory( - Thread.currentThread().getStackTrace()[1].getMethodName(), - history, - 4, - ImmutableList.of(expectedFirstContent, expectedThirdContent)); - } - - @Test - public void sendMessageWithNewConfigs_historyContainsFullConversation() throws IOException { - // Arrange - String firstMessage = "hello!"; - String secondMessage = "how old are you?"; - Content expectedFirstContent = ContentMaker.fromString(firstMessage); - Content expectedThirdContent = ContentMaker.fromString(secondMessage); - GenerationConfig config = GenerationConfig.newBuilder().setTemperature(0.7F).build(); - ImmutableList safetySettings = - ImmutableList.of( - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT) - .setThreshold(SafetySetting.HarmBlockThreshold.BLOCK_ONLY_HIGH) - .build()); - - // Act - chat = model.startChat(); - ResponseStream stream = - chat.withGenerationConfig(config) - .withSafetySettings(safetySettings) - .sendMessageStream(firstMessage); - // We consume the stream before sending another message - for (GenerateContentResponse resp : stream) { - // Assert while consuming - assertThat(resp.getCandidatesList()).isNotEmpty(); - } - GenerateContentResponse response = - chat.withGenerationConfig(config) - .withSafetySettings(safetySettings) - .sendMessage(secondMessage); - - // Assert - ImmutableList history = chat.getHistory(); - assertSizeAndAlternatingRolesInHistory( - Thread.currentThread().getStackTrace()[1].getMethodName(), - history, - 4, - ImmutableList.of(expectedFirstContent, expectedThirdContent)); - } - - @Test - public void sendMessageWithFunctionCalling_functionCallInResponse() - throws IOException, NoSuchMethodException { - // Arrange - String firstMessage = "hello!"; - String secondMessage = "What is the weather in Boston?"; - - Method function = - ITChatSessionIntegrationTest.class.getMethod("getCurrentWeather", String.class); - Tool tool = - Tool.newBuilder() - .addFunctionDeclarations( - FunctionDeclarationMaker.fromFunc( - "Get the current weather in a given location", function, "location")) - .build(); - ImmutableList tools = ImmutableList.of(tool); - - Content functionResponse = - ContentMaker.fromMultiModalData( - PartMaker.fromFunctionResponse( - "getCurrentWeather", Collections.singletonMap("currentWeather", "snowing"))); - - // Act - chat = model.startChat(); - GenerateContentResponse firstResponse = chat.sendMessage(firstMessage); - GenerateContentResponse secondResponse = chat.withTools(tools).sendMessage(secondMessage); - GenerateContentResponse thirdResponse = chat.sendMessage(functionResponse); - ImmutableList history = chat.getHistory(); - - // Assert - assertThat(firstResponse.getCandidatesList()).hasSize(1); - assertThat(secondResponse.getCandidatesList()).hasSize(1); - assertThat(ResponseHandler.getFunctionCalls(secondResponse).size()).isEqualTo(1); - assertThat(thirdResponse.getCandidatesList()).hasSize(1); - assertSizeAndAlternatingRolesInHistory( - Thread.currentThread().getStackTrace()[1].getMethodName(), - history, - 6, - ImmutableList.of( - ContentMaker.fromString(firstMessage), - ContentMaker.fromString(secondMessage), - functionResponse)); - } - - @Test - public void sendMessageWithAutomaticFunctionCalling_autoRespondToFunctionCall() - throws IOException, NoSuchMethodException { - // Arrange - String message = "What is the weather in Boston?"; - Method function = - ITChatSessionIntegrationTest.class.getMethod("getCurrentWeather", String.class); - Tool tool = - Tool.newBuilder() - .addFunctionDeclarations( - FunctionDeclarationMaker.fromFunc( - "Get the current weather in a given location", function, "location")) - .build(); - ImmutableList tools = ImmutableList.of(tool); - - AutomaticFunctionCallingResponder responder = new AutomaticFunctionCallingResponder(); - responder.addCallableFunction("getCurrentWeather", function, "location"); - - // Act - chat = model.startChat(); - GenerateContentResponse response = - chat.withTools(tools).withAutomaticFunctionCallingResponder(responder).sendMessage(message); - - // Assert - assertThat(response.getCandidatesList()).hasSize(1); - // The final response should not contain any function calls since the function was called - // automatically. - assertThat(ResponseHandler.getFunctionCalls(response)).isEmpty(); - - ImmutableList history = chat.getHistory(); - Content expectedFunctionResponse = - ContentMaker.fromMultiModalData( - PartMaker.fromFunctionResponse( - "getCurrentWeather", Collections.singletonMap("result", "snowing"))); - assertSizeAndAlternatingRolesInHistory( - Thread.currentThread().getStackTrace()[1].getMethodName(), - history, - 4, - ImmutableList.of(ContentMaker.fromString(message), expectedFunctionResponse)); - } -} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITGenerativeModelIntegrationTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITGenerativeModelIntegrationTest.java deleted file mode 100644 index 5c3316ab3975..000000000000 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITGenerativeModelIntegrationTest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.it; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.core.ApiFuture; -import com.google.cloud.vertexai.Transport; -import com.google.cloud.vertexai.VertexAI; -import com.google.cloud.vertexai.api.Content; -import com.google.cloud.vertexai.api.CountTokensResponse; -import com.google.cloud.vertexai.api.GenerateContentResponse; -import com.google.cloud.vertexai.api.GenerationConfig; -import com.google.cloud.vertexai.api.HarmCategory; -import com.google.cloud.vertexai.api.Part; -import com.google.cloud.vertexai.api.SafetySetting; -import com.google.cloud.vertexai.generativeai.ContentMaker; -import com.google.cloud.vertexai.generativeai.GenerativeModel; -import com.google.cloud.vertexai.generativeai.PartMaker; -import com.google.cloud.vertexai.generativeai.ResponseHandler; -import com.google.cloud.vertexai.generativeai.ResponseStream; -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.net.URL; -import java.util.Arrays; -import java.util.logging.Logger; -import javax.imageio.ImageIO; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestName; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class ITGenerativeModelIntegrationTest { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String MODEL_NAME_TEXT = "gemini-1.5-pro-002"; - private static final String MODEL_NAME_MULTIMODAL = "gemini-1.5-pro-002"; - private static final String MODEL_NAME_LATEST_GEMINI = "gemini-1.5-pro-002"; - private static final String LOCATION = "us-central1"; - - // Tested content - private static final String TEXT = "What do you think about Google Pixel?"; - private static final String PIRATE_INSTRUCTION = "Speak like a pirate when answering questions."; - private static final String IMAGE_INQUIRY = "Please describe this image: "; - private static final String IMAGE_URL = "https://picsum.photos/id/1/200/300"; - private static final String VIDEO_INQUIRY = "Please summarize this video: "; - private static final String GCS_VIDEO_URI = "gs://cloud-samples-data-us-central1/video/pizza.mp4"; - private static final String GCS_IMAGE_URI = - "gs://cloud-samples-data-us-central1/vision/duck_and_truck.jpg"; - - private static final Logger logger = - Logger.getLogger(ITGenerativeModelIntegrationTest.class.getName()); - - private VertexAI vertexAi; - private GenerativeModel textModel; - private GenerativeModel multiModalModel; - private GenerativeModel latestGemini; - - @Rule public TestName name = new TestName(); - - @Before - public void setUp() throws IOException { - vertexAi = new VertexAI(PROJECT_ID, LOCATION); - // Set temperature to 0 to reduce randomness on model responses - GenerationConfig defaultGenerationConfig = - GenerationConfig.newBuilder().setTemperature(0).build(); - textModel = - new GenerativeModel(MODEL_NAME_TEXT, vertexAi) - .withGenerationConfig(defaultGenerationConfig); - multiModalModel = - new GenerativeModel(MODEL_NAME_MULTIMODAL, vertexAi) - .withGenerationConfig(defaultGenerationConfig); - latestGemini = - new GenerativeModel(MODEL_NAME_LATEST_GEMINI, vertexAi) - .withGenerationConfig(defaultGenerationConfig); - } - - @After - public void tearDown() throws IOException { - vertexAi.close(); - } - - private static byte[] imageToBytes(URL imageUrl) throws Exception { - BufferedImage bImage = ImageIO.read(imageUrl); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ImageIO.write(bImage, "jpeg", bos); - byte[] data = bos.toByteArray(); - return data; - } - - private static void assertNonEmptyAndLogResponse( - String testCaseName, String prompt, GenerateContentResponse response) { - // GenAI output is flaky so we always print out the response. - // For the same reason, we don't do assertions much. - logger.info( - String.format("%s: Print response for prompt \"%s\":\n%s", testCaseName, prompt, response)); - assertThat(response.getCandidatesList()).isNotEmpty(); - } - - private static void assertNonEmptyAndLogTextContentOfResponseStream( - String testCaseName, String prompt, ResponseStream stream) { - // GenAI output is flaky so we always print out the response. - // For the same reason, we don't do assertions much. - for (GenerateContentResponse resp : stream) { - assertThat(resp.getCandidatesList()).isNotEmpty(); - logger.info( - String.format( - "%s: Print streaming response for prompt \"%s\":\n%s", - testCaseName, prompt, ResponseHandler.getText(resp))); - } - } - - @Test - public void generateContent_restTransportWithTunedModel_nonEmptyCandidateList() - throws IOException { - try (VertexAI vertexAiViaRest = new VertexAI.Builder().setTransport(Transport.REST).build()) { - GenerativeModel textModelWithRest = - new GenerativeModel( - "projects/964831358985/locations/us-central1/endpoints/7226683110069370880", - vertexAiViaRest); - GenerateContentResponse response = textModelWithRest.generateContent(TEXT); - - assertNonEmptyAndLogResponse(name.getMethodName(), TEXT, response); - } - } - - @Test - public void generateContent_withPlainText_nonEmptyCandidateList() throws IOException { - try (final VertexAI vertexAiInferredArgs = new VertexAI()) { - final GenerativeModel textModel = - new GenerativeModel(MODEL_NAME_TEXT, vertexAiInferredArgs) - .withGenerationConfig(GenerationConfig.newBuilder().setTemperature(0).build()); - GenerateContentResponse response = textModel.generateContent(TEXT); - - assertNonEmptyAndLogResponse(name.getMethodName(), TEXT, response); - } - } - - @Test - public void generateContent_withCompleteConfig_nonEmptyCandidateList() throws IOException { - Integer maxOutputTokens = 50; - GenerationConfig generationConfig = - GenerationConfig.newBuilder() - .setMaxOutputTokens(maxOutputTokens) - .setTemperature(0) - .setTopP(0.3f) - .setTopK(2) - .addStopSequences("") - .build(); - SafetySetting safetySetting = - SafetySetting.newBuilder() - .setCategory(HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT) - .setThreshold(SafetySetting.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE) - .build(); - GenerativeModel newModel = - textModel - .withGenerationConfig(generationConfig) - .withSafetySettings(Arrays.asList(safetySetting)); - - GenerateContentResponse response = newModel.generateContent(TEXT); - String contentText = ResponseHandler.getText(response); - int numWords = contentText.split("\\s+").length; - - assertNonEmptyAndLogResponse(name.getMethodName(), TEXT, response); - // We avoid calling the countTokens service and just assert that the number of words should be - // less than the maxOutputTokens since each word on average results in more than one tokens. - assertThat(numWords).isAtMost(maxOutputTokens); - } - - @Test - public void generateContentAsync_withPlainText_nonEmptyCandidateList() throws Exception { - ApiFuture responseFuture = textModel.generateContentAsync(TEXT); - GenerateContentResponse response = responseFuture.get(); - - assertNonEmptyAndLogResponse(name.getMethodName(), TEXT, response); - } - - @Test - public void generateContent_withContentList_nonEmptyCandidate() throws IOException { - String followupPrompt = "Why do you think these two things are put together?"; - GenerateContentResponse response = - latestGemini.generateContent( - Arrays.asList( - // First Content is from the user (default role is 'user') - ContentMaker.fromMultiModalData( - "Please describe this image.", - PartMaker.fromMimeTypeAndData("image/jpeg", GCS_IMAGE_URI)), - // Second Content is from the model - ContentMaker.forRole("model") - .fromString( - "This is an image of a yellow rubber duck and a blue toy truck. The duck is" - + " on the left and the truck is on the right."), - // Another followup question from the user; "user" is the default role so we omit - // can it. Same for `fromMultiModalList` - ContentMaker.fromString(followupPrompt))); - - assertNonEmptyAndLogResponse(name.getMethodName(), followupPrompt, response); - } - - @Test - public void generateContentStream_withPlainText_nonEmptyCandidateList() throws IOException { - ResponseStream stream = textModel.generateContentStream(TEXT); - - assertNonEmptyAndLogTextContentOfResponseStream(name.getMethodName(), TEXT, stream); - } - - // TODO(b/333866041): Re-enable byteImage test - @Ignore("TODO(b/333866041):The test is not compatible with GraalVM native image test on GitHub.") - @Test - public void generateContentStream_withByteImage_nonEmptyCandidateList() throws Exception { - ResponseStream stream = - multiModalModel.generateContentStream( - ContentMaker.fromMultiModalData( - IMAGE_INQUIRY, - PartMaker.fromMimeTypeAndData("image/jpeg", imageToBytes(new URL(IMAGE_URL))))); - - assertNonEmptyAndLogTextContentOfResponseStream(name.getMethodName(), IMAGE_INQUIRY, stream); - } - - @Test - public void generateContentStream_withGcsVideo_nonEmptyCandidateList() throws Exception { - Part videoPart = PartMaker.fromMimeTypeAndData("video/mp4", GCS_VIDEO_URI); - Content content = ContentMaker.fromMultiModalData(VIDEO_INQUIRY, videoPart); - - ResponseStream stream = multiModalModel.generateContentStream(content); - - assertNonEmptyAndLogTextContentOfResponseStream(name.getMethodName(), VIDEO_INQUIRY, stream); - } - - @Test - public void generateContentStream_withGcsImage_nonEmptyCandidateList() throws Exception { - Part imagePart = PartMaker.fromMimeTypeAndData("image/jpeg", GCS_IMAGE_URI); - Content content = ContentMaker.fromMultiModalData(IMAGE_INQUIRY, imagePart); - - ResponseStream stream = multiModalModel.generateContentStream(content); - - assertNonEmptyAndLogTextContentOfResponseStream(name.getMethodName(), IMAGE_INQUIRY, stream); - } - - @Test - public void countTokens_withPlainText_returnsNonZeroTokens() throws IOException { - CountTokensResponse tokens = textModel.countTokens(TEXT); - - // GenAI output is flaky so we always print out the response. - // For the same reason, we don't do assertions much. - logger.info(String.format("Print number of tokens:\n%s", tokens)); - assertThat(tokens.getTotalTokens()).isGreaterThan(0); - } - - @Test - public void generateContent_withSystemInstruction() throws Exception { - GenerativeModel pirateModel = - textModel.withSystemInstruction(ContentMaker.fromString(PIRATE_INSTRUCTION)); - - // GenAI output is flaky so we always print out the response. - // For the same reason, we don't do assertions much. - GenerateContentResponse pirateResponse = pirateModel.generateContent(TEXT); - assertNonEmptyAndLogResponse(name.getMethodName(), TEXT, pirateResponse); - } -} diff --git a/java-vertexai/grpc-google-cloud-vertexai-v1/pom.xml b/java-vertexai/grpc-google-cloud-vertexai-v1/pom.xml deleted file mode 100644 index 7c19009b1fe1..000000000000 --- a/java-vertexai/grpc-google-cloud-vertexai-v1/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - grpc-google-cloud-vertexai-v1 - GRPC library for google-cloud-vertexai - - com.google.cloud - google-cloud-vertexai-parent - 1.49.0-SNAPSHOT - - - - 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-vertexai-v1 - - - com.google.guava - guava - - - diff --git a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceGrpc.java b/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceGrpc.java deleted file mode 100644 index 6123cf576058..000000000000 --- a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceGrpc.java +++ /dev/null @@ -1,1470 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.api; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * A service for managing Vertex AI's Endpoints.
- * 
- */ -@io.grpc.stub.annotations.GrpcGenerated -public final class EndpointServiceGrpc { - - private EndpointServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = "google.cloud.aiplatform.v1.EndpointService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CreateEndpointRequest, com.google.longrunning.Operation> - getCreateEndpointMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateEndpoint", - requestType = com.google.cloud.vertexai.api.CreateEndpointRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CreateEndpointRequest, com.google.longrunning.Operation> - getCreateEndpointMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CreateEndpointRequest, com.google.longrunning.Operation> - getCreateEndpointMethod; - if ((getCreateEndpointMethod = EndpointServiceGrpc.getCreateEndpointMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getCreateEndpointMethod = EndpointServiceGrpc.getCreateEndpointMethod) == null) { - EndpointServiceGrpc.getCreateEndpointMethod = - getCreateEndpointMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEndpoint")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.CreateEndpointRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("CreateEndpoint")) - .build(); - } - } - } - return getCreateEndpointMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GetEndpointRequest, com.google.cloud.vertexai.api.Endpoint> - getGetEndpointMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetEndpoint", - requestType = com.google.cloud.vertexai.api.GetEndpointRequest.class, - responseType = com.google.cloud.vertexai.api.Endpoint.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GetEndpointRequest, com.google.cloud.vertexai.api.Endpoint> - getGetEndpointMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GetEndpointRequest, - com.google.cloud.vertexai.api.Endpoint> - getGetEndpointMethod; - if ((getGetEndpointMethod = EndpointServiceGrpc.getGetEndpointMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getGetEndpointMethod = EndpointServiceGrpc.getGetEndpointMethod) == null) { - EndpointServiceGrpc.getGetEndpointMethod = - getGetEndpointMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEndpoint")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.GetEndpointRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.Endpoint.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("GetEndpoint")) - .build(); - } - } - } - return getGetEndpointMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ListEndpointsRequest, - com.google.cloud.vertexai.api.ListEndpointsResponse> - getListEndpointsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListEndpoints", - requestType = com.google.cloud.vertexai.api.ListEndpointsRequest.class, - responseType = com.google.cloud.vertexai.api.ListEndpointsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ListEndpointsRequest, - com.google.cloud.vertexai.api.ListEndpointsResponse> - getListEndpointsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ListEndpointsRequest, - com.google.cloud.vertexai.api.ListEndpointsResponse> - getListEndpointsMethod; - if ((getListEndpointsMethod = EndpointServiceGrpc.getListEndpointsMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getListEndpointsMethod = EndpointServiceGrpc.getListEndpointsMethod) == null) { - EndpointServiceGrpc.getListEndpointsMethod = - getListEndpointsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndpoints")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ListEndpointsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ListEndpointsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("ListEndpoints")) - .build(); - } - } - } - return getListEndpointsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointRequest, - com.google.cloud.vertexai.api.Endpoint> - getUpdateEndpointMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateEndpoint", - requestType = com.google.cloud.vertexai.api.UpdateEndpointRequest.class, - responseType = com.google.cloud.vertexai.api.Endpoint.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointRequest, - com.google.cloud.vertexai.api.Endpoint> - getUpdateEndpointMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointRequest, - com.google.cloud.vertexai.api.Endpoint> - getUpdateEndpointMethod; - if ((getUpdateEndpointMethod = EndpointServiceGrpc.getUpdateEndpointMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getUpdateEndpointMethod = EndpointServiceGrpc.getUpdateEndpointMethod) == null) { - EndpointServiceGrpc.getUpdateEndpointMethod = - getUpdateEndpointMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEndpoint")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.UpdateEndpointRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.Endpoint.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("UpdateEndpoint")) - .build(); - } - } - } - return getUpdateEndpointMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest, - com.google.longrunning.Operation> - getUpdateEndpointLongRunningMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateEndpointLongRunning", - requestType = com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest, - com.google.longrunning.Operation> - getUpdateEndpointLongRunningMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest, - com.google.longrunning.Operation> - getUpdateEndpointLongRunningMethod; - if ((getUpdateEndpointLongRunningMethod = - EndpointServiceGrpc.getUpdateEndpointLongRunningMethod) - == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getUpdateEndpointLongRunningMethod = - EndpointServiceGrpc.getUpdateEndpointLongRunningMethod) - == null) { - EndpointServiceGrpc.getUpdateEndpointLongRunningMethod = - getUpdateEndpointLongRunningMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateEndpointLongRunning")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("UpdateEndpointLongRunning")) - .build(); - } - } - } - return getUpdateEndpointLongRunningMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeleteEndpointRequest, com.google.longrunning.Operation> - getDeleteEndpointMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteEndpoint", - requestType = com.google.cloud.vertexai.api.DeleteEndpointRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeleteEndpointRequest, com.google.longrunning.Operation> - getDeleteEndpointMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeleteEndpointRequest, com.google.longrunning.Operation> - getDeleteEndpointMethod; - if ((getDeleteEndpointMethod = EndpointServiceGrpc.getDeleteEndpointMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getDeleteEndpointMethod = EndpointServiceGrpc.getDeleteEndpointMethod) == null) { - EndpointServiceGrpc.getDeleteEndpointMethod = - getDeleteEndpointMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEndpoint")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DeleteEndpointRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("DeleteEndpoint")) - .build(); - } - } - } - return getDeleteEndpointMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeployModel", - requestType = com.google.cloud.vertexai.api.DeployModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod; - if ((getDeployModelMethod = EndpointServiceGrpc.getDeployModelMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getDeployModelMethod = EndpointServiceGrpc.getDeployModelMethod) == null) { - EndpointServiceGrpc.getDeployModelMethod = - getDeployModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeployModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DeployModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("DeployModel")) - .build(); - } - } - } - return getDeployModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UndeployModel", - requestType = com.google.cloud.vertexai.api.UndeployModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod; - if ((getUndeployModelMethod = EndpointServiceGrpc.getUndeployModelMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getUndeployModelMethod = EndpointServiceGrpc.getUndeployModelMethod) == null) { - EndpointServiceGrpc.getUndeployModelMethod = - getUndeployModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeployModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.UndeployModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("UndeployModel")) - .build(); - } - } - } - return getUndeployModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.MutateDeployedModelRequest, - com.google.longrunning.Operation> - getMutateDeployedModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MutateDeployedModel", - requestType = com.google.cloud.vertexai.api.MutateDeployedModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.MutateDeployedModelRequest, - com.google.longrunning.Operation> - getMutateDeployedModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.MutateDeployedModelRequest, - com.google.longrunning.Operation> - getMutateDeployedModelMethod; - if ((getMutateDeployedModelMethod = EndpointServiceGrpc.getMutateDeployedModelMethod) == null) { - synchronized (EndpointServiceGrpc.class) { - if ((getMutateDeployedModelMethod = EndpointServiceGrpc.getMutateDeployedModelMethod) - == null) { - EndpointServiceGrpc.getMutateDeployedModelMethod = - getMutateDeployedModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "MutateDeployedModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.MutateDeployedModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new EndpointServiceMethodDescriptorSupplier("MutateDeployedModel")) - .build(); - } - } - } - return getMutateDeployedModelMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static EndpointServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public EndpointServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceStub(channel, callOptions); - } - }; - return EndpointServiceStub.newStub(factory, channel); - } - - /** Creates a new blocking-style stub that supports all types of calls on the service */ - public static EndpointServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public EndpointServiceBlockingV2Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceBlockingV2Stub(channel, callOptions); - } - }; - return EndpointServiceBlockingV2Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static EndpointServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public EndpointServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceBlockingStub(channel, callOptions); - } - }; - return EndpointServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static EndpointServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public EndpointServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceFutureStub(channel, callOptions); - } - }; - return EndpointServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Creates an Endpoint.
-     * 
- */ - default void createEndpoint( - com.google.cloud.vertexai.api.CreateEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateEndpointMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an Endpoint.
-     * 
- */ - default void getEndpoint( - com.google.cloud.vertexai.api.GetEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetEndpointMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists Endpoints in a Location.
-     * 
- */ - default void listEndpoints( - com.google.cloud.vertexai.api.ListEndpointsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListEndpointsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an Endpoint.
-     * 
- */ - default void updateEndpoint( - com.google.cloud.vertexai.api.UpdateEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateEndpointMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an Endpoint with a long running operation.
-     * 
- */ - default void updateEndpointLongRunning( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateEndpointLongRunningMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes an Endpoint.
-     * 
- */ - default void deleteEndpoint( - com.google.cloud.vertexai.api.DeleteEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteEndpointMethod(), responseObserver); - } - - /** - * - * - *
-     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
-     * 
- */ - default void deployModel( - com.google.cloud.vertexai.api.DeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeployModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
-     * freeing all resources it's using.
-     * 
- */ - default void undeployModel( - com.google.cloud.vertexai.api.UndeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUndeployModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing deployed model. Updatable fields include
-     * `min_replica_count`, `max_replica_count`, `required_replica_count`,
-     * `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and
-     * `enable_container_logging` (v1beta1 only).
-     * 
- */ - default void mutateDeployedModel( - com.google.cloud.vertexai.api.MutateDeployedModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getMutateDeployedModelMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service EndpointService. - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public abstract static class EndpointServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return EndpointServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service EndpointService. - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public static final class EndpointServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private EndpointServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected EndpointServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates an Endpoint.
-     * 
- */ - public void createEndpoint( - com.google.cloud.vertexai.api.CreateEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets an Endpoint.
-     * 
- */ - public void getEndpoint( - com.google.cloud.vertexai.api.GetEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetEndpointMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists Endpoints in a Location.
-     * 
- */ - public void listEndpoints( - com.google.cloud.vertexai.api.ListEndpointsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListEndpointsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an Endpoint.
-     * 
- */ - public void updateEndpoint( - com.google.cloud.vertexai.api.UpdateEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateEndpointMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an Endpoint with a long running operation.
-     * 
- */ - public void updateEndpointLongRunning( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateEndpointLongRunningMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes an Endpoint.
-     * 
- */ - public void deleteEndpoint( - com.google.cloud.vertexai.api.DeleteEndpointRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
-     * 
- */ - public void deployModel( - com.google.cloud.vertexai.api.DeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeployModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
-     * freeing all resources it's using.
-     * 
- */ - public void undeployModel( - com.google.cloud.vertexai.api.UndeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUndeployModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing deployed model. Updatable fields include
-     * `min_replica_count`, `max_replica_count`, `required_replica_count`,
-     * `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and
-     * `enable_container_logging` (v1beta1 only).
-     * 
- */ - public void mutateDeployedModel( - com.google.cloud.vertexai.api.MutateDeployedModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMutateDeployedModelMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service EndpointService. - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public static final class EndpointServiceBlockingV2Stub - extends io.grpc.stub.AbstractBlockingStub { - private EndpointServiceBlockingV2Stub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected EndpointServiceBlockingV2Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceBlockingV2Stub(channel, callOptions); - } - - /** - * - * - *
-     * Creates an Endpoint.
-     * 
- */ - public com.google.longrunning.Operation createEndpoint( - com.google.cloud.vertexai.api.CreateEndpointRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getCreateEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an Endpoint.
-     * 
- */ - public com.google.cloud.vertexai.api.Endpoint getEndpoint( - com.google.cloud.vertexai.api.GetEndpointRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists Endpoints in a Location.
-     * 
- */ - public com.google.cloud.vertexai.api.ListEndpointsResponse listEndpoints( - com.google.cloud.vertexai.api.ListEndpointsRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getListEndpointsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an Endpoint.
-     * 
- */ - public com.google.cloud.vertexai.api.Endpoint updateEndpoint( - com.google.cloud.vertexai.api.UpdateEndpointRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getUpdateEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an Endpoint with a long running operation.
-     * 
- */ - public com.google.longrunning.Operation updateEndpointLongRunning( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getUpdateEndpointLongRunningMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an Endpoint.
-     * 
- */ - public com.google.longrunning.Operation deleteEndpoint( - com.google.cloud.vertexai.api.DeleteEndpointRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getDeleteEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
-     * 
- */ - public com.google.longrunning.Operation deployModel( - com.google.cloud.vertexai.api.DeployModelRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getDeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
-     * freeing all resources it's using.
-     * 
- */ - public com.google.longrunning.Operation undeployModel( - com.google.cloud.vertexai.api.UndeployModelRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getUndeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing deployed model. Updatable fields include
-     * `min_replica_count`, `max_replica_count`, `required_replica_count`,
-     * `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and
-     * `enable_container_logging` (v1beta1 only).
-     * 
- */ - public com.google.longrunning.Operation mutateDeployedModel( - com.google.cloud.vertexai.api.MutateDeployedModelRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getMutateDeployedModelMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do limited synchronous rpc calls to service EndpointService. - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public static final class EndpointServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private EndpointServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected EndpointServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates an Endpoint.
-     * 
- */ - public com.google.longrunning.Operation createEndpoint( - com.google.cloud.vertexai.api.CreateEndpointRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an Endpoint.
-     * 
- */ - public com.google.cloud.vertexai.api.Endpoint getEndpoint( - com.google.cloud.vertexai.api.GetEndpointRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists Endpoints in a Location.
-     * 
- */ - public com.google.cloud.vertexai.api.ListEndpointsResponse listEndpoints( - com.google.cloud.vertexai.api.ListEndpointsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEndpointsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an Endpoint.
-     * 
- */ - public com.google.cloud.vertexai.api.Endpoint updateEndpoint( - com.google.cloud.vertexai.api.UpdateEndpointRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an Endpoint with a long running operation.
-     * 
- */ - public com.google.longrunning.Operation updateEndpointLongRunning( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateEndpointLongRunningMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an Endpoint.
-     * 
- */ - public com.google.longrunning.Operation deleteEndpoint( - com.google.cloud.vertexai.api.DeleteEndpointRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteEndpointMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
-     * 
- */ - public com.google.longrunning.Operation deployModel( - com.google.cloud.vertexai.api.DeployModelRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
-     * freeing all resources it's using.
-     * 
- */ - public com.google.longrunning.Operation undeployModel( - com.google.cloud.vertexai.api.UndeployModelRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUndeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing deployed model. Updatable fields include
-     * `min_replica_count`, `max_replica_count`, `required_replica_count`,
-     * `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and
-     * `enable_container_logging` (v1beta1 only).
-     * 
- */ - public com.google.longrunning.Operation mutateDeployedModel( - com.google.cloud.vertexai.api.MutateDeployedModelRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMutateDeployedModelMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service EndpointService. - * - *
-   * A service for managing Vertex AI's Endpoints.
-   * 
- */ - public static final class EndpointServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private EndpointServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected EndpointServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new EndpointServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates an Endpoint.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createEndpoint(com.google.cloud.vertexai.api.CreateEndpointRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an Endpoint.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.Endpoint> - getEndpoint(com.google.cloud.vertexai.api.GetEndpointRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetEndpointMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists Endpoints in a Location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.ListEndpointsResponse> - listEndpoints(com.google.cloud.vertexai.api.ListEndpointsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an Endpoint.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.Endpoint> - updateEndpoint(com.google.cloud.vertexai.api.UpdateEndpointRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateEndpointMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an Endpoint with a long running operation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateEndpointLongRunning( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateEndpointLongRunningMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes an Endpoint.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteEndpoint(com.google.cloud.vertexai.api.DeleteEndpointRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deploys a Model into this Endpoint, creating a DeployedModel within it.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deployModel(com.google.cloud.vertexai.api.DeployModelRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeployModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
-     * freeing all resources it's using.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - undeployModel(com.google.cloud.vertexai.api.UndeployModelRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUndeployModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an existing deployed model. Updatable fields include
-     * `min_replica_count`, `max_replica_count`, `required_replica_count`,
-     * `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and
-     * `enable_container_logging` (v1beta1 only).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - mutateDeployedModel(com.google.cloud.vertexai.api.MutateDeployedModelRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMutateDeployedModelMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_ENDPOINT = 0; - private static final int METHODID_GET_ENDPOINT = 1; - private static final int METHODID_LIST_ENDPOINTS = 2; - private static final int METHODID_UPDATE_ENDPOINT = 3; - private static final int METHODID_UPDATE_ENDPOINT_LONG_RUNNING = 4; - private static final int METHODID_DELETE_ENDPOINT = 5; - private static final int METHODID_DEPLOY_MODEL = 6; - private static final int METHODID_UNDEPLOY_MODEL = 7; - private static final int METHODID_MUTATE_DEPLOYED_MODEL = 8; - - 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_CREATE_ENDPOINT: - serviceImpl.createEndpoint( - (com.google.cloud.vertexai.api.CreateEndpointRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ENDPOINT: - serviceImpl.getEndpoint( - (com.google.cloud.vertexai.api.GetEndpointRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_ENDPOINTS: - serviceImpl.listEndpoints( - (com.google.cloud.vertexai.api.ListEndpointsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_ENDPOINT: - serviceImpl.updateEndpoint( - (com.google.cloud.vertexai.api.UpdateEndpointRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_ENDPOINT_LONG_RUNNING: - serviceImpl.updateEndpointLongRunning( - (com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_ENDPOINT: - serviceImpl.deleteEndpoint( - (com.google.cloud.vertexai.api.DeleteEndpointRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEPLOY_MODEL: - serviceImpl.deployModel( - (com.google.cloud.vertexai.api.DeployModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNDEPLOY_MODEL: - serviceImpl.undeployModel( - (com.google.cloud.vertexai.api.UndeployModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MUTATE_DEPLOYED_MODEL: - serviceImpl.mutateDeployedModel( - (com.google.cloud.vertexai.api.MutateDeployedModelRequest) 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( - getCreateEndpointMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.CreateEndpointRequest, - com.google.longrunning.Operation>(service, METHODID_CREATE_ENDPOINT))) - .addMethod( - getGetEndpointMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.GetEndpointRequest, - com.google.cloud.vertexai.api.Endpoint>(service, METHODID_GET_ENDPOINT))) - .addMethod( - getListEndpointsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.ListEndpointsRequest, - com.google.cloud.vertexai.api.ListEndpointsResponse>( - service, METHODID_LIST_ENDPOINTS))) - .addMethod( - getUpdateEndpointMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.UpdateEndpointRequest, - com.google.cloud.vertexai.api.Endpoint>(service, METHODID_UPDATE_ENDPOINT))) - .addMethod( - getUpdateEndpointLongRunningMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest, - com.google.longrunning.Operation>( - service, METHODID_UPDATE_ENDPOINT_LONG_RUNNING))) - .addMethod( - getDeleteEndpointMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.DeleteEndpointRequest, - com.google.longrunning.Operation>(service, METHODID_DELETE_ENDPOINT))) - .addMethod( - getDeployModelMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.DeployModelRequest, - com.google.longrunning.Operation>(service, METHODID_DEPLOY_MODEL))) - .addMethod( - getUndeployModelMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.UndeployModelRequest, - com.google.longrunning.Operation>(service, METHODID_UNDEPLOY_MODEL))) - .addMethod( - getMutateDeployedModelMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.MutateDeployedModelRequest, - com.google.longrunning.Operation>(service, METHODID_MUTATE_DEPLOYED_MODEL))) - .build(); - } - - private abstract static class EndpointServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - EndpointServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("EndpointService"); - } - } - - private static final class EndpointServiceFileDescriptorSupplier - extends EndpointServiceBaseDescriptorSupplier { - EndpointServiceFileDescriptorSupplier() {} - } - - private static final class EndpointServiceMethodDescriptorSupplier - extends EndpointServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - EndpointServiceMethodDescriptorSupplier(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 (EndpointServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new EndpointServiceFileDescriptorSupplier()) - .addMethod(getCreateEndpointMethod()) - .addMethod(getGetEndpointMethod()) - .addMethod(getListEndpointsMethod()) - .addMethod(getUpdateEndpointMethod()) - .addMethod(getUpdateEndpointLongRunningMethod()) - .addMethod(getDeleteEndpointMethod()) - .addMethod(getDeployModelMethod()) - .addMethod(getUndeployModelMethod()) - .addMethod(getMutateDeployedModelMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceGrpc.java b/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceGrpc.java deleted file mode 100644 index 4536025e8f07..000000000000 --- a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceGrpc.java +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.api; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Service for LLM related utility functions.
- * 
- */ -@io.grpc.stub.annotations.GrpcGenerated -public final class LlmUtilityServiceGrpc { - - private LlmUtilityServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = - "google.cloud.aiplatform.v1.LlmUtilityService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CountTokensRequest, - com.google.cloud.vertexai.api.CountTokensResponse> - getCountTokensMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CountTokens", - requestType = com.google.cloud.vertexai.api.CountTokensRequest.class, - responseType = com.google.cloud.vertexai.api.CountTokensResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CountTokensRequest, - com.google.cloud.vertexai.api.CountTokensResponse> - getCountTokensMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.CountTokensRequest, - com.google.cloud.vertexai.api.CountTokensResponse> - getCountTokensMethod; - if ((getCountTokensMethod = LlmUtilityServiceGrpc.getCountTokensMethod) == null) { - synchronized (LlmUtilityServiceGrpc.class) { - if ((getCountTokensMethod = LlmUtilityServiceGrpc.getCountTokensMethod) == null) { - LlmUtilityServiceGrpc.getCountTokensMethod = - getCountTokensMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CountTokens")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.CountTokensRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.CountTokensResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new LlmUtilityServiceMethodDescriptorSupplier("CountTokens")) - .build(); - } - } - } - return getCountTokensMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ComputeTokensRequest, - com.google.cloud.vertexai.api.ComputeTokensResponse> - getComputeTokensMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ComputeTokens", - requestType = com.google.cloud.vertexai.api.ComputeTokensRequest.class, - responseType = com.google.cloud.vertexai.api.ComputeTokensResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ComputeTokensRequest, - com.google.cloud.vertexai.api.ComputeTokensResponse> - getComputeTokensMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ComputeTokensRequest, - com.google.cloud.vertexai.api.ComputeTokensResponse> - getComputeTokensMethod; - if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { - synchronized (LlmUtilityServiceGrpc.class) { - if ((getComputeTokensMethod = LlmUtilityServiceGrpc.getComputeTokensMethod) == null) { - LlmUtilityServiceGrpc.getComputeTokensMethod = - getComputeTokensMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ComputeTokens")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ComputeTokensRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ComputeTokensResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new LlmUtilityServiceMethodDescriptorSupplier("ComputeTokens")) - .build(); - } - } - } - return getComputeTokensMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static LlmUtilityServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LlmUtilityServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceStub(channel, callOptions); - } - }; - return LlmUtilityServiceStub.newStub(factory, channel); - } - - /** Creates a new blocking-style stub that supports all types of calls on the service */ - public static LlmUtilityServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LlmUtilityServiceBlockingV2Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceBlockingV2Stub(channel, callOptions); - } - }; - return LlmUtilityServiceBlockingV2Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static LlmUtilityServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LlmUtilityServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceBlockingStub(channel, callOptions); - } - }; - return LlmUtilityServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static LlmUtilityServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public LlmUtilityServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceFutureStub(channel, callOptions); - } - }; - return LlmUtilityServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Perform a token counting.
-     * 
- */ - default void countTokens( - com.google.cloud.vertexai.api.CountTokensRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCountTokensMethod(), responseObserver); - } - - /** - * - * - *
-     * Return a list of tokens based on the input text.
-     * 
- */ - default void computeTokens( - com.google.cloud.vertexai.api.ComputeTokensRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getComputeTokensMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service LlmUtilityService. - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public abstract static class LlmUtilityServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return LlmUtilityServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service LlmUtilityService. - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public static final class LlmUtilityServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private LlmUtilityServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LlmUtilityServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform a token counting.
-     * 
- */ - public void countTokens( - com.google.cloud.vertexai.api.CountTokensRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCountTokensMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Return a list of tokens based on the input text.
-     * 
- */ - public void computeTokens( - com.google.cloud.vertexai.api.ComputeTokensRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getComputeTokensMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service LlmUtilityService. - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public static final class LlmUtilityServiceBlockingV2Stub - extends io.grpc.stub.AbstractBlockingStub { - private LlmUtilityServiceBlockingV2Stub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LlmUtilityServiceBlockingV2Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceBlockingV2Stub(channel, callOptions); - } - - /** - * - * - *
-     * Perform a token counting.
-     * 
- */ - public com.google.cloud.vertexai.api.CountTokensResponse countTokens( - com.google.cloud.vertexai.api.CountTokensRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getCountTokensMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Return a list of tokens based on the input text.
-     * 
- */ - public com.google.cloud.vertexai.api.ComputeTokensResponse computeTokens( - com.google.cloud.vertexai.api.ComputeTokensRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getComputeTokensMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do limited synchronous rpc calls to service LlmUtilityService. - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public static final class LlmUtilityServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private LlmUtilityServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LlmUtilityServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform a token counting.
-     * 
- */ - public com.google.cloud.vertexai.api.CountTokensResponse countTokens( - com.google.cloud.vertexai.api.CountTokensRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCountTokensMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Return a list of tokens based on the input text.
-     * 
- */ - public com.google.cloud.vertexai.api.ComputeTokensResponse computeTokens( - com.google.cloud.vertexai.api.ComputeTokensRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getComputeTokensMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service LlmUtilityService. - * - *
-   * Service for LLM related utility functions.
-   * 
- */ - public static final class LlmUtilityServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private LlmUtilityServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected LlmUtilityServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new LlmUtilityServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform a token counting.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.CountTokensResponse> - countTokens(com.google.cloud.vertexai.api.CountTokensRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCountTokensMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Return a list of tokens based on the input text.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.ComputeTokensResponse> - computeTokens(com.google.cloud.vertexai.api.ComputeTokensRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getComputeTokensMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_COUNT_TOKENS = 0; - private static final int METHODID_COMPUTE_TOKENS = 1; - - 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_COUNT_TOKENS: - serviceImpl.countTokens( - (com.google.cloud.vertexai.api.CountTokensRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_COMPUTE_TOKENS: - serviceImpl.computeTokens( - (com.google.cloud.vertexai.api.ComputeTokensRequest) 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( - getCountTokensMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.CountTokensRequest, - com.google.cloud.vertexai.api.CountTokensResponse>( - service, METHODID_COUNT_TOKENS))) - .addMethod( - getComputeTokensMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.ComputeTokensRequest, - com.google.cloud.vertexai.api.ComputeTokensResponse>( - service, METHODID_COMPUTE_TOKENS))) - .build(); - } - - private abstract static class LlmUtilityServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - LlmUtilityServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("LlmUtilityService"); - } - } - - private static final class LlmUtilityServiceFileDescriptorSupplier - extends LlmUtilityServiceBaseDescriptorSupplier { - LlmUtilityServiceFileDescriptorSupplier() {} - } - - private static final class LlmUtilityServiceMethodDescriptorSupplier - extends LlmUtilityServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - LlmUtilityServiceMethodDescriptorSupplier(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 (LlmUtilityServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new LlmUtilityServiceFileDescriptorSupplier()) - .addMethod(getCountTokensMethod()) - .addMethod(getComputeTokensMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java b/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java deleted file mode 100644 index 03599dcee4f2..000000000000 --- a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java +++ /dev/null @@ -1,2114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.vertexai.api; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * A service for online predictions and explanations.
- * 
- */ -@io.grpc.stub.annotations.GrpcGenerated -public final class PredictionServiceGrpc { - - private PredictionServiceGrpc() {} - - public static final java.lang.String SERVICE_NAME = - "google.cloud.aiplatform.v1.PredictionService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.PredictRequest, - com.google.cloud.vertexai.api.PredictResponse> - getPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "Predict", - requestType = com.google.cloud.vertexai.api.PredictRequest.class, - responseType = com.google.cloud.vertexai.api.PredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.PredictRequest, - com.google.cloud.vertexai.api.PredictResponse> - getPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.PredictRequest, - com.google.cloud.vertexai.api.PredictResponse> - getPredictMethod; - if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getPredictMethod = PredictionServiceGrpc.getPredictMethod) == null) { - PredictionServiceGrpc.getPredictMethod = - getPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Predict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.PredictRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.PredictResponse.getDefaultInstance())) - .setSchemaDescriptor(new PredictionServiceMethodDescriptorSupplier("Predict")) - .build(); - } - } - } - return getPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.RawPredictRequest, com.google.api.HttpBody> - getRawPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RawPredict", - requestType = com.google.cloud.vertexai.api.RawPredictRequest.class, - responseType = com.google.api.HttpBody.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.RawPredictRequest, com.google.api.HttpBody> - getRawPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.RawPredictRequest, com.google.api.HttpBody> - getRawPredictMethod; - if ((getRawPredictMethod = PredictionServiceGrpc.getRawPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getRawPredictMethod = PredictionServiceGrpc.getRawPredictMethod) == null) { - PredictionServiceGrpc.getRawPredictMethod = - getRawPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RawPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.RawPredictRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.api.HttpBody.getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("RawPredict")) - .build(); - } - } - } - return getRawPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> - getStreamRawPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamRawPredict", - requestType = com.google.cloud.vertexai.api.StreamRawPredictRequest.class, - responseType = com.google.api.HttpBody.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> - getStreamRawPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> - getStreamRawPredictMethod; - if ((getStreamRawPredictMethod = PredictionServiceGrpc.getStreamRawPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamRawPredictMethod = PredictionServiceGrpc.getStreamRawPredictMethod) == null) { - PredictionServiceGrpc.getStreamRawPredictMethod = - getStreamRawPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamRawPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamRawPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.api.HttpBody.getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamRawPredict")) - .build(); - } - } - } - return getStreamRawPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectPredictRequest, - com.google.cloud.vertexai.api.DirectPredictResponse> - getDirectPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DirectPredict", - requestType = com.google.cloud.vertexai.api.DirectPredictRequest.class, - responseType = com.google.cloud.vertexai.api.DirectPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectPredictRequest, - com.google.cloud.vertexai.api.DirectPredictResponse> - getDirectPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectPredictRequest, - com.google.cloud.vertexai.api.DirectPredictResponse> - getDirectPredictMethod; - if ((getDirectPredictMethod = PredictionServiceGrpc.getDirectPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getDirectPredictMethod = PredictionServiceGrpc.getDirectPredictMethod) == null) { - PredictionServiceGrpc.getDirectPredictMethod = - getDirectPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DirectPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DirectPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DirectPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("DirectPredict")) - .build(); - } - } - } - return getDirectPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectRawPredictRequest, - com.google.cloud.vertexai.api.DirectRawPredictResponse> - getDirectRawPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DirectRawPredict", - requestType = com.google.cloud.vertexai.api.DirectRawPredictRequest.class, - responseType = com.google.cloud.vertexai.api.DirectRawPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectRawPredictRequest, - com.google.cloud.vertexai.api.DirectRawPredictResponse> - getDirectRawPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.DirectRawPredictRequest, - com.google.cloud.vertexai.api.DirectRawPredictResponse> - getDirectRawPredictMethod; - if ((getDirectRawPredictMethod = PredictionServiceGrpc.getDirectRawPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getDirectRawPredictMethod = PredictionServiceGrpc.getDirectRawPredictMethod) == null) { - PredictionServiceGrpc.getDirectRawPredictMethod = - getDirectRawPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DirectRawPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DirectRawPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.DirectRawPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("DirectRawPredict")) - .build(); - } - } - } - return getDirectRawPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectPredictRequest, - com.google.cloud.vertexai.api.StreamDirectPredictResponse> - getStreamDirectPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamDirectPredict", - requestType = com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, - responseType = com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectPredictRequest, - com.google.cloud.vertexai.api.StreamDirectPredictResponse> - getStreamDirectPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectPredictRequest, - com.google.cloud.vertexai.api.StreamDirectPredictResponse> - getStreamDirectPredictMethod; - if ((getStreamDirectPredictMethod = PredictionServiceGrpc.getStreamDirectPredictMethod) - == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamDirectPredictMethod = PredictionServiceGrpc.getStreamDirectPredictMethod) - == null) { - PredictionServiceGrpc.getStreamDirectPredictMethod = - getStreamDirectPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "StreamDirectPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamDirectPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamDirectPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamDirectPredict")) - .build(); - } - } - } - return getStreamDirectPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - getStreamDirectRawPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamDirectRawPredict", - requestType = com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, - responseType = com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - getStreamDirectRawPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - getStreamDirectRawPredictMethod; - if ((getStreamDirectRawPredictMethod = PredictionServiceGrpc.getStreamDirectRawPredictMethod) - == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamDirectRawPredictMethod = - PredictionServiceGrpc.getStreamDirectRawPredictMethod) - == null) { - PredictionServiceGrpc.getStreamDirectRawPredictMethod = - getStreamDirectRawPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "StreamDirectRawPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamDirectRawPredict")) - .build(); - } - } - } - return getStreamDirectRawPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getStreamingPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamingPredict", - requestType = com.google.cloud.vertexai.api.StreamingPredictRequest.class, - responseType = com.google.cloud.vertexai.api.StreamingPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getStreamingPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getStreamingPredictMethod; - if ((getStreamingPredictMethod = PredictionServiceGrpc.getStreamingPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamingPredictMethod = PredictionServiceGrpc.getStreamingPredictMethod) == null) { - PredictionServiceGrpc.getStreamingPredictMethod = - getStreamingPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamingPredict")) - .build(); - } - } - } - return getStreamingPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getServerStreamingPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ServerStreamingPredict", - requestType = com.google.cloud.vertexai.api.StreamingPredictRequest.class, - responseType = com.google.cloud.vertexai.api.StreamingPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getServerStreamingPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - getServerStreamingPredictMethod; - if ((getServerStreamingPredictMethod = PredictionServiceGrpc.getServerStreamingPredictMethod) - == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getServerStreamingPredictMethod = - PredictionServiceGrpc.getServerStreamingPredictMethod) - == null) { - PredictionServiceGrpc.getServerStreamingPredictMethod = - getServerStreamingPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ServerStreamingPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("ServerStreamingPredict")) - .build(); - } - } - } - return getServerStreamingPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingRawPredictRequest, - com.google.cloud.vertexai.api.StreamingRawPredictResponse> - getStreamingRawPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamingRawPredict", - requestType = com.google.cloud.vertexai.api.StreamingRawPredictRequest.class, - responseType = com.google.cloud.vertexai.api.StreamingRawPredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingRawPredictRequest, - com.google.cloud.vertexai.api.StreamingRawPredictResponse> - getStreamingRawPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.StreamingRawPredictRequest, - com.google.cloud.vertexai.api.StreamingRawPredictResponse> - getStreamingRawPredictMethod; - if ((getStreamingRawPredictMethod = PredictionServiceGrpc.getStreamingRawPredictMethod) - == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamingRawPredictMethod = PredictionServiceGrpc.getStreamingRawPredictMethod) - == null) { - PredictionServiceGrpc.getStreamingRawPredictMethod = - getStreamingRawPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "StreamingRawPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingRawPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.StreamingRawPredictResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamingRawPredict")) - .build(); - } - } - } - return getStreamingRawPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ExplainRequest, - com.google.cloud.vertexai.api.ExplainResponse> - getExplainMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "Explain", - requestType = com.google.cloud.vertexai.api.ExplainRequest.class, - responseType = com.google.cloud.vertexai.api.ExplainResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ExplainRequest, - com.google.cloud.vertexai.api.ExplainResponse> - getExplainMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.ExplainRequest, - com.google.cloud.vertexai.api.ExplainResponse> - getExplainMethod; - if ((getExplainMethod = PredictionServiceGrpc.getExplainMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getExplainMethod = PredictionServiceGrpc.getExplainMethod) == null) { - PredictionServiceGrpc.getExplainMethod = - getExplainMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Explain")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ExplainRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.ExplainResponse.getDefaultInstance())) - .setSchemaDescriptor(new PredictionServiceMethodDescriptorSupplier("Explain")) - .build(); - } - } - } - return getExplainMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getGenerateContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GenerateContent", - requestType = com.google.cloud.vertexai.api.GenerateContentRequest.class, - responseType = com.google.cloud.vertexai.api.GenerateContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getGenerateContentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getGenerateContentMethod; - if ((getGenerateContentMethod = PredictionServiceGrpc.getGenerateContentMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getGenerateContentMethod = PredictionServiceGrpc.getGenerateContentMethod) == null) { - PredictionServiceGrpc.getGenerateContentMethod = - getGenerateContentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.GenerateContentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.GenerateContentResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("GenerateContent")) - .build(); - } - } - } - return getGenerateContentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getStreamGenerateContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StreamGenerateContent", - requestType = com.google.cloud.vertexai.api.GenerateContentRequest.class, - responseType = com.google.cloud.vertexai.api.GenerateContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getStreamGenerateContentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse> - getStreamGenerateContentMethod; - if ((getStreamGenerateContentMethod = PredictionServiceGrpc.getStreamGenerateContentMethod) - == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getStreamGenerateContentMethod = PredictionServiceGrpc.getStreamGenerateContentMethod) - == null) { - PredictionServiceGrpc.getStreamGenerateContentMethod = - getStreamGenerateContentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "StreamGenerateContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.GenerateContentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.GenerateContentResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("StreamGenerateContent")) - .build(); - } - } - } - return getStreamGenerateContentMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.EmbedContentRequest, - com.google.cloud.vertexai.api.EmbedContentResponse> - getEmbedContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "EmbedContent", - requestType = com.google.cloud.vertexai.api.EmbedContentRequest.class, - responseType = com.google.cloud.vertexai.api.EmbedContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.EmbedContentRequest, - com.google.cloud.vertexai.api.EmbedContentResponse> - getEmbedContentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.vertexai.api.EmbedContentRequest, - com.google.cloud.vertexai.api.EmbedContentResponse> - getEmbedContentMethod; - if ((getEmbedContentMethod = PredictionServiceGrpc.getEmbedContentMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getEmbedContentMethod = PredictionServiceGrpc.getEmbedContentMethod) == null) { - PredictionServiceGrpc.getEmbedContentMethod = - getEmbedContentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EmbedContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.EmbedContentRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vertexai.api.EmbedContentResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("EmbedContent")) - .build(); - } - } - } - return getEmbedContentMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static PredictionServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PredictionServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceStub(channel, callOptions); - } - }; - return PredictionServiceStub.newStub(factory, channel); - } - - /** Creates a new blocking-style stub that supports all types of calls on the service */ - public static PredictionServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PredictionServiceBlockingV2Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceBlockingV2Stub(channel, callOptions); - } - }; - return PredictionServiceBlockingV2Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static PredictionServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PredictionServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceBlockingStub(channel, callOptions); - } - }; - return PredictionServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PredictionServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PredictionServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceFutureStub(channel, callOptions); - } - }; - return PredictionServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public interface AsyncService { - - /** - * - * - *
-     * Perform an online prediction.
-     * 
- */ - default void predict( - com.google.cloud.vertexai.api.PredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform an online prediction with an arbitrary HTTP payload.
-     * The response includes the following HTTP headers:
-     * * `X-Vertex-AI-Endpoint-Id`: ID of the
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this
-     * prediction.
-     * * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's
-     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
-     * prediction.
-     * 
- */ - default void rawPredict( - com.google.cloud.vertexai.api.RawPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRawPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction with an arbitrary HTTP payload.
-     * 
- */ - default void streamRawPredict( - com.google.cloud.vertexai.api.StreamRawPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getStreamRawPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - default void directPredict( - com.google.cloud.vertexai.api.DirectPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDirectPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - default void directRawPredict( - com.google.cloud.vertexai.api.DirectRawPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDirectRawPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - default io.grpc.stub.StreamObserver - streamDirectPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( - getStreamDirectPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - default io.grpc.stub.StreamObserver - streamDirectRawPredict( - io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - responseObserver) { - return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( - getStreamDirectRawPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request for Vertex first-party
-     * products and frameworks.
-     * 
- */ - default io.grpc.stub.StreamObserver - streamingPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( - getStreamingPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a server-side streaming online prediction request for Vertex
-     * LLM streaming.
-     * 
- */ - default void serverStreamingPredict( - com.google.cloud.vertexai.api.StreamingPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getServerStreamingPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request through gRPC.
-     * 
- */ - default io.grpc.stub.StreamObserver - streamingRawPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( - getStreamingRawPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform an online explanation.
-     * If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is specified, the corresponding DeployModel must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated. If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is not specified, all DeployedModels must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated.
-     * 
- */ - default void explain( - com.google.cloud.vertexai.api.ExplainRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExplainMethod(), responseObserver); - } - - /** - * - * - *
-     * Generate content with multimodal inputs.
-     * 
- */ - default void generateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGenerateContentMethod(), responseObserver); - } - - /** - * - * - *
-     * Generate content with multimodal inputs with streaming support.
-     * 
- */ - default void streamGenerateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getStreamGenerateContentMethod(), responseObserver); - } - - /** - * - * - *
-     * Embed content with multimodal inputs.
-     * 
- */ - default void embedContent( - com.google.cloud.vertexai.api.EmbedContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getEmbedContentMethod(), responseObserver); - } - } - - /** - * Base class for the server implementation of the service PredictionService. - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public abstract static class PredictionServiceImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return PredictionServiceGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service PredictionService. - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public static final class PredictionServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private PredictionServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PredictionServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform an online prediction.
-     * 
- */ - public void predict( - com.google.cloud.vertexai.api.PredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPredictMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Perform an online prediction with an arbitrary HTTP payload.
-     * The response includes the following HTTP headers:
-     * * `X-Vertex-AI-Endpoint-Id`: ID of the
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this
-     * prediction.
-     * * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's
-     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
-     * prediction.
-     * 
- */ - public void rawPredict( - com.google.cloud.vertexai.api.RawPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRawPredictMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction with an arbitrary HTTP payload.
-     * 
- */ - public void streamRawPredict( - com.google.cloud.vertexai.api.StreamRawPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getStreamRawPredictMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - public void directPredict( - com.google.cloud.vertexai.api.DirectPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDirectPredictMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - public void directRawPredict( - com.google.cloud.vertexai.api.DirectRawPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDirectRawPredictMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - public io.grpc.stub.StreamObserver - streamDirectPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( - getChannel().newCall(getStreamDirectPredictMethod(), getCallOptions()), responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - public io.grpc.stub.StreamObserver - streamDirectRawPredict( - io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - responseObserver) { - return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( - getChannel().newCall(getStreamDirectRawPredictMethod(), getCallOptions()), - responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request for Vertex first-party
-     * products and frameworks.
-     * 
- */ - public io.grpc.stub.StreamObserver - streamingPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( - getChannel().newCall(getStreamingPredictMethod(), getCallOptions()), responseObserver); - } - - /** - * - * - *
-     * Perform a server-side streaming online prediction request for Vertex
-     * LLM streaming.
-     * 
- */ - public void serverStreamingPredict( - com.google.cloud.vertexai.api.StreamingPredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getServerStreamingPredictMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Perform a streaming online prediction request through gRPC.
-     * 
- */ - public io.grpc.stub.StreamObserver - streamingRawPredict( - io.grpc.stub.StreamObserver - responseObserver) { - return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( - getChannel().newCall(getStreamingRawPredictMethod(), getCallOptions()), responseObserver); - } - - /** - * - * - *
-     * Perform an online explanation.
-     * If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is specified, the corresponding DeployModel must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated. If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is not specified, all DeployedModels must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated.
-     * 
- */ - public void explain( - com.google.cloud.vertexai.api.ExplainRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExplainMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Generate content with multimodal inputs.
-     * 
- */ - public void generateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGenerateContentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Generate content with multimodal inputs with streaming support.
-     * 
- */ - public void streamGenerateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getStreamGenerateContentMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Embed content with multimodal inputs.
-     * 
- */ - public void embedContent( - com.google.cloud.vertexai.api.EmbedContentRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getEmbedContentMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service PredictionService. - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public static final class PredictionServiceBlockingV2Stub - extends io.grpc.stub.AbstractBlockingStub { - private PredictionServiceBlockingV2Stub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PredictionServiceBlockingV2Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceBlockingV2Stub(channel, callOptions); - } - - /** - * - * - *
-     * Perform an online prediction.
-     * 
- */ - public com.google.cloud.vertexai.api.PredictResponse predict( - com.google.cloud.vertexai.api.PredictRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an online prediction with an arbitrary HTTP payload.
-     * The response includes the following HTTP headers:
-     * * `X-Vertex-AI-Endpoint-Id`: ID of the
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this
-     * prediction.
-     * * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's
-     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
-     * prediction.
-     * 
- */ - public com.google.api.HttpBody rawPredict( - com.google.cloud.vertexai.api.RawPredictRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a streaming online prediction with an arbitrary HTTP payload.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall streamRawPredict( - com.google.cloud.vertexai.api.StreamRawPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( - getChannel(), getStreamRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - public com.google.cloud.vertexai.api.DirectPredictResponse directPredict( - com.google.cloud.vertexai.api.DirectPredictRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getDirectPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - public com.google.cloud.vertexai.api.DirectRawPredictResponse directRawPredict( - com.google.cloud.vertexai.api.DirectRawPredictRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getDirectRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall< - com.google.cloud.vertexai.api.StreamDirectPredictRequest, - com.google.cloud.vertexai.api.StreamDirectPredictResponse> - streamDirectPredict() { - return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( - getChannel(), getStreamDirectPredictMethod(), getCallOptions()); - } - - /** - * - * - *
-     * Perform a streaming online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall< - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> - streamDirectRawPredict() { - return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( - getChannel(), getStreamDirectRawPredictMethod(), getCallOptions()); - } - - /** - * - * - *
-     * Perform a streaming online prediction request for Vertex first-party
-     * products and frameworks.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse> - streamingPredict() { - return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( - getChannel(), getStreamingPredictMethod(), getCallOptions()); - } - - /** - * - * - *
-     * Perform a server-side streaming online prediction request for Vertex
-     * LLM streaming.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall< - ?, com.google.cloud.vertexai.api.StreamingPredictResponse> - serverStreamingPredict(com.google.cloud.vertexai.api.StreamingPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( - getChannel(), getServerStreamingPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a streaming online prediction request through gRPC.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall< - com.google.cloud.vertexai.api.StreamingRawPredictRequest, - com.google.cloud.vertexai.api.StreamingRawPredictResponse> - streamingRawPredict() { - return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( - getChannel(), getStreamingRawPredictMethod(), getCallOptions()); - } - - /** - * - * - *
-     * Perform an online explanation.
-     * If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is specified, the corresponding DeployModel must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated. If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is not specified, all DeployedModels must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated.
-     * 
- */ - public com.google.cloud.vertexai.api.ExplainResponse explain( - com.google.cloud.vertexai.api.ExplainRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getExplainMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Generate content with multimodal inputs.
-     * 
- */ - public com.google.cloud.vertexai.api.GenerateContentResponse generateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGenerateContentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Generate content with multimodal inputs with streaming support.
-     * 
- */ - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") - public io.grpc.stub.BlockingClientCall - streamGenerateContent(com.google.cloud.vertexai.api.GenerateContentRequest request) { - return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( - getChannel(), getStreamGenerateContentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Embed content with multimodal inputs.
-     * 
- */ - public com.google.cloud.vertexai.api.EmbedContentResponse embedContent( - com.google.cloud.vertexai.api.EmbedContentRequest request) throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getEmbedContentMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do limited synchronous rpc calls to service PredictionService. - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public static final class PredictionServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private PredictionServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PredictionServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform an online prediction.
-     * 
- */ - public com.google.cloud.vertexai.api.PredictResponse predict( - com.google.cloud.vertexai.api.PredictRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an online prediction with an arbitrary HTTP payload.
-     * The response includes the following HTTP headers:
-     * * `X-Vertex-AI-Endpoint-Id`: ID of the
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this
-     * prediction.
-     * * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's
-     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
-     * prediction.
-     * 
- */ - public com.google.api.HttpBody rawPredict( - com.google.cloud.vertexai.api.RawPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a streaming online prediction with an arbitrary HTTP payload.
-     * 
- */ - public java.util.Iterator streamRawPredict( - com.google.cloud.vertexai.api.StreamRawPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getStreamRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - public com.google.cloud.vertexai.api.DirectPredictResponse directPredict( - com.google.cloud.vertexai.api.DirectPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDirectPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - public com.google.cloud.vertexai.api.DirectRawPredictResponse directRawPredict( - com.google.cloud.vertexai.api.DirectRawPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDirectRawPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a server-side streaming online prediction request for Vertex
-     * LLM streaming.
-     * 
- */ - public java.util.Iterator - serverStreamingPredict(com.google.cloud.vertexai.api.StreamingPredictRequest request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getServerStreamingPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform an online explanation.
-     * If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is specified, the corresponding DeployModel must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated. If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is not specified, all DeployedModels must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated.
-     * 
- */ - public com.google.cloud.vertexai.api.ExplainResponse explain( - com.google.cloud.vertexai.api.ExplainRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getExplainMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Generate content with multimodal inputs.
-     * 
- */ - public com.google.cloud.vertexai.api.GenerateContentResponse generateContent( - com.google.cloud.vertexai.api.GenerateContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGenerateContentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Generate content with multimodal inputs with streaming support.
-     * 
- */ - public java.util.Iterator - streamGenerateContent(com.google.cloud.vertexai.api.GenerateContentRequest request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getStreamGenerateContentMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Embed content with multimodal inputs.
-     * 
- */ - public com.google.cloud.vertexai.api.EmbedContentResponse embedContent( - com.google.cloud.vertexai.api.EmbedContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getEmbedContentMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service PredictionService. - * - *
-   * A service for online predictions and explanations.
-   * 
- */ - public static final class PredictionServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private PredictionServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PredictionServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PredictionServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Perform an online prediction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.PredictResponse> - predict(com.google.cloud.vertexai.api.PredictRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPredictMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Perform an online prediction with an arbitrary HTTP payload.
-     * The response includes the following HTTP headers:
-     * * `X-Vertex-AI-Endpoint-Id`: ID of the
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this
-     * prediction.
-     * * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's
-     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
-     * prediction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture rawPredict( - com.google.cloud.vertexai.api.RawPredictRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRawPredictMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * Vertex first-party products and frameworks.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.DirectPredictResponse> - directPredict(com.google.cloud.vertexai.api.DirectPredictRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDirectPredictMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Perform an unary online prediction request to a gRPC model server for
-     * custom containers.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.DirectRawPredictResponse> - directRawPredict(com.google.cloud.vertexai.api.DirectRawPredictRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDirectRawPredictMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Perform an online explanation.
-     * If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is specified, the corresponding DeployModel must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated. If
-     * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id]
-     * is not specified, all DeployedModels must have
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * populated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.ExplainResponse> - explain(com.google.cloud.vertexai.api.ExplainRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExplainMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Generate content with multimodal inputs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.GenerateContentResponse> - generateContent(com.google.cloud.vertexai.api.GenerateContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGenerateContentMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Embed content with multimodal inputs.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.vertexai.api.EmbedContentResponse> - embedContent(com.google.cloud.vertexai.api.EmbedContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getEmbedContentMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_PREDICT = 0; - private static final int METHODID_RAW_PREDICT = 1; - private static final int METHODID_STREAM_RAW_PREDICT = 2; - private static final int METHODID_DIRECT_PREDICT = 3; - private static final int METHODID_DIRECT_RAW_PREDICT = 4; - private static final int METHODID_SERVER_STREAMING_PREDICT = 5; - private static final int METHODID_EXPLAIN = 6; - private static final int METHODID_GENERATE_CONTENT = 7; - private static final int METHODID_STREAM_GENERATE_CONTENT = 8; - private static final int METHODID_EMBED_CONTENT = 9; - private static final int METHODID_STREAM_DIRECT_PREDICT = 10; - private static final int METHODID_STREAM_DIRECT_RAW_PREDICT = 11; - private static final int METHODID_STREAMING_PREDICT = 12; - private static final int METHODID_STREAMING_RAW_PREDICT = 13; - - 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_PREDICT: - serviceImpl.predict( - (com.google.cloud.vertexai.api.PredictRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_RAW_PREDICT: - serviceImpl.rawPredict( - (com.google.cloud.vertexai.api.RawPredictRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_STREAM_RAW_PREDICT: - serviceImpl.streamRawPredict( - (com.google.cloud.vertexai.api.StreamRawPredictRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DIRECT_PREDICT: - serviceImpl.directPredict( - (com.google.cloud.vertexai.api.DirectPredictRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DIRECT_RAW_PREDICT: - serviceImpl.directRawPredict( - (com.google.cloud.vertexai.api.DirectRawPredictRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_SERVER_STREAMING_PREDICT: - serviceImpl.serverStreamingPredict( - (com.google.cloud.vertexai.api.StreamingPredictRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_EXPLAIN: - serviceImpl.explain( - (com.google.cloud.vertexai.api.ExplainRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GENERATE_CONTENT: - serviceImpl.generateContent( - (com.google.cloud.vertexai.api.GenerateContentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_STREAM_GENERATE_CONTENT: - serviceImpl.streamGenerateContent( - (com.google.cloud.vertexai.api.GenerateContentRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_EMBED_CONTENT: - serviceImpl.embedContent( - (com.google.cloud.vertexai.api.EmbedContentRequest) 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) { - case METHODID_STREAM_DIRECT_PREDICT: - return (io.grpc.stub.StreamObserver) - serviceImpl.streamDirectPredict( - (io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamDirectPredictResponse>) - responseObserver); - case METHODID_STREAM_DIRECT_RAW_PREDICT: - return (io.grpc.stub.StreamObserver) - serviceImpl.streamDirectRawPredict( - (io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse>) - responseObserver); - case METHODID_STREAMING_PREDICT: - return (io.grpc.stub.StreamObserver) - serviceImpl.streamingPredict( - (io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamingPredictResponse>) - responseObserver); - case METHODID_STREAMING_RAW_PREDICT: - return (io.grpc.stub.StreamObserver) - serviceImpl.streamingRawPredict( - (io.grpc.stub.StreamObserver< - com.google.cloud.vertexai.api.StreamingRawPredictResponse>) - responseObserver); - default: - throw new AssertionError(); - } - } - } - - public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getPredictMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.PredictRequest, - com.google.cloud.vertexai.api.PredictResponse>(service, METHODID_PREDICT))) - .addMethod( - getRawPredictMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.RawPredictRequest, com.google.api.HttpBody>( - service, METHODID_RAW_PREDICT))) - .addMethod( - getStreamRawPredictMethod(), - io.grpc.stub.ServerCalls.asyncServerStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody>( - service, METHODID_STREAM_RAW_PREDICT))) - .addMethod( - getDirectPredictMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.DirectPredictRequest, - com.google.cloud.vertexai.api.DirectPredictResponse>( - service, METHODID_DIRECT_PREDICT))) - .addMethod( - getDirectRawPredictMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.DirectRawPredictRequest, - com.google.cloud.vertexai.api.DirectRawPredictResponse>( - service, METHODID_DIRECT_RAW_PREDICT))) - .addMethod( - getStreamDirectPredictMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamDirectPredictRequest, - com.google.cloud.vertexai.api.StreamDirectPredictResponse>( - service, METHODID_STREAM_DIRECT_PREDICT))) - .addMethod( - getStreamDirectRawPredictMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse>( - service, METHODID_STREAM_DIRECT_RAW_PREDICT))) - .addMethod( - getStreamingPredictMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse>( - service, METHODID_STREAMING_PREDICT))) - .addMethod( - getServerStreamingPredictMethod(), - io.grpc.stub.ServerCalls.asyncServerStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamingPredictRequest, - com.google.cloud.vertexai.api.StreamingPredictResponse>( - service, METHODID_SERVER_STREAMING_PREDICT))) - .addMethod( - getStreamingRawPredictMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.StreamingRawPredictRequest, - com.google.cloud.vertexai.api.StreamingRawPredictResponse>( - service, METHODID_STREAMING_RAW_PREDICT))) - .addMethod( - getExplainMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.ExplainRequest, - com.google.cloud.vertexai.api.ExplainResponse>(service, METHODID_EXPLAIN))) - .addMethod( - getGenerateContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse>( - service, METHODID_GENERATE_CONTENT))) - .addMethod( - getStreamGenerateContentMethod(), - io.grpc.stub.ServerCalls.asyncServerStreamingCall( - new MethodHandlers< - com.google.cloud.vertexai.api.GenerateContentRequest, - com.google.cloud.vertexai.api.GenerateContentResponse>( - service, METHODID_STREAM_GENERATE_CONTENT))) - .addMethod( - getEmbedContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vertexai.api.EmbedContentRequest, - com.google.cloud.vertexai.api.EmbedContentResponse>( - service, METHODID_EMBED_CONTENT))) - .build(); - } - - private abstract static class PredictionServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PredictionServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("PredictionService"); - } - } - - private static final class PredictionServiceFileDescriptorSupplier - extends PredictionServiceBaseDescriptorSupplier { - PredictionServiceFileDescriptorSupplier() {} - } - - private static final class PredictionServiceMethodDescriptorSupplier - extends PredictionServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final java.lang.String methodName; - - PredictionServiceMethodDescriptorSupplier(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 (PredictionServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PredictionServiceFileDescriptorSupplier()) - .addMethod(getPredictMethod()) - .addMethod(getRawPredictMethod()) - .addMethod(getStreamRawPredictMethod()) - .addMethod(getDirectPredictMethod()) - .addMethod(getDirectRawPredictMethod()) - .addMethod(getStreamDirectPredictMethod()) - .addMethod(getStreamDirectRawPredictMethod()) - .addMethod(getStreamingPredictMethod()) - .addMethod(getServerStreamingPredictMethod()) - .addMethod(getStreamingRawPredictMethod()) - .addMethod(getExplainMethod()) - .addMethod(getGenerateContentMethod()) - .addMethod(getStreamGenerateContentMethod()) - .addMethod(getEmbedContentMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java-vertexai/pom.xml b/java-vertexai/pom.xml index 9432aabd2942..7d8a2b664127 100644 --- a/java-vertexai/pom.xml +++ b/java-vertexai/pom.xml @@ -1,53 +1,18 @@ - + 4.0.0 com.google.cloud google-cloud-vertexai-parent + 1.48.0 pom - 1.49.0-SNAPSHOT - Google VertexAI API Parent + Google Vertex AI Parent (Dummy) - Java idiomatic client for Google Cloud Platform services. + Dummy POM for Google Vertex AI to satisfy automation. - - com.google.cloud - google-cloud-jar-parent - 1.83.0-SNAPSHOT - ../google-cloud-jar-parent/pom.xml - - - UTF-8 - UTF-8 - github - google-cloud-vertexai-parent + true + true - - - - com.google.cloud - google-cloud-vertexai - 1.49.0-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - - - - - - google-cloud-vertexai - grpc-google-cloud-vertexai-v1 - proto-google-cloud-vertexai-v1 - google-cloud-vertexai-bom - diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/clirr-ignored-differences.xml b/java-vertexai/proto-google-cloud-vertexai-v1/clirr-ignored-differences.xml deleted file mode 100644 index 17ef7c05db84..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - 7012 - com/google/cloud/vertexai/api/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/vertexai/api/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/vertexai/api/*OrBuilder - boolean has*(*) - - - - 7006 - com/google/cloud/vertexai/api/** - * getDefaultInstanceForType() - ** - - - 7006 - com/google/cloud/vertexai/api/** - * addRepeatedField(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * clear() - ** - - - 7006 - com/google/cloud/vertexai/api/** - * clearField(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * clearOneof(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * clone() - ** - - - 7006 - com/google/cloud/vertexai/api/** - * mergeUnknownFields(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * setField(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * setRepeatedField(*) - ** - - - 7006 - com/google/cloud/vertexai/api/** - * setUnknownFields(*) - ** - - diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/pom.xml b/java-vertexai/proto-google-cloud-vertexai-v1/pom.xml deleted file mode 100644 index f8357c826fd3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-vertexai-v1 - 1.49.0-SNAPSHOT - proto-google-cloud-vertexai-v1 - Proto library for google-cloud-vertexai - - com.google.cloud - google-cloud-vertexai-parent - 1.49.0-SNAPSHOT - - - - 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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java deleted file mode 100644 index 1e38d80800c1..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/accelerator_type.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents a hardware accelerator type.
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.AcceleratorType} - */ -@com.google.protobuf.Generated -public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Unspecified accelerator type, which means no accelerator.
-   * 
- * - * ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - ACCELERATOR_TYPE_UNSPECIFIED(0), - /** - * - * - *
-   * Deprecated: Nvidia Tesla K80 GPU has reached end of support,
-   * see https://cloud.google.com/compute/docs/eol/k80-eol.
-   * 
- * - * NVIDIA_TESLA_K80 = 1 [deprecated = true]; - */ - @java.lang.Deprecated - NVIDIA_TESLA_K80(1), - /** - * - * - *
-   * Nvidia Tesla P100 GPU.
-   * 
- * - * NVIDIA_TESLA_P100 = 2; - */ - NVIDIA_TESLA_P100(2), - /** - * - * - *
-   * Nvidia Tesla V100 GPU.
-   * 
- * - * NVIDIA_TESLA_V100 = 3; - */ - NVIDIA_TESLA_V100(3), - /** - * - * - *
-   * Nvidia Tesla P4 GPU.
-   * 
- * - * NVIDIA_TESLA_P4 = 4; - */ - NVIDIA_TESLA_P4(4), - /** - * - * - *
-   * Nvidia Tesla T4 GPU.
-   * 
- * - * NVIDIA_TESLA_T4 = 5; - */ - NVIDIA_TESLA_T4(5), - /** - * - * - *
-   * Nvidia Tesla A100 GPU.
-   * 
- * - * NVIDIA_TESLA_A100 = 8; - */ - NVIDIA_TESLA_A100(8), - /** - * - * - *
-   * Nvidia A100 80GB GPU.
-   * 
- * - * NVIDIA_A100_80GB = 9; - */ - NVIDIA_A100_80GB(9), - /** - * - * - *
-   * Nvidia L4 GPU.
-   * 
- * - * NVIDIA_L4 = 11; - */ - NVIDIA_L4(11), - /** - * - * - *
-   * Nvidia H100 80Gb GPU.
-   * 
- * - * NVIDIA_H100_80GB = 13; - */ - NVIDIA_H100_80GB(13), - /** - * - * - *
-   * Nvidia H100 Mega 80Gb GPU.
-   * 
- * - * NVIDIA_H100_MEGA_80GB = 14; - */ - NVIDIA_H100_MEGA_80GB(14), - /** - * - * - *
-   * Nvidia H200 141Gb GPU.
-   * 
- * - * NVIDIA_H200_141GB = 15; - */ - NVIDIA_H200_141GB(15), - /** - * - * - *
-   * Nvidia B200 GPU.
-   * 
- * - * NVIDIA_B200 = 16; - */ - NVIDIA_B200(16), - /** - * - * - *
-   * Nvidia GB200 GPU.
-   * 
- * - * NVIDIA_GB200 = 17; - */ - NVIDIA_GB200(17), - /** - * - * - *
-   * Nvidia RTX Pro 6000 GPU.
-   * 
- * - * NVIDIA_RTX_PRO_6000 = 18; - */ - NVIDIA_RTX_PRO_6000(18), - /** - * - * - *
-   * TPU v2.
-   * 
- * - * TPU_V2 = 6; - */ - TPU_V2(6), - /** - * - * - *
-   * TPU v3.
-   * 
- * - * TPU_V3 = 7; - */ - TPU_V3(7), - /** - * - * - *
-   * TPU v4.
-   * 
- * - * TPU_V4_POD = 10; - */ - TPU_V4_POD(10), - /** - * - * - *
-   * TPU v5.
-   * 
- * - * TPU_V5_LITEPOD = 12; - */ - TPU_V5_LITEPOD(12), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AcceleratorType"); - } - - /** - * - * - *
-   * Unspecified accelerator type, which means no accelerator.
-   * 
- * - * ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * Deprecated: Nvidia Tesla K80 GPU has reached end of support,
-   * see https://cloud.google.com/compute/docs/eol/k80-eol.
-   * 
- * - * NVIDIA_TESLA_K80 = 1 [deprecated = true]; - */ - @java.lang.Deprecated public static final int NVIDIA_TESLA_K80_VALUE = 1; - - /** - * - * - *
-   * Nvidia Tesla P100 GPU.
-   * 
- * - * NVIDIA_TESLA_P100 = 2; - */ - public static final int NVIDIA_TESLA_P100_VALUE = 2; - - /** - * - * - *
-   * Nvidia Tesla V100 GPU.
-   * 
- * - * NVIDIA_TESLA_V100 = 3; - */ - public static final int NVIDIA_TESLA_V100_VALUE = 3; - - /** - * - * - *
-   * Nvidia Tesla P4 GPU.
-   * 
- * - * NVIDIA_TESLA_P4 = 4; - */ - public static final int NVIDIA_TESLA_P4_VALUE = 4; - - /** - * - * - *
-   * Nvidia Tesla T4 GPU.
-   * 
- * - * NVIDIA_TESLA_T4 = 5; - */ - public static final int NVIDIA_TESLA_T4_VALUE = 5; - - /** - * - * - *
-   * Nvidia Tesla A100 GPU.
-   * 
- * - * NVIDIA_TESLA_A100 = 8; - */ - public static final int NVIDIA_TESLA_A100_VALUE = 8; - - /** - * - * - *
-   * Nvidia A100 80GB GPU.
-   * 
- * - * NVIDIA_A100_80GB = 9; - */ - public static final int NVIDIA_A100_80GB_VALUE = 9; - - /** - * - * - *
-   * Nvidia L4 GPU.
-   * 
- * - * NVIDIA_L4 = 11; - */ - public static final int NVIDIA_L4_VALUE = 11; - - /** - * - * - *
-   * Nvidia H100 80Gb GPU.
-   * 
- * - * NVIDIA_H100_80GB = 13; - */ - public static final int NVIDIA_H100_80GB_VALUE = 13; - - /** - * - * - *
-   * Nvidia H100 Mega 80Gb GPU.
-   * 
- * - * NVIDIA_H100_MEGA_80GB = 14; - */ - public static final int NVIDIA_H100_MEGA_80GB_VALUE = 14; - - /** - * - * - *
-   * Nvidia H200 141Gb GPU.
-   * 
- * - * NVIDIA_H200_141GB = 15; - */ - public static final int NVIDIA_H200_141GB_VALUE = 15; - - /** - * - * - *
-   * Nvidia B200 GPU.
-   * 
- * - * NVIDIA_B200 = 16; - */ - public static final int NVIDIA_B200_VALUE = 16; - - /** - * - * - *
-   * Nvidia GB200 GPU.
-   * 
- * - * NVIDIA_GB200 = 17; - */ - public static final int NVIDIA_GB200_VALUE = 17; - - /** - * - * - *
-   * Nvidia RTX Pro 6000 GPU.
-   * 
- * - * NVIDIA_RTX_PRO_6000 = 18; - */ - public static final int NVIDIA_RTX_PRO_6000_VALUE = 18; - - /** - * - * - *
-   * TPU v2.
-   * 
- * - * TPU_V2 = 6; - */ - public static final int TPU_V2_VALUE = 6; - - /** - * - * - *
-   * TPU v3.
-   * 
- * - * TPU_V3 = 7; - */ - public static final int TPU_V3_VALUE = 7; - - /** - * - * - *
-   * TPU v4.
-   * 
- * - * TPU_V4_POD = 10; - */ - public static final int TPU_V4_POD_VALUE = 10; - - /** - * - * - *
-   * TPU v5.
-   * 
- * - * TPU_V5_LITEPOD = 12; - */ - public static final int TPU_V5_LITEPOD_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 AcceleratorType 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 AcceleratorType forNumber(int value) { - switch (value) { - case 0: - return ACCELERATOR_TYPE_UNSPECIFIED; - case 1: - return NVIDIA_TESLA_K80; - case 2: - return NVIDIA_TESLA_P100; - case 3: - return NVIDIA_TESLA_V100; - case 4: - return NVIDIA_TESLA_P4; - case 5: - return NVIDIA_TESLA_T4; - case 8: - return NVIDIA_TESLA_A100; - case 9: - return NVIDIA_A100_80GB; - case 11: - return NVIDIA_L4; - case 13: - return NVIDIA_H100_80GB; - case 14: - return NVIDIA_H100_MEGA_80GB; - case 15: - return NVIDIA_H200_141GB; - case 16: - return NVIDIA_B200; - case 17: - return NVIDIA_GB200; - case 18: - return NVIDIA_RTX_PRO_6000; - case 6: - return TPU_V2; - case 7: - return TPU_V3; - case 10: - return TPU_V4_POD; - case 12: - return TPU_V5_LITEPOD; - 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 AcceleratorType findValueByNumber(int number) { - return AcceleratorType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.AcceleratorTypeProto.getDescriptor().getEnumTypes().get(0); - } - - private static final AcceleratorType[] VALUES = values(); - - public static AcceleratorType 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 AcceleratorType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.AcceleratorType) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java deleted file mode 100644 index ed89c7e06449..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/accelerator_type.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class AcceleratorTypeProto extends com.google.protobuf.GeneratedFile { - private AcceleratorTypeProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AcceleratorTypeProto"); - } - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - 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/vertexai/v1/accelerator_t" - + "ype.proto\022\030google.cloud.vertexai.v1*\241\003\n\017" - + "AcceleratorType\022 \n\034ACCELERATOR_TYPE_UNSP" - + "ECIFIED\020\000\022\030\n\020NVIDIA_TESLA_K80\020\001\032\002\010\001\022\025\n\021N" - + "VIDIA_TESLA_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020" - + "\003\022\023\n\017NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T" - + "4\020\005\022\025\n\021NVIDIA_TESLA_A100\020\010\022\024\n\020NVIDIA_A10" - + "0_80GB\020\t\022\r\n\tNVIDIA_L4\020\013\022\024\n\020NVIDIA_H100_8" - + "0GB\020\r\022\031\n\025NVIDIA_H100_MEGA_80GB\020\016\022\025\n\021NVID" - + "IA_H200_141GB\020\017\022\017\n\013NVIDIA_B200\020\020\022\020\n\014NVID" - + "IA_GB200\020\021\022\027\n\023NVIDIA_RTX_PRO_6000\020\022\022\n\n\006T" - + "PU_V2\020\006\022\n\n\006TPU_V3\020\007\022\016\n\nTPU_V4_POD\020\n\022\022\n\016T" - + "PU_V5_LITEPOD\020\014B\321\001\n\035com.google.cloud.ver" - + "texai.apiB\024AcceleratorTypeProtoP\001Z>cloud" - + ".google.com/go/aiplatform/apiv1/aiplatfo" - + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" - + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" - + "ogle::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - descriptor.resolveAllFeaturesImmutable(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuth.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuth.java deleted file mode 100644 index dd8e797ea9d4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuth.java +++ /dev/null @@ -1,1427 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/api_auth.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The generic reusable api auth config.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ApiAuth} - */ -@com.google.protobuf.Generated -public final class ApiAuth extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ApiAuth) - ApiAuthOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ApiAuth"); - } - - // Use ApiAuth.newBuilder() to construct. - private ApiAuth(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ApiAuth() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ApiAuth.class, - com.google.cloud.vertexai.api.ApiAuth.Builder.class); - } - - public interface ApiKeyConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The SecretManager secret version resource name storing API key.
-     * e.g. projects/{project}/secrets/{secret}/versions/{version}
-     * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The apiKeySecretVersion. - */ - java.lang.String getApiKeySecretVersion(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name storing API key.
-     * e.g. projects/{project}/secrets/{secret}/versions/{version}
-     * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for apiKeySecretVersion. - */ - com.google.protobuf.ByteString getApiKeySecretVersionBytes(); - } - - /** - * - * - *
-   * The API secret.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig} - */ - public static final class ApiKeyConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig) - ApiKeyConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ApiKeyConfig"); - } - - // Use ApiKeyConfig.newBuilder() to construct. - private ApiKeyConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ApiKeyConfig() { - apiKeySecretVersion_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.class, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder.class); - } - - public static final int API_KEY_SECRET_VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object apiKeySecretVersion_ = ""; - - /** - * - * - *
-     * Required. The SecretManager secret version resource name storing API key.
-     * e.g. projects/{project}/secrets/{secret}/versions/{version}
-     * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The apiKeySecretVersion. - */ - @java.lang.Override - public java.lang.String getApiKeySecretVersion() { - java.lang.Object ref = apiKeySecretVersion_; - 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(); - apiKeySecretVersion_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The SecretManager secret version resource name storing API key.
-     * e.g. projects/{project}/secrets/{secret}/versions/{version}
-     * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for apiKeySecretVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiKeySecretVersionBytes() { - java.lang.Object ref = apiKeySecretVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiKeySecretVersion_ = 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.GeneratedMessage.isStringEmpty(apiKeySecretVersion_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, apiKeySecretVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiKeySecretVersion_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, apiKeySecretVersion_); - } - 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.vertexai.api.ApiAuth.ApiKeyConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig other = - (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) obj; - - if (!getApiKeySecretVersion().equals(other.getApiKeySecretVersion())) 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) + API_KEY_SECRET_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiKeySecretVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig 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.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig 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.vertexai.api.ApiAuth.ApiKeyConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ApiAuth.ApiKeyConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig) - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.class, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - apiKeySecretVersion_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig build() { - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig buildPartial() { - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig result = - new com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.apiKeySecretVersion_ = apiKeySecretVersion_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig other) { - if (other == com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance()) - return this; - if (!other.getApiKeySecretVersion().isEmpty()) { - apiKeySecretVersion_ = other.apiKeySecretVersion_; - 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: - { - apiKeySecretVersion_ = 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 apiKeySecretVersion_ = ""; - - /** - * - * - *
-       * Required. The SecretManager secret version resource name storing API key.
-       * e.g. projects/{project}/secrets/{secret}/versions/{version}
-       * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The apiKeySecretVersion. - */ - public java.lang.String getApiKeySecretVersion() { - java.lang.Object ref = apiKeySecretVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiKeySecretVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name storing API key.
-       * e.g. projects/{project}/secrets/{secret}/versions/{version}
-       * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for apiKeySecretVersion. - */ - public com.google.protobuf.ByteString getApiKeySecretVersionBytes() { - java.lang.Object ref = apiKeySecretVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiKeySecretVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name storing API key.
-       * e.g. projects/{project}/secrets/{secret}/versions/{version}
-       * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The apiKeySecretVersion to set. - * @return This builder for chaining. - */ - public Builder setApiKeySecretVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - apiKeySecretVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name storing API key.
-       * e.g. projects/{project}/secrets/{secret}/versions/{version}
-       * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearApiKeySecretVersion() { - apiKeySecretVersion_ = getDefaultInstance().getApiKeySecretVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name storing API key.
-       * e.g. projects/{project}/secrets/{secret}/versions/{version}
-       * 
- * - * - * string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for apiKeySecretVersion to set. - * @return This builder for chaining. - */ - public Builder setApiKeySecretVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - apiKeySecretVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig) - private static final com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig(); - } - - public static com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ApiKeyConfig 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.vertexai.api.ApiAuth.ApiKeyConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int authConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object authConfig_; - - public enum AuthConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - API_KEY_CONFIG(1), - AUTHCONFIG_NOT_SET(0); - private final int value; - - private AuthConfigCase(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 AuthConfigCase valueOf(int value) { - return forNumber(value); - } - - public static AuthConfigCase forNumber(int value) { - switch (value) { - case 1: - return API_KEY_CONFIG; - case 0: - return AUTHCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AuthConfigCase getAuthConfigCase() { - return AuthConfigCase.forNumber(authConfigCase_); - } - - public static final int API_KEY_CONFIG_FIELD_NUMBER = 1; - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return Whether the apiKeyConfig field is set. - */ - @java.lang.Override - public boolean hasApiKeyConfig() { - return authConfigCase_ == 1; - } - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return The apiKeyConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - if (authConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_; - } - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { - if (authConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_; - } - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.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 (authConfigCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (authConfigCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_); - } - 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.vertexai.api.ApiAuth)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ApiAuth other = (com.google.cloud.vertexai.api.ApiAuth) obj; - - if (!getAuthConfigCase().equals(other.getAuthConfigCase())) return false; - switch (authConfigCase_) { - case 1: - if (!getApiKeyConfig().equals(other.getApiKeyConfig())) 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 (authConfigCase_) { - case 1: - hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getApiKeyConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth 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.vertexai.api.ApiAuth parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth 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.vertexai.api.ApiAuth parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ApiAuth parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ApiAuth 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The generic reusable api auth config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ApiAuth} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ApiAuth) - com.google.cloud.vertexai.api.ApiAuthOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ApiAuth.class, - com.google.cloud.vertexai.api.ApiAuth.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ApiAuth.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (apiKeyConfigBuilder_ != null) { - apiKeyConfigBuilder_.clear(); - } - authConfigCase_ = 0; - authConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ApiAuthProto - .internal_static_google_cloud_vertexai_v1_ApiAuth_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth build() { - com.google.cloud.vertexai.api.ApiAuth result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth buildPartial() { - com.google.cloud.vertexai.api.ApiAuth result = - new com.google.cloud.vertexai.api.ApiAuth(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ApiAuth result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.ApiAuth result) { - result.authConfigCase_ = authConfigCase_; - result.authConfig_ = this.authConfig_; - if (authConfigCase_ == 1 && apiKeyConfigBuilder_ != null) { - result.authConfig_ = apiKeyConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ApiAuth) { - return mergeFrom((com.google.cloud.vertexai.api.ApiAuth) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ApiAuth other) { - if (other == com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance()) return this; - switch (other.getAuthConfigCase()) { - case API_KEY_CONFIG: - { - mergeApiKeyConfig(other.getApiKeyConfig()); - break; - } - case AUTHCONFIG_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( - internalGetApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); - authConfigCase_ = 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 authConfigCase_ = 0; - private java.lang.Object authConfig_; - - public AuthConfigCase getAuthConfigCase() { - return AuthConfigCase.forNumber(authConfigCase_); - } - - public Builder clearAuthConfig() { - authConfigCase_ = 0; - authConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - apiKeyConfigBuilder_; - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return Whether the apiKeyConfig field is set. - */ - @java.lang.Override - public boolean hasApiKeyConfig() { - return authConfigCase_ == 1; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return The apiKeyConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - if (apiKeyConfigBuilder_ == null) { - if (authConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_; - } - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } else { - if (authConfigCase_ == 1) { - return apiKeyConfigBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - public Builder setApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - authConfig_ = value; - onChanged(); - } else { - apiKeyConfigBuilder_.setMessage(value); - } - authConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - public Builder setApiKeyConfig( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder builderForValue) { - if (apiKeyConfigBuilder_ == null) { - authConfig_ = builderForValue.build(); - onChanged(); - } else { - apiKeyConfigBuilder_.setMessage(builderForValue.build()); - } - authConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - public Builder mergeApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (authConfigCase_ == 1 - && authConfig_ - != com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance()) { - authConfig_ = - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.newBuilder( - (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - authConfig_ = value; - } - onChanged(); - } else { - if (authConfigCase_ == 1) { - apiKeyConfigBuilder_.mergeFrom(value); - } else { - apiKeyConfigBuilder_.setMessage(value); - } - } - authConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - public Builder clearApiKeyConfig() { - if (apiKeyConfigBuilder_ == null) { - if (authConfigCase_ == 1) { - authConfigCase_ = 0; - authConfig_ = null; - onChanged(); - } - } else { - if (authConfigCase_ == 1) { - authConfigCase_ = 0; - authConfig_ = null; - } - apiKeyConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder getApiKeyConfigBuilder() { - return internalGetApiKeyConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { - if ((authConfigCase_ == 1) && (apiKeyConfigBuilder_ != null)) { - return apiKeyConfigBuilder_.getMessageOrBuilder(); - } else { - if (authConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_; - } - return com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The API secret.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - internalGetApiKeyConfigFieldBuilder() { - if (apiKeyConfigBuilder_ == null) { - if (!(authConfigCase_ == 1)) { - authConfig_ = com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance(); - } - apiKeyConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder>( - (com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig) authConfig_, - getParentForChildren(), - isClean()); - authConfig_ = null; - } - authConfigCase_ = 1; - onChanged(); - return apiKeyConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ApiAuth) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ApiAuth) - private static final com.google.cloud.vertexai.api.ApiAuth DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ApiAuth(); - } - - public static com.google.cloud.vertexai.api.ApiAuth getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ApiAuth 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.vertexai.api.ApiAuth getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthOrBuilder.java deleted file mode 100644 index 04af958fcead..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/api_auth.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ApiAuthOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ApiAuth) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return Whether the apiKeyConfig field is set. - */ - boolean hasApiKeyConfig(); - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - * - * @return The apiKeyConfig. - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig(); - - /** - * - * - *
-   * The API secret.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 1; - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder(); - - com.google.cloud.vertexai.api.ApiAuth.AuthConfigCase getAuthConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthProto.java deleted file mode 100644 index 7451193ab1ba..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ApiAuthProto.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/api_auth.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ApiAuthProto extends com.google.protobuf.GeneratedFile { - private ApiAuthProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ApiAuthProto"); - } - - 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_vertexai_v1_ApiAuth_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ApiAuth_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_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/vertexai/v1/api_auth.prot" - + "o\022\030google.cloud.vertexai.v1\032\037google/api/" - + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\"\306\001\n\007ApiAuth\022H\n\016api_key_config\030\001 " - + "\001(\0132..google.cloud.vertexai.v1.ApiAuth.A" - + "piKeyConfigH\000\032b\n\014ApiKeyConfig\022R\n\026api_key" - + "_secret_version\030\001 \001(\tB2\340A\002\372A,\n*secretman" - + "ager.googleapis.com/SecretVersionB\r\n\013aut" - + "h_configB\267\002\n\035com.google.cloud.vertexai.a" - + "piB\014ApiAuthProtoP\001Z>cloud.google.com/go/" - + "aiplatform/apiv1/aiplatformpb;aiplatform" - + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" - + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AI" - + "Platform::V1\352Ak\n*secretmanager.googleapi" - + "s.com/SecretVersion\022=projects/{project}/" - + "secrets/{secret}/versions/{secret_versio" - + "n}b\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_cloud_vertexai_v1_ApiAuth_descriptor = getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_ApiAuth_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ApiAuth_descriptor, - new java.lang.String[] { - "ApiKeyConfig", "AuthConfig", - }); - internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor = - internal_static_google_cloud_vertexai_v1_ApiAuth_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ApiAuth_ApiKeyConfig_descriptor, - new java.lang.String[] { - "ApiKeySecretVersion", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java deleted file mode 100644 index 576d8e775e2e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java +++ /dev/null @@ -1,2302 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Attribution that explains a particular prediction output.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Attribution} - */ -@com.google.protobuf.Generated -public final class Attribution extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Attribution) - AttributionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Attribution"); - } - - // Use Attribution.newBuilder() to construct. - private Attribution(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Attribution() { - outputIndex_ = emptyIntList(); - outputDisplayName_ = ""; - outputName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Attribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Attribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Attribution.class, - com.google.cloud.vertexai.api.Attribution.Builder.class); - } - - private int bitField0_; - public static final int BASELINE_OUTPUT_VALUE_FIELD_NUMBER = 1; - private double baselineOutputValue_ = 0D; - - /** - * - * - *
-   * Output only. Model predicted output if the input instance is constructed
-   * from the baselines of all the features defined in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The field name of the output is determined by the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   *
-   * If the Model's predicted output has multiple dimensions (rank > 1), this is
-   * the value in the output located by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-   *
-   * If there are multiple baselines, their output values are averaged.
-   * 
- * - * double baseline_output_value = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The baselineOutputValue. - */ - @java.lang.Override - public double getBaselineOutputValue() { - return baselineOutputValue_; - } - - public static final int INSTANCE_OUTPUT_VALUE_FIELD_NUMBER = 2; - private double instanceOutputValue_ = 0D; - - /** - * - * - *
-   * Output only. Model predicted output on the corresponding [explanation
-   * instance][ExplainRequest.instances]. The field name of the output is
-   * determined by the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   *
-   * If the Model predicted output has multiple dimensions, this is the value in
-   * the output located by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-   * 
- * - * double instance_output_value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceOutputValue. - */ - @java.lang.Override - public double getInstanceOutputValue() { - return instanceOutputValue_; - } - - public static final int FEATURE_ATTRIBUTIONS_FIELD_NUMBER = 3; - private com.google.protobuf.Value featureAttributions_; - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the featureAttributions field is set. - */ - @java.lang.Override - public boolean hasFeatureAttributions() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The featureAttributions. - */ - @java.lang.Override - public com.google.protobuf.Value getFeatureAttributions() { - return featureAttributions_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : featureAttributions_; - } - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getFeatureAttributionsOrBuilder() { - return featureAttributions_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : featureAttributions_; - } - - public static final int OUTPUT_INDEX_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList outputIndex_ = emptyIntList(); - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the outputIndex. - */ - @java.lang.Override - public java.util.List getOutputIndexList() { - return outputIndex_; - } - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of outputIndex. - */ - public int getOutputIndexCount() { - return outputIndex_.size(); - } - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The outputIndex at the given index. - */ - public int getOutputIndex(int index) { - return outputIndex_.getInt(index); - } - - private int outputIndexMemoizedSerializedSize = -1; - - public static final int OUTPUT_DISPLAY_NAME_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputDisplayName_ = ""; - - /** - * - * - *
-   * Output only. The display name of the output identified by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-   * example, the predicted class name by a multi-classification Model.
-   *
-   * This field is only populated iff the Model predicts display names as a
-   * separate field along with the explained output. The predicted display name
-   * must has the same shape of the explained output, and can be located using
-   * output_index.
-   * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputDisplayName. - */ - @java.lang.Override - public java.lang.String getOutputDisplayName() { - java.lang.Object ref = outputDisplayName_; - 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(); - outputDisplayName_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The display name of the output identified by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-   * example, the predicted class name by a multi-classification Model.
-   *
-   * This field is only populated iff the Model predicts display names as a
-   * separate field along with the explained output. The predicted display name
-   * must has the same shape of the explained output, and can be located using
-   * output_index.
-   * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputDisplayNameBytes() { - java.lang.Object ref = outputDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPROXIMATION_ERROR_FIELD_NUMBER = 6; - private double approximationError_ = 0D; - - /** - * - * - *
-   * Output only. Error of
-   * [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * caused by approximation used in the explanation method. Lower value means
-   * more precise attributions.
-   *
-   * * For Sampled Shapley
-   * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
-   * increasing
-   * [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
-   * might reduce the error.
-   * * For Integrated Gradients
-   * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-   * increasing
-   * [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
-   * might reduce the error.
-   * * For [XRAI
-   * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-   * increasing
-   * [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
-   * reduce the error.
-   *
-   * See [this introduction](/vertex-ai/docs/explainable-ai/overview)
-   * for more information.
-   * 
- * - * double approximation_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The approximationError. - */ - @java.lang.Override - public double getApproximationError() { - return approximationError_; - } - - public static final int OUTPUT_NAME_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputName_ = ""; - - /** - * - * - *
-   * Output only. Name of the explain output. Specified as the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputName. - */ - @java.lang.Override - public java.lang.String getOutputName() { - java.lang.Object ref = outputName_; - 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(); - outputName_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Name of the explain output. Specified as the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputNameBytes() { - java.lang.Object ref = outputName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputName_ = 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 { - getSerializedSize(); - if (java.lang.Double.doubleToRawLongBits(baselineOutputValue_) != 0) { - output.writeDouble(1, baselineOutputValue_); - } - if (java.lang.Double.doubleToRawLongBits(instanceOutputValue_) != 0) { - output.writeDouble(2, instanceOutputValue_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getFeatureAttributions()); - } - if (getOutputIndexList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(outputIndexMemoizedSerializedSize); - } - for (int i = 0; i < outputIndex_.size(); i++) { - output.writeInt32NoTag(outputIndex_.getInt(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputDisplayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, outputDisplayName_); - } - if (java.lang.Double.doubleToRawLongBits(approximationError_) != 0) { - output.writeDouble(6, approximationError_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, outputName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(baselineOutputValue_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, baselineOutputValue_); - } - if (java.lang.Double.doubleToRawLongBits(instanceOutputValue_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, instanceOutputValue_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFeatureAttributions()); - } - { - int dataSize = 0; - for (int i = 0; i < outputIndex_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(outputIndex_.getInt(i)); - } - size += dataSize; - if (!getOutputIndexList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - outputIndexMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputDisplayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, outputDisplayName_); - } - if (java.lang.Double.doubleToRawLongBits(approximationError_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, approximationError_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, outputName_); - } - 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.vertexai.api.Attribution)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Attribution other = - (com.google.cloud.vertexai.api.Attribution) obj; - - if (java.lang.Double.doubleToLongBits(getBaselineOutputValue()) - != java.lang.Double.doubleToLongBits(other.getBaselineOutputValue())) return false; - if (java.lang.Double.doubleToLongBits(getInstanceOutputValue()) - != java.lang.Double.doubleToLongBits(other.getInstanceOutputValue())) return false; - if (hasFeatureAttributions() != other.hasFeatureAttributions()) return false; - if (hasFeatureAttributions()) { - if (!getFeatureAttributions().equals(other.getFeatureAttributions())) return false; - } - if (!getOutputIndexList().equals(other.getOutputIndexList())) return false; - if (!getOutputDisplayName().equals(other.getOutputDisplayName())) return false; - if (java.lang.Double.doubleToLongBits(getApproximationError()) - != java.lang.Double.doubleToLongBits(other.getApproximationError())) return false; - if (!getOutputName().equals(other.getOutputName())) 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) + BASELINE_OUTPUT_VALUE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getBaselineOutputValue())); - hash = (37 * hash) + INSTANCE_OUTPUT_VALUE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getInstanceOutputValue())); - if (hasFeatureAttributions()) { - hash = (37 * hash) + FEATURE_ATTRIBUTIONS_FIELD_NUMBER; - hash = (53 * hash) + getFeatureAttributions().hashCode(); - } - if (getOutputIndexCount() > 0) { - hash = (37 * hash) + OUTPUT_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getOutputIndexList().hashCode(); - } - hash = (37 * hash) + OUTPUT_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getOutputDisplayName().hashCode(); - hash = (37 * hash) + APPROXIMATION_ERROR_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getApproximationError())); - hash = (37 * hash) + OUTPUT_NAME_FIELD_NUMBER; - hash = (53 * hash) + getOutputName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Attribution 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.vertexai.api.Attribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Attribution 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.vertexai.api.Attribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Attribution parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Attribution parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Attribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Attribution 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Attribution that explains a particular prediction output.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Attribution} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Attribution) - com.google.cloud.vertexai.api.AttributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Attribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Attribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Attribution.class, - com.google.cloud.vertexai.api.Attribution.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Attribution.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetFeatureAttributionsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - baselineOutputValue_ = 0D; - instanceOutputValue_ = 0D; - featureAttributions_ = null; - if (featureAttributionsBuilder_ != null) { - featureAttributionsBuilder_.dispose(); - featureAttributionsBuilder_ = null; - } - outputIndex_ = emptyIntList(); - outputDisplayName_ = ""; - approximationError_ = 0D; - outputName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Attribution_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Attribution getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Attribution.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Attribution build() { - com.google.cloud.vertexai.api.Attribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Attribution buildPartial() { - com.google.cloud.vertexai.api.Attribution result = - new com.google.cloud.vertexai.api.Attribution(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Attribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.baselineOutputValue_ = baselineOutputValue_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.instanceOutputValue_ = instanceOutputValue_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.featureAttributions_ = - featureAttributionsBuilder_ == null - ? featureAttributions_ - : featureAttributionsBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - outputIndex_.makeImmutable(); - result.outputIndex_ = outputIndex_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.outputDisplayName_ = outputDisplayName_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.approximationError_ = approximationError_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.outputName_ = outputName_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Attribution) { - return mergeFrom((com.google.cloud.vertexai.api.Attribution) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Attribution other) { - if (other == com.google.cloud.vertexai.api.Attribution.getDefaultInstance()) return this; - if (java.lang.Double.doubleToRawLongBits(other.getBaselineOutputValue()) != 0) { - setBaselineOutputValue(other.getBaselineOutputValue()); - } - if (java.lang.Double.doubleToRawLongBits(other.getInstanceOutputValue()) != 0) { - setInstanceOutputValue(other.getInstanceOutputValue()); - } - if (other.hasFeatureAttributions()) { - mergeFeatureAttributions(other.getFeatureAttributions()); - } - if (!other.outputIndex_.isEmpty()) { - if (outputIndex_.isEmpty()) { - outputIndex_ = other.outputIndex_; - outputIndex_.makeImmutable(); - bitField0_ |= 0x00000008; - } else { - ensureOutputIndexIsMutable(); - outputIndex_.addAll(other.outputIndex_); - } - onChanged(); - } - if (!other.getOutputDisplayName().isEmpty()) { - outputDisplayName_ = other.outputDisplayName_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (java.lang.Double.doubleToRawLongBits(other.getApproximationError()) != 0) { - setApproximationError(other.getApproximationError()); - } - if (!other.getOutputName().isEmpty()) { - outputName_ = other.outputName_; - 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 9: - { - baselineOutputValue_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - case 17: - { - instanceOutputValue_ = input.readDouble(); - bitField0_ |= 0x00000002; - break; - } // case 17 - case 26: - { - input.readMessage( - internalGetFeatureAttributionsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - int v = input.readInt32(); - ensureOutputIndexIsMutable(); - outputIndex_.addInt(v); - break; - } // case 32 - case 34: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureOutputIndexIsMutable(); - while (input.getBytesUntilLimit() > 0) { - outputIndex_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 34 - case 42: - { - outputDisplayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 49: - { - approximationError_ = input.readDouble(); - bitField0_ |= 0x00000020; - break; - } // case 49 - case 58: - { - outputName_ = 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 double baselineOutputValue_; - - /** - * - * - *
-     * Output only. Model predicted output if the input instance is constructed
-     * from the baselines of all the features defined in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The field name of the output is determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model's predicted output has multiple dimensions (rank > 1), this is
-     * the value in the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     *
-     * If there are multiple baselines, their output values are averaged.
-     * 
- * - * double baseline_output_value = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The baselineOutputValue. - */ - @java.lang.Override - public double getBaselineOutputValue() { - return baselineOutputValue_; - } - - /** - * - * - *
-     * Output only. Model predicted output if the input instance is constructed
-     * from the baselines of all the features defined in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The field name of the output is determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model's predicted output has multiple dimensions (rank > 1), this is
-     * the value in the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     *
-     * If there are multiple baselines, their output values are averaged.
-     * 
- * - * double baseline_output_value = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The baselineOutputValue to set. - * @return This builder for chaining. - */ - public Builder setBaselineOutputValue(double value) { - - baselineOutputValue_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Model predicted output if the input instance is constructed
-     * from the baselines of all the features defined in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The field name of the output is determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model's predicted output has multiple dimensions (rank > 1), this is
-     * the value in the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     *
-     * If there are multiple baselines, their output values are averaged.
-     * 
- * - * double baseline_output_value = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearBaselineOutputValue() { - bitField0_ = (bitField0_ & ~0x00000001); - baselineOutputValue_ = 0D; - onChanged(); - return this; - } - - private double instanceOutputValue_; - - /** - * - * - *
-     * Output only. Model predicted output on the corresponding [explanation
-     * instance][ExplainRequest.instances]. The field name of the output is
-     * determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model predicted output has multiple dimensions, this is the value in
-     * the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * double instance_output_value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceOutputValue. - */ - @java.lang.Override - public double getInstanceOutputValue() { - return instanceOutputValue_; - } - - /** - * - * - *
-     * Output only. Model predicted output on the corresponding [explanation
-     * instance][ExplainRequest.instances]. The field name of the output is
-     * determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model predicted output has multiple dimensions, this is the value in
-     * the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * double instance_output_value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The instanceOutputValue to set. - * @return This builder for chaining. - */ - public Builder setInstanceOutputValue(double value) { - - instanceOutputValue_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Model predicted output on the corresponding [explanation
-     * instance][ExplainRequest.instances]. The field name of the output is
-     * determined by the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     *
-     * If the Model predicted output has multiple dimensions, this is the value in
-     * the output located by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * double instance_output_value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearInstanceOutputValue() { - bitField0_ = (bitField0_ & ~0x00000002); - instanceOutputValue_ = 0D; - onChanged(); - return this; - } - - private com.google.protobuf.Value featureAttributions_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - featureAttributionsBuilder_; - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the featureAttributions field is set. - */ - public boolean hasFeatureAttributions() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The featureAttributions. - */ - public com.google.protobuf.Value getFeatureAttributions() { - if (featureAttributionsBuilder_ == null) { - return featureAttributions_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : featureAttributions_; - } else { - return featureAttributionsBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setFeatureAttributions(com.google.protobuf.Value value) { - if (featureAttributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - featureAttributions_ = value; - } else { - featureAttributionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setFeatureAttributions(com.google.protobuf.Value.Builder builderForValue) { - if (featureAttributionsBuilder_ == null) { - featureAttributions_ = builderForValue.build(); - } else { - featureAttributionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeFeatureAttributions(com.google.protobuf.Value value) { - if (featureAttributionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && featureAttributions_ != null - && featureAttributions_ != com.google.protobuf.Value.getDefaultInstance()) { - getFeatureAttributionsBuilder().mergeFrom(value); - } else { - featureAttributions_ = value; - } - } else { - featureAttributionsBuilder_.mergeFrom(value); - } - if (featureAttributions_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearFeatureAttributions() { - bitField0_ = (bitField0_ & ~0x00000004); - featureAttributions_ = null; - if (featureAttributionsBuilder_ != null) { - featureAttributionsBuilder_.dispose(); - featureAttributionsBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Value.Builder getFeatureAttributionsBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetFeatureAttributionsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.ValueOrBuilder getFeatureAttributionsOrBuilder() { - if (featureAttributionsBuilder_ != null) { - return featureAttributionsBuilder_.getMessageOrBuilder(); - } else { - return featureAttributions_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : featureAttributions_; - } - } - - /** - * - * - *
-     * Output only. Attributions of each explained feature. Features are extracted
-     * from the [prediction
-     * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-     * to [explanation metadata for
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     *
-     * The value is a struct, whose keys are the name of the feature. The values
-     * are how much the feature in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-     * to the predicted result.
-     *
-     * The format of the value is determined by the feature's input format:
-     *
-     * * If the feature is a scalar value, the attribution value is a
-     * [floating number][google.protobuf.Value.number_value].
-     *
-     * * If the feature is an array of scalar values, the attribution value is
-     * an [array][google.protobuf.Value.list_value].
-     *
-     * * If the feature is a struct, the attribution value is a
-     * [struct][google.protobuf.Value.struct_value]. The keys in the
-     * attribution value struct are the same as the keys in the feature
-     * struct. The formats of the values in the attribution struct are
-     * determined by the formats of the values in the feature struct.
-     *
-     * The
-     * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-     * field, pointed to by the
-     * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-     * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-     * object, points to the schema file that describes the features and their
-     * attribution values (if it is populated).
-     * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetFeatureAttributionsFieldBuilder() { - if (featureAttributionsBuilder_ == null) { - featureAttributionsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getFeatureAttributions(), getParentForChildren(), isClean()); - featureAttributions_ = null; - } - return featureAttributionsBuilder_; - } - - private com.google.protobuf.Internal.IntList outputIndex_ = emptyIntList(); - - private void ensureOutputIndexIsMutable() { - if (!outputIndex_.isModifiable()) { - outputIndex_ = makeMutableCopy(outputIndex_); - } - bitField0_ |= 0x00000008; - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the outputIndex. - */ - public java.util.List getOutputIndexList() { - outputIndex_.makeImmutable(); - return outputIndex_; - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of outputIndex. - */ - public int getOutputIndexCount() { - return outputIndex_.size(); - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The outputIndex at the given index. - */ - public int getOutputIndex(int index) { - return outputIndex_.getInt(index); - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index to set the value at. - * @param value The outputIndex to set. - * @return This builder for chaining. - */ - public Builder setOutputIndex(int index, int value) { - - ensureOutputIndexIsMutable(); - outputIndex_.setInt(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The outputIndex to add. - * @return This builder for chaining. - */ - public Builder addOutputIndex(int value) { - - ensureOutputIndexIsMutable(); - outputIndex_.addInt(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param values The outputIndex to add. - * @return This builder for chaining. - */ - public Builder addAllOutputIndex(java.lang.Iterable values) { - ensureOutputIndexIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputIndex_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The index that locates the explained prediction output.
-     *
-     * If the prediction output is a scalar value, output_index is not populated.
-     * If the prediction output has multiple dimensions, the length of the
-     * output_index list is the same as the number of dimensions of the output.
-     * The i-th element in output_index is the element index of the i-th dimension
-     * of the output vector. Indices start from 0.
-     * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOutputIndex() { - outputIndex_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - private java.lang.Object outputDisplayName_ = ""; - - /** - * - * - *
-     * Output only. The display name of the output identified by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-     * example, the predicted class name by a multi-classification Model.
-     *
-     * This field is only populated iff the Model predicts display names as a
-     * separate field along with the explained output. The predicted display name
-     * must has the same shape of the explained output, and can be located using
-     * output_index.
-     * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputDisplayName. - */ - public java.lang.String getOutputDisplayName() { - java.lang.Object ref = outputDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The display name of the output identified by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-     * example, the predicted class name by a multi-classification Model.
-     *
-     * This field is only populated iff the Model predicts display names as a
-     * separate field along with the explained output. The predicted display name
-     * must has the same shape of the explained output, and can be located using
-     * output_index.
-     * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputDisplayName. - */ - public com.google.protobuf.ByteString getOutputDisplayNameBytes() { - java.lang.Object ref = outputDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The display name of the output identified by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-     * example, the predicted class name by a multi-classification Model.
-     *
-     * This field is only populated iff the Model predicts display names as a
-     * separate field along with the explained output. The predicted display name
-     * must has the same shape of the explained output, and can be located using
-     * output_index.
-     * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The outputDisplayName to set. - * @return This builder for chaining. - */ - public Builder setOutputDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputDisplayName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The display name of the output identified by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-     * example, the predicted class name by a multi-classification Model.
-     *
-     * This field is only populated iff the Model predicts display names as a
-     * separate field along with the explained output. The predicted display name
-     * must has the same shape of the explained output, and can be located using
-     * output_index.
-     * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOutputDisplayName() { - outputDisplayName_ = getDefaultInstance().getOutputDisplayName(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The display name of the output identified by
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-     * example, the predicted class name by a multi-classification Model.
-     *
-     * This field is only populated iff the Model predicts display names as a
-     * separate field along with the explained output. The predicted display name
-     * must has the same shape of the explained output, and can be located using
-     * output_index.
-     * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for outputDisplayName to set. - * @return This builder for chaining. - */ - public Builder setOutputDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputDisplayName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private double approximationError_; - - /** - * - * - *
-     * Output only. Error of
-     * [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * caused by approximation used in the explanation method. Lower value means
-     * more precise attributions.
-     *
-     * * For Sampled Shapley
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
-     * increasing
-     * [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
-     * might reduce the error.
-     * * For Integrated Gradients
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
-     * might reduce the error.
-     * * For [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
-     * reduce the error.
-     *
-     * See [this introduction](/vertex-ai/docs/explainable-ai/overview)
-     * for more information.
-     * 
- * - * double approximation_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The approximationError. - */ - @java.lang.Override - public double getApproximationError() { - return approximationError_; - } - - /** - * - * - *
-     * Output only. Error of
-     * [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * caused by approximation used in the explanation method. Lower value means
-     * more precise attributions.
-     *
-     * * For Sampled Shapley
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
-     * increasing
-     * [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
-     * might reduce the error.
-     * * For Integrated Gradients
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
-     * might reduce the error.
-     * * For [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
-     * reduce the error.
-     *
-     * See [this introduction](/vertex-ai/docs/explainable-ai/overview)
-     * for more information.
-     * 
- * - * double approximation_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The approximationError to set. - * @return This builder for chaining. - */ - public Builder setApproximationError(double value) { - - approximationError_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Error of
-     * [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * caused by approximation used in the explanation method. Lower value means
-     * more precise attributions.
-     *
-     * * For Sampled Shapley
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
-     * increasing
-     * [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
-     * might reduce the error.
-     * * For Integrated Gradients
-     * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
-     * might reduce the error.
-     * * For [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-     * increasing
-     * [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
-     * reduce the error.
-     *
-     * See [this introduction](/vertex-ai/docs/explainable-ai/overview)
-     * for more information.
-     * 
- * - * double approximation_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearApproximationError() { - bitField0_ = (bitField0_ & ~0x00000020); - approximationError_ = 0D; - onChanged(); - return this; - } - - private java.lang.Object outputName_ = ""; - - /** - * - * - *
-     * Output only. Name of the explain output. Specified as the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputName. - */ - public java.lang.String getOutputName() { - java.lang.Object ref = outputName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Name of the explain output. Specified as the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputName. - */ - public com.google.protobuf.ByteString getOutputNameBytes() { - java.lang.Object ref = outputName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Name of the explain output. Specified as the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The outputName to set. - * @return This builder for chaining. - */ - public Builder setOutputName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputName_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Name of the explain output. Specified as the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOutputName() { - outputName_ = getDefaultInstance().getOutputName(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Name of the explain output. Specified as the key in
-     * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-     * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for outputName to set. - * @return This builder for chaining. - */ - public Builder setOutputNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputName_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Attribution) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Attribution) - private static final com.google.cloud.vertexai.api.Attribution DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Attribution(); - } - - public static com.google.cloud.vertexai.api.Attribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Attribution 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.vertexai.api.Attribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java deleted file mode 100644 index 6a64acc3ed4b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface AttributionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Attribution) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Model predicted output if the input instance is constructed
-   * from the baselines of all the features defined in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The field name of the output is determined by the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   *
-   * If the Model's predicted output has multiple dimensions (rank > 1), this is
-   * the value in the output located by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-   *
-   * If there are multiple baselines, their output values are averaged.
-   * 
- * - * double baseline_output_value = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The baselineOutputValue. - */ - double getBaselineOutputValue(); - - /** - * - * - *
-   * Output only. Model predicted output on the corresponding [explanation
-   * instance][ExplainRequest.instances]. The field name of the output is
-   * determined by the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   *
-   * If the Model predicted output has multiple dimensions, this is the value in
-   * the output located by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-   * 
- * - * double instance_output_value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceOutputValue. - */ - double getInstanceOutputValue(); - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the featureAttributions field is set. - */ - boolean hasFeatureAttributions(); - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The featureAttributions. - */ - com.google.protobuf.Value getFeatureAttributions(); - - /** - * - * - *
-   * Output only. Attributions of each explained feature. Features are extracted
-   * from the [prediction
-   * instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
-   * to [explanation metadata for
-   * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   *
-   * The value is a struct, whose keys are the name of the feature. The values
-   * are how much the feature in the
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
-   * to the predicted result.
-   *
-   * The format of the value is determined by the feature's input format:
-   *
-   * * If the feature is a scalar value, the attribution value is a
-   * [floating number][google.protobuf.Value.number_value].
-   *
-   * * If the feature is an array of scalar values, the attribution value is
-   * an [array][google.protobuf.Value.list_value].
-   *
-   * * If the feature is a struct, the attribution value is a
-   * [struct][google.protobuf.Value.struct_value]. The keys in the
-   * attribution value struct are the same as the keys in the feature
-   * struct. The formats of the values in the attribution struct are
-   * determined by the formats of the values in the feature struct.
-   *
-   * The
-   * [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
-   * field, pointed to by the
-   * [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
-   * [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
-   * object, points to the schema file that describes the features and their
-   * attribution values (if it is populated).
-   * 
- * - * - * .google.protobuf.Value feature_attributions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.ValueOrBuilder getFeatureAttributionsOrBuilder(); - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the outputIndex. - */ - java.util.List getOutputIndexList(); - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of outputIndex. - */ - int getOutputIndexCount(); - - /** - * - * - *
-   * Output only. The index that locates the explained prediction output.
-   *
-   * If the prediction output is a scalar value, output_index is not populated.
-   * If the prediction output has multiple dimensions, the length of the
-   * output_index list is the same as the number of dimensions of the output.
-   * The i-th element in output_index is the element index of the i-th dimension
-   * of the output vector. Indices start from 0.
-   * 
- * - * repeated int32 output_index = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The outputIndex at the given index. - */ - int getOutputIndex(int index); - - /** - * - * - *
-   * Output only. The display name of the output identified by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-   * example, the predicted class name by a multi-classification Model.
-   *
-   * This field is only populated iff the Model predicts display names as a
-   * separate field along with the explained output. The predicted display name
-   * must has the same shape of the explained output, and can be located using
-   * output_index.
-   * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputDisplayName. - */ - java.lang.String getOutputDisplayName(); - - /** - * - * - *
-   * Output only. The display name of the output identified by
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
-   * example, the predicted class name by a multi-classification Model.
-   *
-   * This field is only populated iff the Model predicts display names as a
-   * separate field along with the explained output. The predicted display name
-   * must has the same shape of the explained output, and can be located using
-   * output_index.
-   * 
- * - * string output_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputDisplayName. - */ - com.google.protobuf.ByteString getOutputDisplayNameBytes(); - - /** - * - * - *
-   * Output only. Error of
-   * [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * caused by approximation used in the explanation method. Lower value means
-   * more precise attributions.
-   *
-   * * For Sampled Shapley
-   * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
-   * increasing
-   * [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
-   * might reduce the error.
-   * * For Integrated Gradients
-   * [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-   * increasing
-   * [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
-   * might reduce the error.
-   * * For [XRAI
-   * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-   * increasing
-   * [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
-   * reduce the error.
-   *
-   * See [this introduction](/vertex-ai/docs/explainable-ai/overview)
-   * for more information.
-   * 
- * - * double approximation_error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The approximationError. - */ - double getApproximationError(); - - /** - * - * - *
-   * Output only. Name of the explain output. Specified as the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputName. - */ - java.lang.String getOutputName(); - - /** - * - * - *
-   * Output only. Name of the explain output. Specified as the key in
-   * [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
-   * 
- * - * string output_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputName. - */ - com.google.protobuf.ByteString getOutputNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java deleted file mode 100644 index f0ed4b977719..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java +++ /dev/null @@ -1,652 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A description of resources that to large degree are decided by Vertex AI,
- * and require only a modest additional configuration.
- * Each Model supporting these resources documents its specific guidelines.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AutomaticResources} - */ -@com.google.protobuf.Generated -public final class AutomaticResources extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.AutomaticResources) - AutomaticResourcesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AutomaticResources"); - } - - // Use AutomaticResources.newBuilder() to construct. - private AutomaticResources(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AutomaticResources() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutomaticResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AutomaticResources.class, - com.google.cloud.vertexai.api.AutomaticResources.Builder.class); - } - - public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 1; - private int minReplicaCount_ = 0; - - /** - * - * - *
-   * Immutable. The minimum number of replicas that will be always deployed on.
-   * If traffic against it increases, it may dynamically be deployed onto more
-   * replicas up to
-   * [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
-   * and as traffic decreases, some of these extra replicas may be freed. If the
-   * requested value is too large, the deployment will error.
-   * 
- * - * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The minReplicaCount. - */ - @java.lang.Override - public int getMinReplicaCount() { - return minReplicaCount_; - } - - public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 2; - private int maxReplicaCount_ = 0; - - /** - * - * - *
-   * Immutable. The maximum number of replicas that may be deployed on when the
-   * traffic against it increases. If the requested value is too large, the
-   * deployment will error, but if deployment succeeds then the ability to scale
-   * to that many replicas is guaranteed (barring service outages). If traffic
-   * increases beyond what its replicas at maximum may handle, a portion of the
-   * traffic will be dropped. If this value is not provided, a no upper bound
-   * for scaling under heavy traffic will be assume, though Vertex AI may be
-   * unable to scale beyond certain replica number.
-   * 
- * - * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - 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 (minReplicaCount_ != 0) { - output.writeInt32(1, minReplicaCount_); - } - if (maxReplicaCount_ != 0) { - output.writeInt32(2, maxReplicaCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minReplicaCount_); - } - if (maxReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxReplicaCount_); - } - 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.vertexai.api.AutomaticResources)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.AutomaticResources other = - (com.google.cloud.vertexai.api.AutomaticResources) obj; - - if (getMinReplicaCount() != other.getMinReplicaCount()) return false; - if (getMaxReplicaCount() != other.getMaxReplicaCount()) 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) + MIN_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMinReplicaCount(); - hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxReplicaCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutomaticResources 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.vertexai.api.AutomaticResources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutomaticResources 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.vertexai.api.AutomaticResources parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutomaticResources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.AutomaticResources 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex AI,
-   * and require only a modest additional configuration.
-   * Each Model supporting these resources documents its specific guidelines.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AutomaticResources} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.AutomaticResources) - com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutomaticResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AutomaticResources.class, - com.google.cloud.vertexai.api.AutomaticResources.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.AutomaticResources.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - minReplicaCount_ = 0; - maxReplicaCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResources getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResources build() { - com.google.cloud.vertexai.api.AutomaticResources result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResources buildPartial() { - com.google.cloud.vertexai.api.AutomaticResources result = - new com.google.cloud.vertexai.api.AutomaticResources(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.AutomaticResources result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.minReplicaCount_ = minReplicaCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxReplicaCount_ = maxReplicaCount_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.AutomaticResources) { - return mergeFrom((com.google.cloud.vertexai.api.AutomaticResources) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.AutomaticResources other) { - if (other == com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance()) - return this; - if (other.getMinReplicaCount() != 0) { - setMinReplicaCount(other.getMinReplicaCount()); - } - if (other.getMaxReplicaCount() != 0) { - setMaxReplicaCount(other.getMaxReplicaCount()); - } - 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: - { - minReplicaCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - maxReplicaCount_ = 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 minReplicaCount_; - - /** - * - * - *
-     * Immutable. The minimum number of replicas that will be always deployed on.
-     * If traffic against it increases, it may dynamically be deployed onto more
-     * replicas up to
-     * [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
-     * and as traffic decreases, some of these extra replicas may be freed. If the
-     * requested value is too large, the deployment will error.
-     * 
- * - * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The minReplicaCount. - */ - @java.lang.Override - public int getMinReplicaCount() { - return minReplicaCount_; - } - - /** - * - * - *
-     * Immutable. The minimum number of replicas that will be always deployed on.
-     * If traffic against it increases, it may dynamically be deployed onto more
-     * replicas up to
-     * [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
-     * and as traffic decreases, some of these extra replicas may be freed. If the
-     * requested value is too large, the deployment will error.
-     * 
- * - * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The minReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setMinReplicaCount(int value) { - - minReplicaCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The minimum number of replicas that will be always deployed on.
-     * If traffic against it increases, it may dynamically be deployed onto more
-     * replicas up to
-     * [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
-     * and as traffic decreases, some of these extra replicas may be freed. If the
-     * requested value is too large, the deployment will error.
-     * 
- * - * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearMinReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000001); - minReplicaCount_ = 0; - onChanged(); - return this; - } - - private int maxReplicaCount_; - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, a no upper bound
-     * for scaling under heavy traffic will be assume, though Vertex AI may be
-     * unable to scale beyond certain replica number.
-     * 
- * - * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, a no upper bound
-     * for scaling under heavy traffic will be assume, though Vertex AI may be
-     * unable to scale beyond certain replica number.
-     * 
- * - * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The maxReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setMaxReplicaCount(int value) { - - maxReplicaCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, a no upper bound
-     * for scaling under heavy traffic will be assume, though Vertex AI may be
-     * unable to scale beyond certain replica number.
-     * 
- * - * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearMaxReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000002); - maxReplicaCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.AutomaticResources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.AutomaticResources) - private static final com.google.cloud.vertexai.api.AutomaticResources DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.AutomaticResources(); - } - - public static com.google.cloud.vertexai.api.AutomaticResources getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AutomaticResources 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.vertexai.api.AutomaticResources getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java deleted file mode 100644 index 514b54bdfa7f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface AutomaticResourcesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.AutomaticResources) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The minimum number of replicas that will be always deployed on.
-   * If traffic against it increases, it may dynamically be deployed onto more
-   * replicas up to
-   * [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
-   * and as traffic decreases, some of these extra replicas may be freed. If the
-   * requested value is too large, the deployment will error.
-   * 
- * - * int32 min_replica_count = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The minReplicaCount. - */ - int getMinReplicaCount(); - - /** - * - * - *
-   * Immutable. The maximum number of replicas that may be deployed on when the
-   * traffic against it increases. If the requested value is too large, the
-   * deployment will error, but if deployment succeeds then the ability to scale
-   * to that many replicas is guaranteed (barring service outages). If traffic
-   * increases beyond what its replicas at maximum may handle, a portion of the
-   * traffic will be dropped. If this value is not provided, a no upper bound
-   * for scaling under heavy traffic will be assume, though Vertex AI may be
-   * unable to scale beyond certain replica number.
-   * 
- * - * int32 max_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - int getMaxReplicaCount(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java deleted file mode 100644 index f5ec65b8bbba..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java +++ /dev/null @@ -1,751 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The metric specification that defines the target resource utilization
- * (CPU utilization, accelerator's duty cycle, and so on) for calculating the
- * desired replica count.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AutoscalingMetricSpec} - */ -@com.google.protobuf.Generated -public final class AutoscalingMetricSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.AutoscalingMetricSpec) - AutoscalingMetricSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AutoscalingMetricSpec"); - } - - // Use AutoscalingMetricSpec.newBuilder() to construct. - private AutoscalingMetricSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AutoscalingMetricSpec() { - metricName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AutoscalingMetricSpec.class, - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder.class); - } - - public static final int METRIC_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object metricName_ = ""; - - /** - * - * - *
-   * Required. The resource metric name.
-   * Supported metrics:
-   *
-   * * For Online Prediction:
-   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-   * * `aiplatform.googleapis.com/prediction/online/request_count`
-   * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metricName. - */ - @java.lang.Override - public java.lang.String getMetricName() { - java.lang.Object ref = metricName_; - 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(); - metricName_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The resource metric name.
-   * Supported metrics:
-   *
-   * * For Online Prediction:
-   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-   * * `aiplatform.googleapis.com/prediction/online/request_count`
-   * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metricName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetricNameBytes() { - java.lang.Object ref = metricName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metricName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_FIELD_NUMBER = 2; - private int target_ = 0; - - /** - * - * - *
-   * The target resource utilization in percentage (1% - 100%) for the given
-   * metric; once the real usage deviates from the target by a certain
-   * percentage, the machine replicas change. The default value is 60
-   * (representing 60%) if not provided.
-   * 
- * - * int32 target = 2; - * - * @return The target. - */ - @java.lang.Override - public int getTarget() { - return target_; - } - - 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.GeneratedMessage.isStringEmpty(metricName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, metricName_); - } - if (target_ != 0) { - output.writeInt32(2, target_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metricName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metricName_); - } - if (target_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, target_); - } - 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.vertexai.api.AutoscalingMetricSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.AutoscalingMetricSpec other = - (com.google.cloud.vertexai.api.AutoscalingMetricSpec) obj; - - if (!getMetricName().equals(other.getMetricName())) return false; - if (getTarget() != other.getTarget()) 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) + METRIC_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMetricName().hashCode(); - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec 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.vertexai.api.AutoscalingMetricSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec 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.vertexai.api.AutoscalingMetricSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.AutoscalingMetricSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The metric specification that defines the target resource utilization
-   * (CPU utilization, accelerator's duty cycle, and so on) for calculating the
-   * desired replica count.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AutoscalingMetricSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.AutoscalingMetricSpec) - com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AutoscalingMetricSpec.class, - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.AutoscalingMetricSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metricName_ = ""; - target_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutoscalingMetricSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.AutoscalingMetricSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutoscalingMetricSpec build() { - com.google.cloud.vertexai.api.AutoscalingMetricSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AutoscalingMetricSpec buildPartial() { - com.google.cloud.vertexai.api.AutoscalingMetricSpec result = - new com.google.cloud.vertexai.api.AutoscalingMetricSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.AutoscalingMetricSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metricName_ = metricName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.target_ = target_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.AutoscalingMetricSpec) { - return mergeFrom((com.google.cloud.vertexai.api.AutoscalingMetricSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.AutoscalingMetricSpec other) { - if (other == com.google.cloud.vertexai.api.AutoscalingMetricSpec.getDefaultInstance()) - return this; - if (!other.getMetricName().isEmpty()) { - metricName_ = other.metricName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getTarget() != 0) { - setTarget(other.getTarget()); - } - 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: - { - metricName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - target_ = 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 metricName_ = ""; - - /** - * - * - *
-     * Required. The resource metric name.
-     * Supported metrics:
-     *
-     * * For Online Prediction:
-     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-     * * `aiplatform.googleapis.com/prediction/online/request_count`
-     * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metricName. - */ - public java.lang.String getMetricName() { - java.lang.Object ref = metricName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metricName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The resource metric name.
-     * Supported metrics:
-     *
-     * * For Online Prediction:
-     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-     * * `aiplatform.googleapis.com/prediction/online/request_count`
-     * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metricName. - */ - public com.google.protobuf.ByteString getMetricNameBytes() { - java.lang.Object ref = metricName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metricName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The resource metric name.
-     * Supported metrics:
-     *
-     * * For Online Prediction:
-     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-     * * `aiplatform.googleapis.com/prediction/online/request_count`
-     * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The metricName to set. - * @return This builder for chaining. - */ - public Builder setMetricName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - metricName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The resource metric name.
-     * Supported metrics:
-     *
-     * * For Online Prediction:
-     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-     * * `aiplatform.googleapis.com/prediction/online/request_count`
-     * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMetricName() { - metricName_ = getDefaultInstance().getMetricName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The resource metric name.
-     * Supported metrics:
-     *
-     * * For Online Prediction:
-     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-     * * `aiplatform.googleapis.com/prediction/online/request_count`
-     * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for metricName to set. - * @return This builder for chaining. - */ - public Builder setMetricNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - metricName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int target_; - - /** - * - * - *
-     * The target resource utilization in percentage (1% - 100%) for the given
-     * metric; once the real usage deviates from the target by a certain
-     * percentage, the machine replicas change. The default value is 60
-     * (representing 60%) if not provided.
-     * 
- * - * int32 target = 2; - * - * @return The target. - */ - @java.lang.Override - public int getTarget() { - return target_; - } - - /** - * - * - *
-     * The target resource utilization in percentage (1% - 100%) for the given
-     * metric; once the real usage deviates from the target by a certain
-     * percentage, the machine replicas change. The default value is 60
-     * (representing 60%) if not provided.
-     * 
- * - * int32 target = 2; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(int value) { - - target_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The target resource utilization in percentage (1% - 100%) for the given
-     * metric; once the real usage deviates from the target by a certain
-     * percentage, the machine replicas change. The default value is 60
-     * (representing 60%) if not provided.
-     * 
- * - * int32 target = 2; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - bitField0_ = (bitField0_ & ~0x00000002); - target_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.AutoscalingMetricSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.AutoscalingMetricSpec) - private static final com.google.cloud.vertexai.api.AutoscalingMetricSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.AutoscalingMetricSpec(); - } - - public static com.google.cloud.vertexai.api.AutoscalingMetricSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AutoscalingMetricSpec 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.vertexai.api.AutoscalingMetricSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java deleted file mode 100644 index b7c65fd326c6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface AutoscalingMetricSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.AutoscalingMetricSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource metric name.
-   * Supported metrics:
-   *
-   * * For Online Prediction:
-   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-   * * `aiplatform.googleapis.com/prediction/online/request_count`
-   * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The metricName. - */ - java.lang.String getMetricName(); - - /** - * - * - *
-   * Required. The resource metric name.
-   * Supported metrics:
-   *
-   * * For Online Prediction:
-   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
-   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
-   * * `aiplatform.googleapis.com/prediction/online/request_count`
-   * 
- * - * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for metricName. - */ - com.google.protobuf.ByteString getMetricNameBytes(); - - /** - * - * - *
-   * The target resource utilization in percentage (1% - 100%) for the given
-   * metric; once the real usage deviates from the target by a certain
-   * percentage, the machine replicas change. The default value is 60
-   * (representing 60%) if not provided.
-   * 
- * - * int32 target = 2; - * - * @return The target. - */ - int getTarget(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java deleted file mode 100644 index 051f0ff340ec..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java +++ /dev/null @@ -1,720 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The storage details for Avro input content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AvroSource} - */ -@com.google.protobuf.Generated -public final class AvroSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.AvroSource) - AvroSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AvroSource"); - } - - // Use AvroSource.newBuilder() to construct. - private AvroSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AvroSource() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_AvroSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_AvroSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AvroSource.class, - com.google.cloud.vertexai.api.AvroSource.Builder.class); - } - - private int bitField0_; - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GcsSource gcsSource_; - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - 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.writeMessage(1, getGcsSource()); - } - 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.computeMessageSize(1, getGcsSource()); - } - 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.vertexai.api.AvroSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.AvroSource other = (com.google.cloud.vertexai.api.AvroSource) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource().equals(other.getGcsSource())) 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 (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AvroSource 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.vertexai.api.AvroSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AvroSource 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.vertexai.api.AvroSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AvroSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AvroSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.AvroSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.AvroSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The storage details for Avro input content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.AvroSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.AvroSource) - com.google.cloud.vertexai.api.AvroSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_AvroSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_AvroSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.AvroSource.class, - com.google.cloud.vertexai.api.AvroSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.AvroSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGcsSourceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_AvroSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AvroSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.AvroSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AvroSource build() { - com.google.cloud.vertexai.api.AvroSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.AvroSource buildPartial() { - com.google.cloud.vertexai.api.AvroSource result = - new com.google.cloud.vertexai.api.AvroSource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.AvroSource result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.AvroSource) { - return mergeFrom((com.google.cloud.vertexai.api.AvroSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.AvroSource other) { - if (other == com.google.cloud.vertexai.api.AvroSource.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - 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( - internalGetGcsSourceFieldBuilder().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.vertexai.api.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - gcsSourceBuilder_; - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - } else { - gcsSourceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && gcsSource_ != null - && gcsSource_ != com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) { - getGcsSourceBuilder().mergeFrom(value); - } else { - gcsSource_ = value; - } - } else { - gcsSourceBuilder_.mergeFrom(value); - } - if (gcsSource_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGcsSource() { - bitField0_ = (bitField0_ & ~0x00000001); - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsSource.Builder getGcsSourceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - internalGetGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder>( - getGcsSource(), getParentForChildren(), isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.AvroSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.AvroSource) - private static final com.google.cloud.vertexai.api.AvroSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.AvroSource(); - } - - public static com.google.cloud.vertexai.api.AvroSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AvroSource 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.vertexai.api.AvroSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java deleted file mode 100644 index b5dd8b0554f8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface AvroSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.AvroSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - com.google.cloud.vertexai.api.GcsSource getGcsSource(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java deleted file mode 100644 index acbbc3434719..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A description of resources that are used for performing batch operations, are
- * dedicated to a Model, and need manual configuration.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BatchDedicatedResources} - */ -@com.google.protobuf.Generated -public final class BatchDedicatedResources extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.BatchDedicatedResources) - BatchDedicatedResourcesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BatchDedicatedResources"); - } - - // Use BatchDedicatedResources.newBuilder() to construct. - private BatchDedicatedResources(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private BatchDedicatedResources() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BatchDedicatedResources.class, - com.google.cloud.vertexai.api.BatchDedicatedResources.Builder.class); - } - - private int bitField0_; - public static final int MACHINE_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.MachineSpec machineSpec_; - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - @java.lang.Override - public boolean hasMachineSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpec getMachineSpec() { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder() { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - - public static final int STARTING_REPLICA_COUNT_FIELD_NUMBER = 2; - private int startingReplicaCount_ = 0; - - /** - * - * - *
-   * Immutable. The number of machine replicas used at the start of the batch
-   * operation. If not set, Vertex AI decides starting number, not greater than
-   * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
-   * 
- * - * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The startingReplicaCount. - */ - @java.lang.Override - public int getStartingReplicaCount() { - return startingReplicaCount_; - } - - public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 3; - private int maxReplicaCount_ = 0; - - /** - * - * - *
-   * Immutable. The maximum number of machine replicas the batch operation may
-   * be scaled to. The default value is 10.
-   * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - 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.writeMessage(1, getMachineSpec()); - } - if (startingReplicaCount_ != 0) { - output.writeInt32(2, startingReplicaCount_); - } - if (maxReplicaCount_ != 0) { - output.writeInt32(3, maxReplicaCount_); - } - 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.computeMessageSize(1, getMachineSpec()); - } - if (startingReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, startingReplicaCount_); - } - if (maxReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_); - } - 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.vertexai.api.BatchDedicatedResources)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.BatchDedicatedResources other = - (com.google.cloud.vertexai.api.BatchDedicatedResources) obj; - - if (hasMachineSpec() != other.hasMachineSpec()) return false; - if (hasMachineSpec()) { - if (!getMachineSpec().equals(other.getMachineSpec())) return false; - } - if (getStartingReplicaCount() != other.getStartingReplicaCount()) return false; - if (getMaxReplicaCount() != other.getMaxReplicaCount()) 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 (hasMachineSpec()) { - hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getMachineSpec().hashCode(); - } - hash = (37 * hash) + STARTING_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getStartingReplicaCount(); - hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxReplicaCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources 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.vertexai.api.BatchDedicatedResources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources 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.vertexai.api.BatchDedicatedResources parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.BatchDedicatedResources 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A description of resources that are used for performing batch operations, are
-   * dedicated to a Model, and need manual configuration.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BatchDedicatedResources} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.BatchDedicatedResources) - com.google.cloud.vertexai.api.BatchDedicatedResourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BatchDedicatedResources.class, - com.google.cloud.vertexai.api.BatchDedicatedResources.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.BatchDedicatedResources.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetMachineSpecFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - machineSpec_ = null; - if (machineSpecBuilder_ != null) { - machineSpecBuilder_.dispose(); - machineSpecBuilder_ = null; - } - startingReplicaCount_ = 0; - maxReplicaCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BatchDedicatedResources getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.BatchDedicatedResources.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BatchDedicatedResources build() { - com.google.cloud.vertexai.api.BatchDedicatedResources result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BatchDedicatedResources buildPartial() { - com.google.cloud.vertexai.api.BatchDedicatedResources result = - new com.google.cloud.vertexai.api.BatchDedicatedResources(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.BatchDedicatedResources result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.machineSpec_ = - machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startingReplicaCount_ = startingReplicaCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.maxReplicaCount_ = maxReplicaCount_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.BatchDedicatedResources) { - return mergeFrom((com.google.cloud.vertexai.api.BatchDedicatedResources) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.BatchDedicatedResources other) { - if (other == com.google.cloud.vertexai.api.BatchDedicatedResources.getDefaultInstance()) - return this; - if (other.hasMachineSpec()) { - mergeMachineSpec(other.getMachineSpec()); - } - if (other.getStartingReplicaCount() != 0) { - setStartingReplicaCount(other.getStartingReplicaCount()); - } - if (other.getMaxReplicaCount() != 0) { - setMaxReplicaCount(other.getMaxReplicaCount()); - } - 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( - internalGetMachineSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - startingReplicaCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - maxReplicaCount_ = 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 com.google.cloud.vertexai.api.MachineSpec machineSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder> - machineSpecBuilder_; - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - public boolean hasMachineSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - public com.google.cloud.vertexai.api.MachineSpec getMachineSpec() { - if (machineSpecBuilder_ == null) { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } else { - return machineSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) { - if (machineSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - machineSpec_ = value; - } else { - machineSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setMachineSpec( - com.google.cloud.vertexai.api.MachineSpec.Builder builderForValue) { - if (machineSpecBuilder_ == null) { - machineSpec_ = builderForValue.build(); - } else { - machineSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) { - if (machineSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && machineSpec_ != null - && machineSpec_ != com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance()) { - getMachineSpecBuilder().mergeFrom(value); - } else { - machineSpec_ = value; - } - } else { - machineSpecBuilder_.mergeFrom(value); - } - if (machineSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearMachineSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - machineSpec_ = null; - if (machineSpecBuilder_ != null) { - machineSpecBuilder_.dispose(); - machineSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.MachineSpec.Builder getMachineSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetMachineSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder() { - if (machineSpecBuilder_ != null) { - return machineSpecBuilder_.getMessageOrBuilder(); - } else { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder> - internalGetMachineSpecFieldBuilder() { - if (machineSpecBuilder_ == null) { - machineSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder>( - getMachineSpec(), getParentForChildren(), isClean()); - machineSpec_ = null; - } - return machineSpecBuilder_; - } - - private int startingReplicaCount_; - - /** - * - * - *
-     * Immutable. The number of machine replicas used at the start of the batch
-     * operation. If not set, Vertex AI decides starting number, not greater than
-     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
-     * 
- * - * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The startingReplicaCount. - */ - @java.lang.Override - public int getStartingReplicaCount() { - return startingReplicaCount_; - } - - /** - * - * - *
-     * Immutable. The number of machine replicas used at the start of the batch
-     * operation. If not set, Vertex AI decides starting number, not greater than
-     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
-     * 
- * - * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The startingReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setStartingReplicaCount(int value) { - - startingReplicaCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The number of machine replicas used at the start of the batch
-     * operation. If not set, Vertex AI decides starting number, not greater than
-     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
-     * 
- * - * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearStartingReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000002); - startingReplicaCount_ = 0; - onChanged(); - return this; - } - - private int maxReplicaCount_; - - /** - * - * - *
-     * Immutable. The maximum number of machine replicas the batch operation may
-     * be scaled to. The default value is 10.
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - /** - * - * - *
-     * Immutable. The maximum number of machine replicas the batch operation may
-     * be scaled to. The default value is 10.
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The maxReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setMaxReplicaCount(int value) { - - maxReplicaCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The maximum number of machine replicas the batch operation may
-     * be scaled to. The default value is 10.
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearMaxReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000004); - maxReplicaCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.BatchDedicatedResources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.BatchDedicatedResources) - private static final com.google.cloud.vertexai.api.BatchDedicatedResources DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.BatchDedicatedResources(); - } - - public static com.google.cloud.vertexai.api.BatchDedicatedResources getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchDedicatedResources 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.vertexai.api.BatchDedicatedResources getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java deleted file mode 100644 index c1db90243f96..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BatchDedicatedResourcesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.BatchDedicatedResources) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - boolean hasMachineSpec(); - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - com.google.cloud.vertexai.api.MachineSpec getMachineSpec(); - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder(); - - /** - * - * - *
-   * Immutable. The number of machine replicas used at the start of the batch
-   * operation. If not set, Vertex AI decides starting number, not greater than
-   * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
-   * 
- * - * int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The startingReplicaCount. - */ - int getStartingReplicaCount(); - - /** - * - * - *
-   * Immutable. The maximum number of machine replicas the batch operation may
-   * be scaled to. The default value is 10.
-   * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - int getMaxReplicaCount(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java deleted file mode 100644 index a6b4f51f08c7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The BigQuery location for the output content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BigQueryDestination} - */ -@com.google.protobuf.Generated -public final class BigQueryDestination extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.BigQueryDestination) - BigQueryDestinationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BigQueryDestination"); - } - - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private BigQueryDestination() { - outputUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BigQueryDestination.class, - com.google.cloud.vertexai.api.BigQueryDestination.Builder.class); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputUri_ = ""; - - /** - * - * - *
-   * Required. BigQuery URI to a project or table, up to 2000 characters long.
-   *
-   * When only the project is specified, the Dataset and Table is created.
-   * When the full table reference is specified, the Dataset must exist and
-   * table must not exist.
-   *
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example:
-   * `bq://projectId` or `bq://projectId.bqDatasetId` or
-   * `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - @java.lang.Override - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - 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(); - outputUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. BigQuery URI to a project or table, up to 2000 characters long.
-   *
-   * When only the project is specified, the Dataset and Table is created.
-   * When the full table reference is specified, the Dataset must exist and
-   * table must not exist.
-   *
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example:
-   * `bq://projectId` or `bq://projectId.bqDatasetId` or
-   * `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = 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.GeneratedMessage.isStringEmpty(outputUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, outputUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, outputUri_); - } - 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.vertexai.api.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.BigQueryDestination other = - (com.google.cloud.vertexai.api.BigQueryDestination) obj; - - if (!getOutputUri().equals(other.getOutputUri())) 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) + OUTPUT_URI_FIELD_NUMBER; - hash = (53 * hash) + getOutputUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination 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.vertexai.api.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination 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.vertexai.api.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.BigQueryDestination 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The BigQuery location for the output content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BigQueryDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.BigQueryDestination) - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BigQueryDestination.class, - com.google.cloud.vertexai.api.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.BigQueryDestination.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - outputUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination build() { - com.google.cloud.vertexai.api.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination buildPartial() { - com.google.cloud.vertexai.api.BigQueryDestination result = - new com.google.cloud.vertexai.api.BigQueryDestination(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.BigQueryDestination result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.outputUri_ = outputUri_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.BigQueryDestination) { - return mergeFrom((com.google.cloud.vertexai.api.BigQueryDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.BigQueryDestination other) { - if (other == com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance()) - return this; - if (!other.getOutputUri().isEmpty()) { - outputUri_ = other.outputUri_; - 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: - { - outputUri_ = 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 outputUri_ = ""; - - /** - * - * - *
-     * Required. BigQuery URI to a project or table, up to 2000 characters long.
-     *
-     * When only the project is specified, the Dataset and Table is created.
-     * When the full table reference is specified, the Dataset must exist and
-     * table must not exist.
-     *
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example:
-     * `bq://projectId` or `bq://projectId.bqDatasetId` or
-     * `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. BigQuery URI to a project or table, up to 2000 characters long.
-     *
-     * When only the project is specified, the Dataset and Table is created.
-     * When the full table reference is specified, the Dataset must exist and
-     * table must not exist.
-     *
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example:
-     * `bq://projectId` or `bq://projectId.bqDatasetId` or
-     * `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. BigQuery URI to a project or table, up to 2000 characters long.
-     *
-     * When only the project is specified, the Dataset and Table is created.
-     * When the full table reference is specified, the Dataset must exist and
-     * table must not exist.
-     *
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example:
-     * `bq://projectId` or `bq://projectId.bqDatasetId` or
-     * `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. BigQuery URI to a project or table, up to 2000 characters long.
-     *
-     * When only the project is specified, the Dataset and Table is created.
-     * When the full table reference is specified, the Dataset must exist and
-     * table must not exist.
-     *
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example:
-     * `bq://projectId` or `bq://projectId.bqDatasetId` or
-     * `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - outputUri_ = getDefaultInstance().getOutputUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. BigQuery URI to a project or table, up to 2000 characters long.
-     *
-     * When only the project is specified, the Dataset and Table is created.
-     * When the full table reference is specified, the Dataset must exist and
-     * table must not exist.
-     *
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example:
-     * `bq://projectId` or `bq://projectId.bqDatasetId` or
-     * `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.BigQueryDestination) - private static final com.google.cloud.vertexai.api.BigQueryDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.BigQueryDestination(); - } - - public static com.google.cloud.vertexai.api.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination 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.vertexai.api.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java deleted file mode 100644 index 7f4832b8650e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BigQueryDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. BigQuery URI to a project or table, up to 2000 characters long.
-   *
-   * When only the project is specified, the Dataset and Table is created.
-   * When the full table reference is specified, the Dataset must exist and
-   * table must not exist.
-   *
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example:
-   * `bq://projectId` or `bq://projectId.bqDatasetId` or
-   * `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - - /** - * - * - *
-   * Required. BigQuery URI to a project or table, up to 2000 characters long.
-   *
-   * When only the project is specified, the Dataset and Table is created.
-   * When the full table reference is specified, the Dataset must exist and
-   * table must not exist.
-   *
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example:
-   * `bq://projectId` or `bq://projectId.bqDatasetId` or
-   * `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java deleted file mode 100644 index abe997e36957..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java +++ /dev/null @@ -1,616 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The BigQuery location for the input content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BigQuerySource} - */ -@com.google.protobuf.Generated -public final class BigQuerySource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.BigQuerySource) - BigQuerySourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BigQuerySource"); - } - - // Use BigQuerySource.newBuilder() to construct. - private BigQuerySource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private BigQuerySource() { - inputUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQuerySource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BigQuerySource.class, - com.google.cloud.vertexai.api.BigQuerySource.Builder.class); - } - - public static final int INPUT_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object inputUri_ = ""; - - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The inputUri. - */ - @java.lang.Override - public java.lang.String getInputUri() { - java.lang.Object ref = inputUri_; - 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(); - inputUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for inputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInputUriBytes() { - java.lang.Object ref = inputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - inputUri_ = 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.GeneratedMessage.isStringEmpty(inputUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, inputUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(inputUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, inputUri_); - } - 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.vertexai.api.BigQuerySource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.BigQuerySource other = - (com.google.cloud.vertexai.api.BigQuerySource) obj; - - if (!getInputUri().equals(other.getInputUri())) 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_URI_FIELD_NUMBER; - hash = (53 * hash) + getInputUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.BigQuerySource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.BigQuerySource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BigQuerySource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BigQuerySource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.BigQuerySource) - com.google.cloud.vertexai.api.BigQuerySourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQuerySource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BigQuerySource.class, - com.google.cloud.vertexai.api.BigQuerySource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.BigQuerySource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - inputUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQuerySource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.BigQuerySource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQuerySource build() { - com.google.cloud.vertexai.api.BigQuerySource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BigQuerySource buildPartial() { - com.google.cloud.vertexai.api.BigQuerySource result = - new com.google.cloud.vertexai.api.BigQuerySource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.BigQuerySource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputUri_ = inputUri_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.BigQuerySource) { - return mergeFrom((com.google.cloud.vertexai.api.BigQuerySource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.BigQuerySource other) { - if (other == com.google.cloud.vertexai.api.BigQuerySource.getDefaultInstance()) return this; - if (!other.getInputUri().isEmpty()) { - inputUri_ = other.inputUri_; - 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: - { - inputUri_ = 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 inputUri_ = ""; - - /** - * - * - *
-     * Required. BigQuery URI to a table, up to 2000 characters long.
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The inputUri. - */ - public java.lang.String getInputUri() { - java.lang.Object ref = inputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. BigQuery URI to a table, up to 2000 characters long.
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for inputUri. - */ - public com.google.protobuf.ByteString getInputUriBytes() { - java.lang.Object ref = inputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - inputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. BigQuery URI to a table, up to 2000 characters long.
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The inputUri to set. - * @return This builder for chaining. - */ - public Builder setInputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - inputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. BigQuery URI to a table, up to 2000 characters long.
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearInputUri() { - inputUri_ = getDefaultInstance().getInputUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. BigQuery URI to a table, up to 2000 characters long.
-     * Accepted forms:
-     *
-     * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-     * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for inputUri to set. - * @return This builder for chaining. - */ - public Builder setInputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - inputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.BigQuerySource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.BigQuerySource) - private static final com.google.cloud.vertexai.api.BigQuerySource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.BigQuerySource(); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.BigQuerySource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java deleted file mode 100644 index 884383e9a2cb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BigQuerySourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.BigQuerySource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The inputUri. - */ - java.lang.String getInputUri(); - - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   *
-   * *  BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
-   * 
- * - * string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for inputUri. - */ - com.google.protobuf.ByteString getInputUriBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java deleted file mode 100644 index ff4476891d95..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java +++ /dev/null @@ -1,698 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Content blob.
- *
- * It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text]
- * directly rather than raw bytes.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Blob} - */ -@com.google.protobuf.Generated -public final class Blob extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Blob) - BlobOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Blob"); - } - - // Use Blob.newBuilder() to construct. - private Blob(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Blob() { - mimeType_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Blob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Blob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Blob.class, - com.google.cloud.vertexai.api.Blob.Builder.class); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object mimeType_ = ""; - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Required. Raw bytes.
-   * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - - 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.GeneratedMessage.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); - } - if (!data_.isEmpty()) { - output.writeBytes(2, data_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); - } - if (!data_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); - } - 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.vertexai.api.Blob)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Blob other = (com.google.cloud.vertexai.api.Blob) obj; - - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getData().equals(other.getData())) 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) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Blob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Blob 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.vertexai.api.Blob parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Blob 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.vertexai.api.Blob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Blob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Blob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Blob parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Blob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Blob parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Blob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Blob parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Blob 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Content blob.
-   *
-   * It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text]
-   * directly rather than raw bytes.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Blob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Blob) - com.google.cloud.vertexai.api.BlobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Blob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Blob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Blob.class, - com.google.cloud.vertexai.api.Blob.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Blob.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mimeType_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Blob_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Blob getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Blob build() { - com.google.cloud.vertexai.api.Blob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Blob buildPartial() { - com.google.cloud.vertexai.api.Blob result = new com.google.cloud.vertexai.api.Blob(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Blob result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mimeType_ = mimeType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.data_ = data_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Blob) { - return mergeFrom((com.google.cloud.vertexai.api.Blob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Blob other) { - if (other == com.google.cloud.vertexai.api.Blob.getDefaultInstance()) return this; - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getData().isEmpty()) { - setData(other.getData()); - } - 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_ |= 0x00000001; - break; - } // case 10 - case 18: - { - data_ = input.readBytes(); - 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 mimeType_ = ""; - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000002); - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Blob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Blob) - private static final com.google.cloud.vertexai.api.Blob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Blob(); - } - - public static com.google.cloud.vertexai.api.Blob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Blob 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.vertexai.api.Blob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java deleted file mode 100644 index 2c414c748b34..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BlobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Blob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Required. Raw bytes.
-   * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - com.google.protobuf.ByteString getData(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java deleted file mode 100644 index e72bfd00e740..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for blur baseline.
- *
- * When enabled, a linear path from the maximally blurred image to the input
- * image is created. Using a blurred baseline instead of zero (black image) is
- * motivated by the BlurIG approach explained here:
- * https://arxiv.org/abs/2004.03383
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BlurBaselineConfig} - */ -@com.google.protobuf.Generated -public final class BlurBaselineConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.BlurBaselineConfig) - BlurBaselineConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BlurBaselineConfig"); - } - - // Use BlurBaselineConfig.newBuilder() to construct. - private BlurBaselineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private BlurBaselineConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BlurBaselineConfig.class, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder.class); - } - - public static final int MAX_BLUR_SIGMA_FIELD_NUMBER = 1; - private float maxBlurSigma_ = 0F; - - /** - * - * - *
-   * The standard deviation of the blur kernel for the blurred baseline. The
-   * same blurring parameter is used for both the height and the width
-   * dimension. If not set, the method defaults to the zero (i.e. black for
-   * images) baseline.
-   * 
- * - * float max_blur_sigma = 1; - * - * @return The maxBlurSigma. - */ - @java.lang.Override - public float getMaxBlurSigma() { - return maxBlurSigma_; - } - - 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 (java.lang.Float.floatToRawIntBits(maxBlurSigma_) != 0) { - output.writeFloat(1, maxBlurSigma_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(maxBlurSigma_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, maxBlurSigma_); - } - 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.vertexai.api.BlurBaselineConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.BlurBaselineConfig other = - (com.google.cloud.vertexai.api.BlurBaselineConfig) obj; - - if (java.lang.Float.floatToIntBits(getMaxBlurSigma()) - != java.lang.Float.floatToIntBits(other.getMaxBlurSigma())) 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_BLUR_SIGMA_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMaxBlurSigma()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig 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.vertexai.api.BlurBaselineConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig 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.vertexai.api.BlurBaselineConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.BlurBaselineConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BlurBaselineConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.BlurBaselineConfig) - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BlurBaselineConfig.class, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.BlurBaselineConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - maxBlurSigma_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfig build() { - com.google.cloud.vertexai.api.BlurBaselineConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfig buildPartial() { - com.google.cloud.vertexai.api.BlurBaselineConfig result = - new com.google.cloud.vertexai.api.BlurBaselineConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.BlurBaselineConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.maxBlurSigma_ = maxBlurSigma_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.BlurBaselineConfig) { - return mergeFrom((com.google.cloud.vertexai.api.BlurBaselineConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.BlurBaselineConfig other) { - if (other == com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance()) - return this; - if (java.lang.Float.floatToRawIntBits(other.getMaxBlurSigma()) != 0) { - setMaxBlurSigma(other.getMaxBlurSigma()); - } - 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: - { - maxBlurSigma_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - 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 maxBlurSigma_; - - /** - * - * - *
-     * The standard deviation of the blur kernel for the blurred baseline. The
-     * same blurring parameter is used for both the height and the width
-     * dimension. If not set, the method defaults to the zero (i.e. black for
-     * images) baseline.
-     * 
- * - * float max_blur_sigma = 1; - * - * @return The maxBlurSigma. - */ - @java.lang.Override - public float getMaxBlurSigma() { - return maxBlurSigma_; - } - - /** - * - * - *
-     * The standard deviation of the blur kernel for the blurred baseline. The
-     * same blurring parameter is used for both the height and the width
-     * dimension. If not set, the method defaults to the zero (i.e. black for
-     * images) baseline.
-     * 
- * - * float max_blur_sigma = 1; - * - * @param value The maxBlurSigma to set. - * @return This builder for chaining. - */ - public Builder setMaxBlurSigma(float value) { - - maxBlurSigma_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The standard deviation of the blur kernel for the blurred baseline. The
-     * same blurring parameter is used for both the height and the width
-     * dimension. If not set, the method defaults to the zero (i.e. black for
-     * images) baseline.
-     * 
- * - * float max_blur_sigma = 1; - * - * @return This builder for chaining. - */ - public Builder clearMaxBlurSigma() { - bitField0_ = (bitField0_ & ~0x00000001); - maxBlurSigma_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.BlurBaselineConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.BlurBaselineConfig) - private static final com.google.cloud.vertexai.api.BlurBaselineConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.BlurBaselineConfig(); - } - - public static com.google.cloud.vertexai.api.BlurBaselineConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BlurBaselineConfig 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.vertexai.api.BlurBaselineConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java deleted file mode 100644 index ffe4f513fa04..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BlurBaselineConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.BlurBaselineConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The standard deviation of the blur kernel for the blurred baseline. The
-   * same blurring parameter is used for both the height and the width
-   * dimension. If not set, the method defaults to the zero (i.e. black for
-   * images) baseline.
-   * 
- * - * float max_blur_sigma = 1; - * - * @return The maxBlurSigma. - */ - float getMaxBlurSigma(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java deleted file mode 100644 index 261269c3a91c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A list of boolean values.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BoolArray} - */ -@com.google.protobuf.Generated -public final class BoolArray extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.BoolArray) - BoolArrayOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BoolArray"); - } - - // Use BoolArray.newBuilder() to construct. - private BoolArray(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private BoolArray() { - values_ = emptyBooleanList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_BoolArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_BoolArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BoolArray.class, - com.google.cloud.vertexai.api.BoolArray.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.BooleanList values_ = emptyBooleanList(); - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @return A list containing the values. - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public boolean getValues(int index) { - return values_.getBoolean(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.writeBoolNoTag(values_.getBoolean(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 1 * 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.vertexai.api.BoolArray)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.BoolArray other = (com.google.cloud.vertexai.api.BoolArray) 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.vertexai.api.BoolArray parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BoolArray 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.vertexai.api.BoolArray parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BoolArray 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.vertexai.api.BoolArray parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.BoolArray parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BoolArray parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BoolArray parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BoolArray parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BoolArray parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.BoolArray parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.BoolArray parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.BoolArray 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A list of boolean values.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.BoolArray} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.BoolArray) - com.google.cloud.vertexai.api.BoolArrayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_BoolArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_BoolArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.BoolArray.class, - com.google.cloud.vertexai.api.BoolArray.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.BoolArray.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - values_ = emptyBooleanList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_BoolArray_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BoolArray getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.BoolArray.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BoolArray build() { - com.google.cloud.vertexai.api.BoolArray result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.BoolArray buildPartial() { - com.google.cloud.vertexai.api.BoolArray result = - new com.google.cloud.vertexai.api.BoolArray(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.BoolArray result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.BoolArray) { - return mergeFrom((com.google.cloud.vertexai.api.BoolArray) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.BoolArray other) { - if (other == com.google.cloud.vertexai.api.BoolArray.getDefaultInstance()) return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - values_.makeImmutable(); - 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 8: - { - boolean v = input.readBool(); - ensureValuesIsMutable(); - values_.addBoolean(v); - break; - } // case 8 - case 10: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureValuesIsMutable(alloc / 1); - while (input.getBytesUntilLimit() > 0) { - values_.addBoolean(input.readBool()); - } - 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.BooleanList values_ = emptyBooleanList(); - - private void ensureValuesIsMutable() { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_); - } - bitField0_ |= 0x00000001; - } - - private void ensureValuesIsMutable(int capacity) { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_, capacity); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool values = 1; - * - * @return A list containing the values. - */ - public java.util.List getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public boolean getValues(int index) { - return values_.getBoolean(index); - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool 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, boolean value) { - - ensureValuesIsMutable(); - values_.setBoolean(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool values = 1; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(boolean value) { - - ensureValuesIsMutable(); - values_.addBoolean(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool 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_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of bool values.
-     * 
- * - * repeated bool values = 1; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = emptyBooleanList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.BoolArray) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.BoolArray) - private static final com.google.cloud.vertexai.api.BoolArray DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.BoolArray(); - } - - public static com.google.cloud.vertexai.api.BoolArray getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoolArray 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.vertexai.api.BoolArray getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java deleted file mode 100644 index 5fb0b9481b44..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface BoolArrayOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.BoolArray) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-   * A list of bool values.
-   * 
- * - * repeated bool values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - boolean getValues(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContent.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContent.java deleted file mode 100644 index 057a55f61c1e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContent.java +++ /dev/null @@ -1,5731 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/cached_content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A resource used in LLM queries for users to explicitly specify what to cache
- * and how to cache.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CachedContent} - */ -@com.google.protobuf.Generated -public final class CachedContent extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CachedContent) - CachedContentOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CachedContent"); - } - - // Use CachedContent.newBuilder() to construct. - private CachedContent(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CachedContent() { - name_ = ""; - displayName_ = ""; - model_ = ""; - contents_ = java.util.Collections.emptyList(); - tools_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CachedContent.class, - com.google.cloud.vertexai.api.CachedContent.Builder.class); - } - - public interface UsageMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CachedContent.UsageMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Total number of tokens that the cached content consumes.
-     * 
- * - * int32 total_token_count = 1; - * - * @return The totalTokenCount. - */ - int getTotalTokenCount(); - - /** - * - * - *
-     * Number of text characters.
-     * 
- * - * int32 text_count = 2; - * - * @return The textCount. - */ - int getTextCount(); - - /** - * - * - *
-     * Number of images.
-     * 
- * - * int32 image_count = 3; - * - * @return The imageCount. - */ - int getImageCount(); - - /** - * - * - *
-     * Duration of video in seconds.
-     * 
- * - * int32 video_duration_seconds = 4; - * - * @return The videoDurationSeconds. - */ - int getVideoDurationSeconds(); - - /** - * - * - *
-     * Duration of audio in seconds.
-     * 
- * - * int32 audio_duration_seconds = 5; - * - * @return The audioDurationSeconds. - */ - int getAudioDurationSeconds(); - } - - /** - * - * - *
-   * Metadata on the usage of the cached content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CachedContent.UsageMetadata} - */ - public static final class UsageMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CachedContent.UsageMetadata) - UsageMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UsageMetadata"); - } - - // Use UsageMetadata.newBuilder() to construct. - private UsageMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UsageMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.class, - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder.class); - } - - public static final int TOTAL_TOKEN_COUNT_FIELD_NUMBER = 1; - private int totalTokenCount_ = 0; - - /** - * - * - *
-     * Total number of tokens that the cached content consumes.
-     * 
- * - * int32 total_token_count = 1; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - public static final int TEXT_COUNT_FIELD_NUMBER = 2; - private int textCount_ = 0; - - /** - * - * - *
-     * Number of text characters.
-     * 
- * - * int32 text_count = 2; - * - * @return The textCount. - */ - @java.lang.Override - public int getTextCount() { - return textCount_; - } - - public static final int IMAGE_COUNT_FIELD_NUMBER = 3; - private int imageCount_ = 0; - - /** - * - * - *
-     * Number of images.
-     * 
- * - * int32 image_count = 3; - * - * @return The imageCount. - */ - @java.lang.Override - public int getImageCount() { - return imageCount_; - } - - public static final int VIDEO_DURATION_SECONDS_FIELD_NUMBER = 4; - private int videoDurationSeconds_ = 0; - - /** - * - * - *
-     * Duration of video in seconds.
-     * 
- * - * int32 video_duration_seconds = 4; - * - * @return The videoDurationSeconds. - */ - @java.lang.Override - public int getVideoDurationSeconds() { - return videoDurationSeconds_; - } - - public static final int AUDIO_DURATION_SECONDS_FIELD_NUMBER = 5; - private int audioDurationSeconds_ = 0; - - /** - * - * - *
-     * Duration of audio in seconds.
-     * 
- * - * int32 audio_duration_seconds = 5; - * - * @return The audioDurationSeconds. - */ - @java.lang.Override - public int getAudioDurationSeconds() { - return audioDurationSeconds_; - } - - 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 (totalTokenCount_ != 0) { - output.writeInt32(1, totalTokenCount_); - } - if (textCount_ != 0) { - output.writeInt32(2, textCount_); - } - if (imageCount_ != 0) { - output.writeInt32(3, imageCount_); - } - if (videoDurationSeconds_ != 0) { - output.writeInt32(4, videoDurationSeconds_); - } - if (audioDurationSeconds_ != 0) { - output.writeInt32(5, audioDurationSeconds_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (totalTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, totalTokenCount_); - } - if (textCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, textCount_); - } - if (imageCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, imageCount_); - } - if (videoDurationSeconds_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, videoDurationSeconds_); - } - if (audioDurationSeconds_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, audioDurationSeconds_); - } - 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.vertexai.api.CachedContent.UsageMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CachedContent.UsageMetadata other = - (com.google.cloud.vertexai.api.CachedContent.UsageMetadata) obj; - - if (getTotalTokenCount() != other.getTotalTokenCount()) return false; - if (getTextCount() != other.getTextCount()) return false; - if (getImageCount() != other.getImageCount()) return false; - if (getVideoDurationSeconds() != other.getVideoDurationSeconds()) return false; - if (getAudioDurationSeconds() != other.getAudioDurationSeconds()) 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) + TOTAL_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getTotalTokenCount(); - hash = (37 * hash) + TEXT_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getTextCount(); - hash = (37 * hash) + IMAGE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getImageCount(); - hash = (37 * hash) + VIDEO_DURATION_SECONDS_FIELD_NUMBER; - hash = (53 * hash) + getVideoDurationSeconds(); - hash = (37 * hash) + AUDIO_DURATION_SECONDS_FIELD_NUMBER; - hash = (53 * hash) + getAudioDurationSeconds(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata 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.vertexai.api.CachedContent.UsageMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata 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.vertexai.api.CachedContent.UsageMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CachedContent.UsageMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Metadata on the usage of the cached content.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CachedContent.UsageMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CachedContent.UsageMetadata) - com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.class, - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CachedContent.UsageMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - totalTokenCount_ = 0; - textCount_ = 0; - imageCount_ = 0; - videoDurationSeconds_ = 0; - audioDurationSeconds_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata build() { - com.google.cloud.vertexai.api.CachedContent.UsageMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata buildPartial() { - com.google.cloud.vertexai.api.CachedContent.UsageMetadata result = - new com.google.cloud.vertexai.api.CachedContent.UsageMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CachedContent.UsageMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.totalTokenCount_ = totalTokenCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.textCount_ = textCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.imageCount_ = imageCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.videoDurationSeconds_ = videoDurationSeconds_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.audioDurationSeconds_ = audioDurationSeconds_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CachedContent.UsageMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.CachedContent.UsageMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CachedContent.UsageMetadata other) { - if (other == com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance()) - return this; - if (other.getTotalTokenCount() != 0) { - setTotalTokenCount(other.getTotalTokenCount()); - } - if (other.getTextCount() != 0) { - setTextCount(other.getTextCount()); - } - if (other.getImageCount() != 0) { - setImageCount(other.getImageCount()); - } - if (other.getVideoDurationSeconds() != 0) { - setVideoDurationSeconds(other.getVideoDurationSeconds()); - } - if (other.getAudioDurationSeconds() != 0) { - setAudioDurationSeconds(other.getAudioDurationSeconds()); - } - 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: - { - totalTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - textCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - imageCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - videoDurationSeconds_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: - { - audioDurationSeconds_ = 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 totalTokenCount_; - - /** - * - * - *
-       * Total number of tokens that the cached content consumes.
-       * 
- * - * int32 total_token_count = 1; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - /** - * - * - *
-       * Total number of tokens that the cached content consumes.
-       * 
- * - * int32 total_token_count = 1; - * - * @param value The totalTokenCount to set. - * @return This builder for chaining. - */ - public Builder setTotalTokenCount(int value) { - - totalTokenCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Total number of tokens that the cached content consumes.
-       * 
- * - * int32 total_token_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearTotalTokenCount() { - bitField0_ = (bitField0_ & ~0x00000001); - totalTokenCount_ = 0; - onChanged(); - return this; - } - - private int textCount_; - - /** - * - * - *
-       * Number of text characters.
-       * 
- * - * int32 text_count = 2; - * - * @return The textCount. - */ - @java.lang.Override - public int getTextCount() { - return textCount_; - } - - /** - * - * - *
-       * Number of text characters.
-       * 
- * - * int32 text_count = 2; - * - * @param value The textCount to set. - * @return This builder for chaining. - */ - public Builder setTextCount(int value) { - - textCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Number of text characters.
-       * 
- * - * int32 text_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearTextCount() { - bitField0_ = (bitField0_ & ~0x00000002); - textCount_ = 0; - onChanged(); - return this; - } - - private int imageCount_; - - /** - * - * - *
-       * Number of images.
-       * 
- * - * int32 image_count = 3; - * - * @return The imageCount. - */ - @java.lang.Override - public int getImageCount() { - return imageCount_; - } - - /** - * - * - *
-       * Number of images.
-       * 
- * - * int32 image_count = 3; - * - * @param value The imageCount to set. - * @return This builder for chaining. - */ - public Builder setImageCount(int value) { - - imageCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Number of images.
-       * 
- * - * int32 image_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearImageCount() { - bitField0_ = (bitField0_ & ~0x00000004); - imageCount_ = 0; - onChanged(); - return this; - } - - private int videoDurationSeconds_; - - /** - * - * - *
-       * Duration of video in seconds.
-       * 
- * - * int32 video_duration_seconds = 4; - * - * @return The videoDurationSeconds. - */ - @java.lang.Override - public int getVideoDurationSeconds() { - return videoDurationSeconds_; - } - - /** - * - * - *
-       * Duration of video in seconds.
-       * 
- * - * int32 video_duration_seconds = 4; - * - * @param value The videoDurationSeconds to set. - * @return This builder for chaining. - */ - public Builder setVideoDurationSeconds(int value) { - - videoDurationSeconds_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * Duration of video in seconds.
-       * 
- * - * int32 video_duration_seconds = 4; - * - * @return This builder for chaining. - */ - public Builder clearVideoDurationSeconds() { - bitField0_ = (bitField0_ & ~0x00000008); - videoDurationSeconds_ = 0; - onChanged(); - return this; - } - - private int audioDurationSeconds_; - - /** - * - * - *
-       * Duration of audio in seconds.
-       * 
- * - * int32 audio_duration_seconds = 5; - * - * @return The audioDurationSeconds. - */ - @java.lang.Override - public int getAudioDurationSeconds() { - return audioDurationSeconds_; - } - - /** - * - * - *
-       * Duration of audio in seconds.
-       * 
- * - * int32 audio_duration_seconds = 5; - * - * @param value The audioDurationSeconds to set. - * @return This builder for chaining. - */ - public Builder setAudioDurationSeconds(int value) { - - audioDurationSeconds_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Duration of audio in seconds.
-       * 
- * - * int32 audio_duration_seconds = 5; - * - * @return This builder for chaining. - */ - public Builder clearAudioDurationSeconds() { - bitField0_ = (bitField0_ & ~0x00000010); - audioDurationSeconds_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CachedContent.UsageMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CachedContent.UsageMetadata) - private static final com.google.cloud.vertexai.api.CachedContent.UsageMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CachedContent.UsageMetadata(); - } - - public static com.google.cloud.vertexai.api.CachedContent.UsageMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UsageMetadata 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.vertexai.api.CachedContent.UsageMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - private int expirationCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object expiration_; - - public enum ExpirationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - EXPIRE_TIME(9), - TTL(10), - EXPIRATION_NOT_SET(0); - private final int value; - - private ExpirationCase(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 ExpirationCase valueOf(int value) { - return forNumber(value); - } - - public static ExpirationCase forNumber(int value) { - switch (value) { - case 9: - return EXPIRE_TIME; - case 10: - return TTL; - case 0: - return EXPIRATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ExpirationCase getExpirationCase() { - return ExpirationCase.forNumber(expirationCase_); - } - - public static final int EXPIRE_TIME_FIELD_NUMBER = 9; - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return Whether the expireTime field is set. - */ - @java.lang.Override - public boolean hasExpireTime() { - return expirationCase_ == 9; - } - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return The expireTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExpireTime() { - if (expirationCase_ == 9) { - return (com.google.protobuf.Timestamp) expiration_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { - if (expirationCase_ == 9) { - return (com.google.protobuf.Timestamp) expiration_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int TTL_FIELD_NUMBER = 10; - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return Whether the ttl field is set. - */ - @java.lang.Override - public boolean hasTtl() { - return expirationCase_ == 10; - } - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return The ttl. - */ - @java.lang.Override - public com.google.protobuf.Duration getTtl() { - if (expirationCase_ == 10) { - return (com.google.protobuf.Duration) expiration_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { - if (expirationCase_ == 10) { - return (com.google.protobuf.Duration) expiration_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Immutable. Identifier. The server-generated resource name of the cached
-   * content Format:
-   * projects/{project}/locations/{location}/cachedContents/{cached_content}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The server-generated resource name of the cached
-   * content Format:
-   * projects/{project}/locations/{location}/cachedContents/{cached_content}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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 DISPLAY_NAME_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - - /** - * - * - *
-   * Optional. Immutable. The user-generated meaningful display name of the
-   * cached content.
-   * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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. Immutable. The user-generated meaningful display name of the
-   * cached content.
-   * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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 MODEL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Immutable. The name of the `Model` to use for cached content. Currently,
-   * only the published Gemini base models are supported, in form of
-   * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-   * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Immutable. The name of the `Model` to use for cached content. Currently,
-   * only the published Gemini base models are supported, in form of
-   * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-   * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.Content systemInstruction_; - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the systemInstruction field is set. - */ - @java.lang.Override - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The systemInstruction. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - public static final int CONTENTS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List contents_; - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getContentsList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getContentsOrBuilderList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public int getContentsCount() { - return contents_.size(); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContents(int index) { - return contents_.get(index); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - return contents_.get(index); - } - - public static final int TOOLS_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private java.util.List tools_; - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getToolsList() { - return tools_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getToolsOrBuilderList() { - return tools_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public int getToolsCount() { - return tools_.size(); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool getTools(int index) { - return tools_.get(index); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - return tools_.get(index); - } - - public static final int TOOL_CONFIG_FIELD_NUMBER = 6; - private com.google.cloud.vertexai.api.ToolConfig toolConfig_; - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the toolConfig field is set. - */ - @java.lang.Override - public boolean hasToolConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The toolConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfig getToolConfig() { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder() { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Output only. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.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. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.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 UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int USAGE_METADATA_FIELD_NUMBER = 12; - private com.google.cloud.vertexai.api.CachedContent.UsageMetadata usageMetadata_; - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the usageMetadata field is set. - */ - @java.lang.Override - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The usageMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata getUsageMetadata() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder - getUsageMetadataOrBuilder() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 13; - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionSpec field is set. - */ - @java.lang.Override - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, model_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getSystemInstruction()); - } - for (int i = 0; i < contents_.size(); i++) { - output.writeMessage(4, contents_.get(i)); - } - for (int i = 0; i < tools_.size(); i++) { - output.writeMessage(5, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(6, getToolConfig()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(7, getCreateTime()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(8, getUpdateTime()); - } - if (expirationCase_ == 9) { - output.writeMessage(9, (com.google.protobuf.Timestamp) expiration_); - } - if (expirationCase_ == 10) { - output.writeMessage(10, (com.google.protobuf.Duration) expiration_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, displayName_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(12, getUsageMetadata()); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(13, getEncryptionSpec()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, model_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSystemInstruction()); - } - for (int i = 0; i < contents_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, contents_.get(i)); - } - for (int i = 0; i < tools_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getToolConfig()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); - } - if (expirationCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, (com.google.protobuf.Timestamp) expiration_); - } - if (expirationCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.protobuf.Duration) expiration_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(11, displayName_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUsageMetadata()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEncryptionSpec()); - } - 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.vertexai.api.CachedContent)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CachedContent other = - (com.google.cloud.vertexai.api.CachedContent) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getModel().equals(other.getModel())) return false; - if (hasSystemInstruction() != other.hasSystemInstruction()) return false; - if (hasSystemInstruction()) { - if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; - } - if (!getContentsList().equals(other.getContentsList())) return false; - if (!getToolsList().equals(other.getToolsList())) return false; - if (hasToolConfig() != other.hasToolConfig()) return false; - if (hasToolConfig()) { - if (!getToolConfig().equals(other.getToolConfig())) return false; - } - 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 (hasUsageMetadata() != other.hasUsageMetadata()) return false; - if (hasUsageMetadata()) { - if (!getUsageMetadata().equals(other.getUsageMetadata())) return false; - } - if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; - if (hasEncryptionSpec()) { - if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; - } - if (!getExpirationCase().equals(other.getExpirationCase())) return false; - switch (expirationCase_) { - case 9: - if (!getExpireTime().equals(other.getExpireTime())) return false; - break; - case 10: - if (!getTtl().equals(other.getTtl())) 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) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - if (hasSystemInstruction()) { - hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; - hash = (53 * hash) + getSystemInstruction().hashCode(); - } - if (getContentsCount() > 0) { - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContentsList().hashCode(); - } - if (getToolsCount() > 0) { - hash = (37 * hash) + TOOLS_FIELD_NUMBER; - hash = (53 * hash) + getToolsList().hashCode(); - } - if (hasToolConfig()) { - hash = (37 * hash) + TOOL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getToolConfig().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 (hasUsageMetadata()) { - hash = (37 * hash) + USAGE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUsageMetadata().hashCode(); - } - if (hasEncryptionSpec()) { - hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionSpec().hashCode(); - } - switch (expirationCase_) { - case 9: - hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getExpireTime().hashCode(); - break; - case 10: - hash = (37 * hash) + TTL_FIELD_NUMBER; - hash = (53 * hash) + getTtl().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent 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.vertexai.api.CachedContent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent 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.vertexai.api.CachedContent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CachedContent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CachedContent 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A resource used in LLM queries for users to explicitly specify what to cache
-   * and how to cache.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CachedContent} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CachedContent) - com.google.cloud.vertexai.api.CachedContentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CachedContent.class, - com.google.cloud.vertexai.api.CachedContent.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CachedContent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSystemInstructionFieldBuilder(); - internalGetContentsFieldBuilder(); - internalGetToolsFieldBuilder(); - internalGetToolConfigFieldBuilder(); - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - internalGetUsageMetadataFieldBuilder(); - internalGetEncryptionSpecFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (expireTimeBuilder_ != null) { - expireTimeBuilder_.clear(); - } - if (ttlBuilder_ != null) { - ttlBuilder_.clear(); - } - name_ = ""; - displayName_ = ""; - model_ = ""; - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - } else { - contents_ = null; - contentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - } else { - tools_ = null; - toolsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - toolConfig_ = null; - if (toolConfigBuilder_ != null) { - toolConfigBuilder_.dispose(); - toolConfigBuilder_ = null; - } - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - expirationCase_ = 0; - expiration_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.CachedContentProto - .internal_static_google_cloud_vertexai_v1_CachedContent_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CachedContent.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent build() { - com.google.cloud.vertexai.api.CachedContent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CachedContent buildPartial() { - com.google.cloud.vertexai.api.CachedContent result = - new com.google.cloud.vertexai.api.CachedContent(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.CachedContent result) { - if (contentsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - contents_ = java.util.Collections.unmodifiableList(contents_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.contents_ = contents_; - } else { - result.contents_ = contentsBuilder_.build(); - } - if (toolsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - tools_ = java.util.Collections.unmodifiableList(tools_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.tools_ = tools_; - } else { - result.tools_ = toolsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.CachedContent result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.model_ = model_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.systemInstruction_ = - systemInstructionBuilder_ == null - ? systemInstruction_ - : systemInstructionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.toolConfig_ = toolConfigBuilder_ == null ? toolConfig_ : toolConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.usageMetadata_ = - usageMetadataBuilder_ == null ? usageMetadata_ : usageMetadataBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.encryptionSpec_ = - encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.CachedContent result) { - result.expirationCase_ = expirationCase_; - result.expiration_ = this.expiration_; - if (expirationCase_ == 9 && expireTimeBuilder_ != null) { - result.expiration_ = expireTimeBuilder_.build(); - } - if (expirationCase_ == 10 && ttlBuilder_ != null) { - result.expiration_ = ttlBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CachedContent) { - return mergeFrom((com.google.cloud.vertexai.api.CachedContent) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CachedContent other) { - if (other == com.google.cloud.vertexai.api.CachedContent.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasSystemInstruction()) { - mergeSystemInstruction(other.getSystemInstruction()); - } - if (contentsBuilder_ == null) { - if (!other.contents_.isEmpty()) { - if (contents_.isEmpty()) { - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureContentsIsMutable(); - contents_.addAll(other.contents_); - } - onChanged(); - } - } else { - if (!other.contents_.isEmpty()) { - if (contentsBuilder_.isEmpty()) { - contentsBuilder_.dispose(); - contentsBuilder_ = null; - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000040); - contentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetContentsFieldBuilder() - : null; - } else { - contentsBuilder_.addAllMessages(other.contents_); - } - } - } - if (toolsBuilder_ == null) { - if (!other.tools_.isEmpty()) { - if (tools_.isEmpty()) { - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureToolsIsMutable(); - tools_.addAll(other.tools_); - } - onChanged(); - } - } else { - if (!other.tools_.isEmpty()) { - if (toolsBuilder_.isEmpty()) { - toolsBuilder_.dispose(); - toolsBuilder_ = null; - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000080); - toolsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetToolsFieldBuilder() - : null; - } else { - toolsBuilder_.addAllMessages(other.tools_); - } - } - } - if (other.hasToolConfig()) { - mergeToolConfig(other.getToolConfig()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasUsageMetadata()) { - mergeUsageMetadata(other.getUsageMetadata()); - } - if (other.hasEncryptionSpec()) { - mergeEncryptionSpec(other.getEncryptionSpec()); - } - switch (other.getExpirationCase()) { - case EXPIRE_TIME: - { - mergeExpireTime(other.getExpireTime()); - break; - } - case TTL: - { - mergeTtl(other.getTtl()); - break; - } - case EXPIRATION_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: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 26 - case 34: - { - com.google.cloud.vertexai.api.Content m = - input.readMessage( - com.google.cloud.vertexai.api.Content.parser(), extensionRegistry); - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(m); - } else { - contentsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.cloud.vertexai.api.Tool m = - input.readMessage( - com.google.cloud.vertexai.api.Tool.parser(), extensionRegistry); - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(m); - } else { - toolsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetToolConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); - expirationCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(internalGetTtlFieldBuilder().getBuilder(), extensionRegistry); - expirationCase_ = 10; - break; - } // case 82 - case 90: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 90 - case 98: - { - input.readMessage( - internalGetUsageMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 98 - case 106: - { - input.readMessage( - internalGetEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 106 - 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 expirationCase_ = 0; - private java.lang.Object expiration_; - - public ExpirationCase getExpirationCase() { - return ExpirationCase.forNumber(expirationCase_); - } - - public Builder clearExpiration() { - expirationCase_ = 0; - expiration_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - expireTimeBuilder_; - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return Whether the expireTime field is set. - */ - @java.lang.Override - public boolean hasExpireTime() { - return expirationCase_ == 9; - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return The expireTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExpireTime() { - if (expireTimeBuilder_ == null) { - if (expirationCase_ == 9) { - return (com.google.protobuf.Timestamp) expiration_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (expirationCase_ == 9) { - return expireTimeBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - public Builder setExpireTime(com.google.protobuf.Timestamp value) { - if (expireTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expiration_ = value; - onChanged(); - } else { - expireTimeBuilder_.setMessage(value); - } - expirationCase_ = 9; - return this; - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (expireTimeBuilder_ == null) { - expiration_ = builderForValue.build(); - onChanged(); - } else { - expireTimeBuilder_.setMessage(builderForValue.build()); - } - expirationCase_ = 9; - return this; - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { - if (expireTimeBuilder_ == null) { - if (expirationCase_ == 9 - && expiration_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - expiration_ = - com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) expiration_) - .mergeFrom(value) - .buildPartial(); - } else { - expiration_ = value; - } - onChanged(); - } else { - if (expirationCase_ == 9) { - expireTimeBuilder_.mergeFrom(value); - } else { - expireTimeBuilder_.setMessage(value); - } - } - expirationCase_ = 9; - return this; - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - public Builder clearExpireTime() { - if (expireTimeBuilder_ == null) { - if (expirationCase_ == 9) { - expirationCase_ = 0; - expiration_ = null; - onChanged(); - } - } else { - if (expirationCase_ == 9) { - expirationCase_ = 0; - expiration_ = null; - } - expireTimeBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { - return internalGetExpireTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { - if ((expirationCase_ == 9) && (expireTimeBuilder_ != null)) { - return expireTimeBuilder_.getMessageOrBuilder(); - } else { - if (expirationCase_ == 9) { - return (com.google.protobuf.Timestamp) expiration_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Timestamp of when this resource is considered expired.
-     * This is *always* provided on output, regardless of what was sent
-     * on input.
-     * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetExpireTimeFieldBuilder() { - if (expireTimeBuilder_ == null) { - if (!(expirationCase_ == 9)) { - expiration_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) expiration_, getParentForChildren(), isClean()); - expiration_ = null; - } - expirationCase_ = 9; - onChanged(); - return expireTimeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - ttlBuilder_; - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return Whether the ttl field is set. - */ - @java.lang.Override - public boolean hasTtl() { - return expirationCase_ == 10; - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return The ttl. - */ - @java.lang.Override - public com.google.protobuf.Duration getTtl() { - if (ttlBuilder_ == null) { - if (expirationCase_ == 10) { - return (com.google.protobuf.Duration) expiration_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (expirationCase_ == 10) { - return ttlBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - public Builder setTtl(com.google.protobuf.Duration value) { - if (ttlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expiration_ = value; - onChanged(); - } else { - ttlBuilder_.setMessage(value); - } - expirationCase_ = 10; - return this; - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { - if (ttlBuilder_ == null) { - expiration_ = builderForValue.build(); - onChanged(); - } else { - ttlBuilder_.setMessage(builderForValue.build()); - } - expirationCase_ = 10; - return this; - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - public Builder mergeTtl(com.google.protobuf.Duration value) { - if (ttlBuilder_ == null) { - if (expirationCase_ == 10 - && expiration_ != com.google.protobuf.Duration.getDefaultInstance()) { - expiration_ = - com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) expiration_) - .mergeFrom(value) - .buildPartial(); - } else { - expiration_ = value; - } - onChanged(); - } else { - if (expirationCase_ == 10) { - ttlBuilder_.mergeFrom(value); - } else { - ttlBuilder_.setMessage(value); - } - } - expirationCase_ = 10; - return this; - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - public Builder clearTtl() { - if (ttlBuilder_ == null) { - if (expirationCase_ == 10) { - expirationCase_ = 0; - expiration_ = null; - onChanged(); - } - } else { - if (expirationCase_ == 10) { - expirationCase_ = 0; - expiration_ = null; - } - ttlBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - public com.google.protobuf.Duration.Builder getTtlBuilder() { - return internalGetTtlFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { - if ((expirationCase_ == 10) && (ttlBuilder_ != null)) { - return ttlBuilder_.getMessageOrBuilder(); - } else { - if (expirationCase_ == 10) { - return (com.google.protobuf.Duration) expiration_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Input only. The TTL for this resource. The expiration time is computed:
-     * now + TTL.
-     * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - internalGetTtlFieldBuilder() { - if (ttlBuilder_ == null) { - if (!(expirationCase_ == 10)) { - expiration_ = com.google.protobuf.Duration.getDefaultInstance(); - } - ttlBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) expiration_, getParentForChildren(), isClean()); - expiration_ = null; - } - expirationCase_ = 10; - onChanged(); - return ttlBuilder_; - } - - private java.lang.Object name_ = ""; - - /** - * - * - *
-     * Immutable. Identifier. The server-generated resource name of the cached
-     * content Format:
-     * projects/{project}/locations/{location}/cachedContents/{cached_content}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The server-generated resource name of the cached
-     * content Format:
-     * projects/{project}/locations/{location}/cachedContents/{cached_content}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The server-generated resource name of the cached
-     * content Format:
-     * projects/{project}/locations/{location}/cachedContents/{cached_content}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Identifier. The server-generated resource name of the cached
-     * content Format:
-     * projects/{project}/locations/{location}/cachedContents/{cached_content}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. Identifier. The server-generated resource name of the cached
-     * content Format:
-     * projects/{project}/locations/{location}/cachedContents/{cached_content}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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 displayName_ = ""; - - /** - * - * - *
-     * Optional. Immutable. The user-generated meaningful display name of the
-     * cached content.
-     * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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. Immutable. The user-generated meaningful display name of the
-     * cached content.
-     * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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. Immutable. The user-generated meaningful display name of the
-     * cached content.
-     * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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. Immutable. The user-generated meaningful display name of the
-     * cached content.
-     * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The user-generated meaningful display name of the
-     * cached content.
-     * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @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 java.lang.Object model_ = ""; - - /** - * - * - *
-     * Immutable. The name of the `Model` to use for cached content. Currently,
-     * only the published Gemini base models are supported, in form of
-     * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-     * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Immutable. The name of the `Model` to use for cached content. Currently,
-     * only the published Gemini base models are supported, in form of
-     * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-     * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Immutable. The name of the `Model` to use for cached content. Currently,
-     * only the published Gemini base models are supported, in form of
-     * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-     * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The name of the `Model` to use for cached content. Currently,
-     * only the published Gemini base models are supported, in form of
-     * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-     * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The name of the `Model` to use for cached content. Currently,
-     * only the published Gemini base models are supported, in form of
-     * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-     * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.Content systemInstruction_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - systemInstructionBuilder_; - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the systemInstruction field is set. - */ - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The systemInstruction. - */ - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - if (systemInstructionBuilder_ == null) { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } else { - return systemInstructionBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - systemInstruction_ = value; - } else { - systemInstructionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setSystemInstruction( - com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (systemInstructionBuilder_ == null) { - systemInstruction_ = builderForValue.build(); - } else { - systemInstructionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder mergeSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && systemInstruction_ != null - && systemInstruction_ != com.google.cloud.vertexai.api.Content.getDefaultInstance()) { - getSystemInstructionBuilder().mergeFrom(value); - } else { - systemInstruction_ = value; - } - } else { - systemInstructionBuilder_.mergeFrom(value); - } - if (systemInstruction_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder clearSystemInstruction() { - bitField0_ = (bitField0_ & ~0x00000020); - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getSystemInstructionBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetSystemInstructionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - if (systemInstructionBuilder_ != null) { - return systemInstructionBuilder_.getMessageOrBuilder(); - } else { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Developer set system instruction.
-     * Currently, text only
-     * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetSystemInstructionFieldBuilder() { - if (systemInstructionBuilder_ == null) { - systemInstructionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - getSystemInstruction(), getParentForChildren(), isClean()); - systemInstruction_ = null; - } - return systemInstructionBuilder_; - } - - private java.util.List contents_ = - java.util.Collections.emptyList(); - - private void ensureContentsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - contents_ = new java.util.ArrayList(contents_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentsBuilder_; - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List getContentsList() { - if (contentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contents_); - } else { - return contentsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public int getContentsCount() { - if (contentsBuilder_ == null) { - return contents_.size(); - } else { - return contentsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content getContents(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.set(index, value); - onChanged(); - } else { - contentsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.set(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(value); - onChanged(); - } else { - contentsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(index, value); - onChanged(); - } else { - contentsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addAllContents( - java.lang.Iterable values) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contents_); - onChanged(); - } else { - contentsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder clearContents() { - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - contentsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder removeContents(int index) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.remove(index); - onChanged(); - } else { - contentsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getContentsBuilder(int index) { - return internalGetContentsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List - getContentsOrBuilderList() { - if (contentsBuilder_ != null) { - return contentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contents_); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder() { - return internalGetContentsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder(int index) { - return internalGetContentsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. The content to cache
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List getContentsBuilderList() { - return internalGetContentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentsFieldBuilder() { - if (contentsBuilder_ == null) { - contentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - contents_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); - contents_ = null; - } - return contentsBuilder_; - } - - private java.util.List tools_ = - java.util.Collections.emptyList(); - - private void ensureToolsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - tools_ = new java.util.ArrayList(tools_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - toolsBuilder_; - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List getToolsList() { - if (toolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tools_); - } else { - return toolsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public int getToolsCount() { - if (toolsBuilder_ == null) { - return tools_.size(); - } else { - return toolsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Tool getTools(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.set(index, value); - onChanged(); - } else { - toolsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.set(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(value); - onChanged(); - } else { - toolsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(index, value); - onChanged(); - } else { - toolsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder addAllTools( - java.lang.Iterable values) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); - onChanged(); - } else { - toolsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder clearTools() { - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - toolsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder removeTools(int index) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.remove(index); - onChanged(); - } else { - toolsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder getToolsBuilder(int index) { - return internalGetToolsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List - getToolsOrBuilderList() { - if (toolsBuilder_ != null) { - return toolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tools_); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder() { - return internalGetToolsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder(int index) { - return internalGetToolsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. A list of `Tools` the model may use to
-     * generate the next response
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public java.util.List getToolsBuilderList() { - return internalGetToolsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - internalGetToolsFieldBuilder() { - if (toolsBuilder_ == null) { - toolsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder>( - tools_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); - tools_ = null; - } - return toolsBuilder_; - } - - private com.google.cloud.vertexai.api.ToolConfig toolConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder> - toolConfigBuilder_; - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the toolConfig field is set. - */ - public boolean hasToolConfig() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The toolConfig. - */ - public com.google.cloud.vertexai.api.ToolConfig getToolConfig() { - if (toolConfigBuilder_ == null) { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } else { - return toolConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setToolConfig(com.google.cloud.vertexai.api.ToolConfig value) { - if (toolConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - toolConfig_ = value; - } else { - toolConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder setToolConfig(com.google.cloud.vertexai.api.ToolConfig.Builder builderForValue) { - if (toolConfigBuilder_ == null) { - toolConfig_ = builderForValue.build(); - } else { - toolConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder mergeToolConfig(com.google.cloud.vertexai.api.ToolConfig value) { - if (toolConfigBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && toolConfig_ != null - && toolConfig_ != com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance()) { - getToolConfigBuilder().mergeFrom(value); - } else { - toolConfig_ = value; - } - } else { - toolConfigBuilder_.mergeFrom(value); - } - if (toolConfig_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public Builder clearToolConfig() { - bitField0_ = (bitField0_ & ~0x00000100); - toolConfig_ = null; - if (toolConfigBuilder_ != null) { - toolConfigBuilder_.dispose(); - toolConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ToolConfig.Builder getToolConfigBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetToolConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder() { - if (toolConfigBuilder_ != null) { - return toolConfigBuilder_.getMessageOrBuilder(); - } else { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - } - - /** - * - * - *
-     * Optional. Input only. Immutable. Tool config. This config is shared for all
-     * tools
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder> - internalGetToolConfigFieldBuilder() { - if (toolConfigBuilder_ == null) { - toolConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder>( - getToolConfig(), getParentForChildren(), isClean()); - toolConfig_ = null; - } - return toolConfigBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.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. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.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_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.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_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000200); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.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. Creation time of the cache entry.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000400); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - - /** - * - * - *
-     * Output only. When the cache entry was last updated in UTC time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.cloud.vertexai.api.CachedContent.UsageMetadata usageMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CachedContent.UsageMetadata, - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder, - com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder> - usageMetadataBuilder_; - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the usageMetadata field is set. - */ - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000800) != 0); - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The usageMetadata. - */ - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata getUsageMetadata() { - if (usageMetadataBuilder_ == null) { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } else { - return usageMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUsageMetadata( - com.google.cloud.vertexai.api.CachedContent.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - usageMetadata_ = value; - } else { - usageMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUsageMetadata( - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder builderForValue) { - if (usageMetadataBuilder_ == null) { - usageMetadata_ = builderForValue.build(); - } else { - usageMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUsageMetadata( - com.google.cloud.vertexai.api.CachedContent.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) - && usageMetadata_ != null - && usageMetadata_ - != com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance()) { - getUsageMetadataBuilder().mergeFrom(value); - } else { - usageMetadata_ = value; - } - } else { - usageMetadataBuilder_.mergeFrom(value); - } - if (usageMetadata_ != null) { - bitField0_ |= 0x00000800; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUsageMetadata() { - bitField0_ = (bitField0_ & ~0x00000800); - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder - getUsageMetadataBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return internalGetUsageMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder - getUsageMetadataOrBuilder() { - if (usageMetadataBuilder_ != null) { - return usageMetadataBuilder_.getMessageOrBuilder(); - } else { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.CachedContent.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - } - - /** - * - * - *
-     * Output only. Metadata on the usage of the cached content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CachedContent.UsageMetadata, - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder, - com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder> - internalGetUsageMetadataFieldBuilder() { - if (usageMetadataBuilder_ == null) { - usageMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CachedContent.UsageMetadata, - com.google.cloud.vertexai.api.CachedContent.UsageMetadata.Builder, - com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder>( - getUsageMetadata(), getParentForChildren(), isClean()); - usageMetadata_ = null; - } - return usageMetadataBuilder_; - } - - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - encryptionSpecBuilder_; - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionSpec field is set. - */ - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00001000) != 0); - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionSpec. - */ - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - if (encryptionSpecBuilder_ == null) { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } else { - return encryptionSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionSpec_ = value; - } else { - encryptionSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setEncryptionSpec( - com.google.cloud.vertexai.api.EncryptionSpec.Builder builderForValue) { - if (encryptionSpecBuilder_ == null) { - encryptionSpec_ = builderForValue.build(); - } else { - encryptionSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && encryptionSpec_ != null - && encryptionSpec_ - != com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance()) { - getEncryptionSpecBuilder().mergeFrom(value); - } else { - encryptionSpec_ = value; - } - } else { - encryptionSpecBuilder_.mergeFrom(value); - } - if (encryptionSpec_ != null) { - bitField0_ |= 0x00001000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearEncryptionSpec() { - bitField0_ = (bitField0_ & ~0x00001000); - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.EncryptionSpec.Builder getEncryptionSpecBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return internalGetEncryptionSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - if (encryptionSpecBuilder_ != null) { - return encryptionSpecBuilder_.getMessageOrBuilder(); - } else { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - } - - /** - * - * - *
-     * Input only. Immutable. Customer-managed encryption key spec for a
-     * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-     * will be secured by this key.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - internalGetEncryptionSpecFieldBuilder() { - if (encryptionSpecBuilder_ == null) { - encryptionSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder>( - getEncryptionSpec(), getParentForChildren(), isClean()); - encryptionSpec_ = null; - } - return encryptionSpecBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CachedContent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CachedContent) - private static final com.google.cloud.vertexai.api.CachedContent DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CachedContent(); - } - - public static com.google.cloud.vertexai.api.CachedContent getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CachedContent 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.vertexai.api.CachedContent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentName.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentName.java deleted file mode 100644 index 910ab9d3f895..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentName.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 CachedContentName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_CACHED_CONTENT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/cachedContents/{cached_content}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String cachedContent; - - @Deprecated - protected CachedContentName() { - project = null; - location = null; - cachedContent = null; - } - - private CachedContentName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - cachedContent = Preconditions.checkNotNull(builder.getCachedContent()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getCachedContent() { - return cachedContent; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static CachedContentName of(String project, String location, String cachedContent) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setCachedContent(cachedContent) - .build(); - } - - public static String format(String project, String location, String cachedContent) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setCachedContent(cachedContent) - .build() - .toString(); - } - - public static CachedContentName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_CACHED_CONTENT.validatedMatch( - formattedString, "CachedContentName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cached_content")); - } - - 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 (CachedContentName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_CACHED_CONTENT.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 (cachedContent != null) { - fieldMapBuilder.put("cached_content", cachedContent); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_CACHED_CONTENT.instantiate( - "project", project, "location", location, "cached_content", cachedContent); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null && getClass() == o.getClass()) { - CachedContentName that = ((CachedContentName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.cachedContent, that.cachedContent); - } - 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(cachedContent); - return h; - } - - /** Builder for projects/{project}/locations/{location}/cachedContents/{cached_content}. */ - public static class Builder { - private String project; - private String location; - private String cachedContent; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getCachedContent() { - return cachedContent; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setCachedContent(String cachedContent) { - this.cachedContent = cachedContent; - return this; - } - - private Builder(CachedContentName cachedContentName) { - this.project = cachedContentName.project; - this.location = cachedContentName.location; - this.cachedContent = cachedContentName.cachedContent; - } - - public CachedContentName build() { - return new CachedContentName(this); - } - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentOrBuilder.java deleted file mode 100644 index 6208c142c2f9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentOrBuilder.java +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/cached_content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CachedContentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CachedContent) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return Whether the expireTime field is set. - */ - boolean hasExpireTime(); - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - * - * @return The expireTime. - */ - com.google.protobuf.Timestamp getExpireTime(); - - /** - * - * - *
-   * Timestamp of when this resource is considered expired.
-   * This is *always* provided on output, regardless of what was sent
-   * on input.
-   * 
- * - * .google.protobuf.Timestamp expire_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return Whether the ttl field is set. - */ - boolean hasTtl(); - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * - * @return The ttl. - */ - com.google.protobuf.Duration getTtl(); - - /** - * - * - *
-   * Input only. The TTL for this resource. The expiration time is computed:
-   * now + TTL.
-   * 
- * - * .google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); - - /** - * - * - *
-   * Immutable. Identifier. The server-generated resource name of the cached
-   * content Format:
-   * projects/{project}/locations/{location}/cachedContents/{cached_content}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Immutable. Identifier. The server-generated resource name of the cached
-   * content Format:
-   * projects/{project}/locations/{location}/cachedContents/{cached_content}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. Immutable. The user-generated meaningful display name of the
-   * cached content.
-   * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Optional. Immutable. The user-generated meaningful display name of the
-   * cached content.
-   * 
- * - * - * string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Immutable. The name of the `Model` to use for cached content. Currently,
-   * only the published Gemini base models are supported, in form of
-   * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-   * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Immutable. The name of the `Model` to use for cached content. Currently,
-   * only the published Gemini base models are supported, in form of
-   * projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
-   * 
- * - * string model = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the systemInstruction field is set. - */ - boolean hasSystemInstruction(); - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The systemInstruction. - */ - com.google.cloud.vertexai.api.Content getSystemInstruction(); - - /** - * - * - *
-   * Optional. Input only. Immutable. Developer set system instruction.
-   * Currently, text only
-   * 
- * - * - * .google.cloud.vertexai.v1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder(); - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - java.util.List getContentsList(); - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Content getContents(int index); - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - int getContentsCount(); - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - java.util.List - getContentsOrBuilderList(); - - /** - * - * - *
-   * Optional. Input only. Immutable. The content to cache
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - java.util.List getToolsList(); - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Tool getTools(int index); - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - int getToolsCount(); - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - java.util.List getToolsOrBuilderList(); - - /** - * - * - *
-   * Optional. Input only. Immutable. A list of `Tools` the model may use to
-   * generate the next response
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return Whether the toolConfig field is set. - */ - boolean hasToolConfig(); - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - * - * @return The toolConfig. - */ - com.google.cloud.vertexai.api.ToolConfig getToolConfig(); - - /** - * - * - *
-   * Optional. Input only. Immutable. Tool config. This config is shared for all
-   * tools
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Creation time of the cache entry.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - - /** - * - * - *
-   * Output only. When the cache entry was last updated in UTC time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the usageMetadata field is set. - */ - boolean hasUsageMetadata(); - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The usageMetadata. - */ - com.google.cloud.vertexai.api.CachedContent.UsageMetadata getUsageMetadata(); - - /** - * - * - *
-   * Output only. Metadata on the usage of the cached content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CachedContent.UsageMetadata usage_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.CachedContent.UsageMetadataOrBuilder getUsageMetadataOrBuilder(); - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the encryptionSpec field is set. - */ - boolean hasEncryptionSpec(); - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The encryptionSpec. - */ - com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec(); - - /** - * - * - *
-   * Input only. Immutable. Customer-managed encryption key spec for a
-   * `CachedContent`. If set, this `CachedContent` and all its sub-resources
-   * will be secured by this key.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 13 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); - - com.google.cloud.vertexai.api.CachedContent.ExpirationCase getExpirationCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentProto.java deleted file mode 100644 index 017e58164480..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CachedContentProto.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/cached_content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class CachedContentProto extends com.google.protobuf.GeneratedFile { - private CachedContentProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CachedContentProto"); - } - - 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_vertexai_v1_CachedContent_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CachedContent_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_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/vertexai/v1/cached_conten" - + "t.proto\022\030google.cloud.vertexai.v1\032\037googl" - + "e/api/field_behavior.proto\032\031google/api/r" - + "esource.proto\032&google/cloud/vertexai/v1/content.proto\032.google/cloud/vertexai/v1/" - + "encryption_spec.proto\032#google/cloud/vert" - + "exai/v1/tool.proto\032\036google/protobuf/dura" - + "tion.proto\032\037google/protobuf/timestamp.proto\"\212\010\n\r" - + "CachedContent\0221\n" - + "\013expire_time\030\t \001(\0132\032.google.protobuf.TimestampH\000\022-\n" - + "\003ttl\030\n" - + " \001(\0132\031.google.protobuf.DurationB\003\340A\004H\000\022\024\n" - + "\004name\030\001 \001(\tB\006\340A\010\340A\005\022\034\n" - + "\014display_name\030\013 \001(\tB\006\340A\001\340A\005\022\022\n" - + "\005model\030\002 \001(\tB\003\340A\005\022H\n" - + "\022system_instruction\030\003 \001(\0132!.google.cloud.vertexai.v1.ContentB" - + "\t\340A\001\340A\005\340A\004\022>\n" - + "\010contents\030\004 \003(\0132!.google.cloud.vertexai.v1.ContentB" - + "\t\340A\001\340A\005\340A\004\0228\n" - + "\005tools\030\005 \003(\0132\036.google.cloud.vertexai.v1.ToolB" - + "\t\340A\001\340A\005\340A\004\022D\n" - + "\013tool_config\030\006 \001(\0132$.google.cloud.vertexai.v1.ToolConfigB" - + "\t\340A\001\340A\005\340A\004\0224\n" - + "\013create_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022R\n" - + "\016usage_metadata\030\014 \001(\01325.google.c" - + "loud.vertexai.v1.CachedContent.UsageMetadataB\003\340A\003\022I\n" - + "\017encryption_spec\030\r" - + " \001(\0132(.goo" - + "gle.cloud.vertexai.v1.EncryptionSpecB\006\340A\004\340A\005\032\223\001\n\r" - + "UsageMetadata\022\031\n" - + "\021total_token_count\030\001 \001(\005\022\022\n\n" - + "text_count\030\002 \001(\005\022\023\n" - + "\013image_count\030\003 \001(\005\022\036\n" - + "\026video_duration_seconds\030\004 \001(\005\022\036\n" - + "\026audio_duration_seconds\030\005 \001(\005:\225\001\352A\221\001\n" - + "\'aiplatform.googleapis.com/CachedContent\022Gprojects/{project}/locations/{locati" - + "on}/cachedContents/{cached_content}*\016cachedContents2\r" - + "cachedContentB\014\n\n" - + "expirationB\317\001\n" - + "\035com.google.cloud.vertexai.apiB\022CachedContentProtoP\001Z>cloud.google.com/go/ai" - + "platform/apiv1/aiplatformpb;aiplatformpb" - + "\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\C" - + "loud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.vertexai.api.ContentProto.getDescriptor(), - com.google.cloud.vertexai.api.EncryptionSpecProto.getDescriptor(), - com.google.cloud.vertexai.api.ToolProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_CachedContent_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_CachedContent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CachedContent_descriptor, - new java.lang.String[] { - "ExpireTime", - "Ttl", - "Name", - "DisplayName", - "Model", - "SystemInstruction", - "Contents", - "Tools", - "ToolConfig", - "CreateTime", - "UpdateTime", - "UsageMetadata", - "EncryptionSpec", - "Expiration", - }); - internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor = - internal_static_google_cloud_vertexai_v1_CachedContent_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CachedContent_UsageMetadata_descriptor, - new java.lang.String[] { - "TotalTokenCount", - "TextCount", - "ImageCount", - "VideoDurationSeconds", - "AudioDurationSeconds", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.ContentProto.getDescriptor(); - com.google.cloud.vertexai.api.EncryptionSpecProto.getDescriptor(); - com.google.cloud.vertexai.api.ToolProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.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); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java deleted file mode 100644 index f2126c350171..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java +++ /dev/null @@ -1,3651 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A response candidate generated from the model.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Candidate} - */ -@com.google.protobuf.Generated -public final class Candidate extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Candidate) - CandidateOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Candidate"); - } - - // Use Candidate.newBuilder() to construct. - private Candidate(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Candidate() { - finishReason_ = 0; - safetyRatings_ = java.util.Collections.emptyList(); - finishMessage_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Candidate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Candidate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Candidate.class, - com.google.cloud.vertexai.api.Candidate.Builder.class); - } - - /** - * - * - *
-   * The reason why the model stopped generating tokens.
-   * If empty, the model has not stopped generating the tokens.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Candidate.FinishReason} - */ - public enum FinishReason implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The finish reason is unspecified.
-     * 
- * - * FINISH_REASON_UNSPECIFIED = 0; - */ - FINISH_REASON_UNSPECIFIED(0), - /** - * - * - *
-     * Token generation reached a natural stopping point or a configured stop
-     * sequence.
-     * 
- * - * STOP = 1; - */ - STOP(1), - /** - * - * - *
-     * Token generation reached the configured maximum output tokens.
-     * 
- * - * MAX_TOKENS = 2; - */ - MAX_TOKENS(2), - /** - * - * - *
-     * Token generation stopped because the content potentially contains safety
-     * violations. NOTE: When streaming,
-     * [content][google.cloud.aiplatform.v1.Candidate.content] is empty if
-     * content filters blocks the output.
-     * 
- * - * SAFETY = 3; - */ - SAFETY(3), - /** - * - * - *
-     * Token generation stopped because the content potentially contains
-     * copyright violations.
-     * 
- * - * RECITATION = 4; - */ - RECITATION(4), - /** - * - * - *
-     * All other reasons that stopped the token generation.
-     * 
- * - * OTHER = 5; - */ - OTHER(5), - /** - * - * - *
-     * Token generation stopped because the content contains forbidden terms.
-     * 
- * - * BLOCKLIST = 6; - */ - BLOCKLIST(6), - /** - * - * - *
-     * Token generation stopped for potentially containing prohibited content.
-     * 
- * - * PROHIBITED_CONTENT = 7; - */ - PROHIBITED_CONTENT(7), - /** - * - * - *
-     * Token generation stopped because the content potentially contains
-     * Sensitive Personally Identifiable Information (SPII).
-     * 
- * - * SPII = 8; - */ - SPII(8), - /** - * - * - *
-     * The function call generated by the model is invalid.
-     * 
- * - * MALFORMED_FUNCTION_CALL = 9; - */ - MALFORMED_FUNCTION_CALL(9), - /** - * - * - *
-     * The model response was blocked by Model Armor.
-     * 
- * - * MODEL_ARMOR = 10; - */ - MODEL_ARMOR(10), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FinishReason"); - } - - /** - * - * - *
-     * The finish reason is unspecified.
-     * 
- * - * FINISH_REASON_UNSPECIFIED = 0; - */ - public static final int FINISH_REASON_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Token generation reached a natural stopping point or a configured stop
-     * sequence.
-     * 
- * - * STOP = 1; - */ - public static final int STOP_VALUE = 1; - - /** - * - * - *
-     * Token generation reached the configured maximum output tokens.
-     * 
- * - * MAX_TOKENS = 2; - */ - public static final int MAX_TOKENS_VALUE = 2; - - /** - * - * - *
-     * Token generation stopped because the content potentially contains safety
-     * violations. NOTE: When streaming,
-     * [content][google.cloud.aiplatform.v1.Candidate.content] is empty if
-     * content filters blocks the output.
-     * 
- * - * SAFETY = 3; - */ - public static final int SAFETY_VALUE = 3; - - /** - * - * - *
-     * Token generation stopped because the content potentially contains
-     * copyright violations.
-     * 
- * - * RECITATION = 4; - */ - public static final int RECITATION_VALUE = 4; - - /** - * - * - *
-     * All other reasons that stopped the token generation.
-     * 
- * - * OTHER = 5; - */ - public static final int OTHER_VALUE = 5; - - /** - * - * - *
-     * Token generation stopped because the content contains forbidden terms.
-     * 
- * - * BLOCKLIST = 6; - */ - public static final int BLOCKLIST_VALUE = 6; - - /** - * - * - *
-     * Token generation stopped for potentially containing prohibited content.
-     * 
- * - * PROHIBITED_CONTENT = 7; - */ - public static final int PROHIBITED_CONTENT_VALUE = 7; - - /** - * - * - *
-     * Token generation stopped because the content potentially contains
-     * Sensitive Personally Identifiable Information (SPII).
-     * 
- * - * SPII = 8; - */ - public static final int SPII_VALUE = 8; - - /** - * - * - *
-     * The function call generated by the model is invalid.
-     * 
- * - * MALFORMED_FUNCTION_CALL = 9; - */ - public static final int MALFORMED_FUNCTION_CALL_VALUE = 9; - - /** - * - * - *
-     * The model response was blocked by Model Armor.
-     * 
- * - * MODEL_ARMOR = 10; - */ - public static final int MODEL_ARMOR_VALUE = 10; - - 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 FinishReason 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 FinishReason forNumber(int value) { - switch (value) { - case 0: - return FINISH_REASON_UNSPECIFIED; - case 1: - return STOP; - case 2: - return MAX_TOKENS; - case 3: - return SAFETY; - case 4: - return RECITATION; - case 5: - return OTHER; - case 6: - return BLOCKLIST; - case 7: - return PROHIBITED_CONTENT; - case 8: - return SPII; - case 9: - return MALFORMED_FUNCTION_CALL; - case 10: - return MODEL_ARMOR; - 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 FinishReason findValueByNumber(int number) { - return FinishReason.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Candidate.getDescriptor().getEnumTypes().get(0); - } - - private static final FinishReason[] VALUES = values(); - - public static FinishReason 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 FinishReason(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Candidate.FinishReason) - } - - private int bitField0_; - public static final int INDEX_FIELD_NUMBER = 1; - private int index_ = 0; - - /** - * - * - *
-   * Output only. Index of the candidate.
-   * 
- * - * int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The index. - */ - @java.lang.Override - public int getIndex() { - return index_; - } - - public static final int CONTENT_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Content content_; - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the content field is set. - */ - @java.lang.Override - public boolean hasContent() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The content. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContent() { - return content_ == null ? com.google.cloud.vertexai.api.Content.getDefaultInstance() : content_; - } - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder() { - return content_ == null ? com.google.cloud.vertexai.api.Content.getDefaultInstance() : content_; - } - - public static final int SCORE_FIELD_NUMBER = 8; - private double score_ = 0D; - - /** - * - * - *
-   * Output only. Confidence score of the candidate.
-   * 
- * - * double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - @java.lang.Override - public double getScore() { - return score_; - } - - public static final int AVG_LOGPROBS_FIELD_NUMBER = 9; - private double avgLogprobs_ = 0D; - - /** - * - * - *
-   * Output only. Average log probability score of the candidate.
-   * 
- * - * double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The avgLogprobs. - */ - @java.lang.Override - public double getAvgLogprobs() { - return avgLogprobs_; - } - - public static final int LOGPROBS_RESULT_FIELD_NUMBER = 10; - private com.google.cloud.vertexai.api.LogprobsResult logprobsResult_; - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the logprobsResult field is set. - */ - @java.lang.Override - public boolean hasLogprobsResult() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The logprobsResult. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult getLogprobsResult() { - return logprobsResult_ == null - ? com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance() - : logprobsResult_; - } - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResultOrBuilder getLogprobsResultOrBuilder() { - return logprobsResult_ == null - ? com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance() - : logprobsResult_; - } - - public static final int FINISH_REASON_FIELD_NUMBER = 3; - private int finishReason_ = 0; - - /** - * - * - *
-   * Output only. The reason why the model stopped generating tokens.
-   * If empty, the model has not stopped generating the tokens.
-   * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for finishReason. - */ - @java.lang.Override - public int getFinishReasonValue() { - return finishReason_; - } - - /** - * - * - *
-   * Output only. The reason why the model stopped generating tokens.
-   * If empty, the model has not stopped generating the tokens.
-   * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The finishReason. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate.FinishReason getFinishReason() { - com.google.cloud.vertexai.api.Candidate.FinishReason result = - com.google.cloud.vertexai.api.Candidate.FinishReason.forNumber(finishReason_); - return result == null - ? com.google.cloud.vertexai.api.Candidate.FinishReason.UNRECOGNIZED - : result; - } - - public static final int SAFETY_RATINGS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List safetyRatings_; - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getSafetyRatingsList() { - return safetyRatings_; - } - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getSafetyRatingsOrBuilderList() { - return safetyRatings_; - } - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getSafetyRatingsCount() { - return safetyRatings_.size(); - } - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index) { - return safetyRatings_.get(index); - } - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index) { - return safetyRatings_.get(index); - } - - public static final int FINISH_MESSAGE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object finishMessage_ = ""; - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the finishMessage field is set. - */ - @java.lang.Override - public boolean hasFinishMessage() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The finishMessage. - */ - @java.lang.Override - public java.lang.String getFinishMessage() { - java.lang.Object ref = finishMessage_; - 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(); - finishMessage_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for finishMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFinishMessageBytes() { - java.lang.Object ref = finishMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - finishMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CITATION_METADATA_FIELD_NUMBER = 6; - private com.google.cloud.vertexai.api.CitationMetadata citationMetadata_; - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the citationMetadata field is set. - */ - @java.lang.Override - public boolean hasCitationMetadata() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The citationMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CitationMetadata getCitationMetadata() { - return citationMetadata_ == null - ? com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance() - : citationMetadata_; - } - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CitationMetadataOrBuilder getCitationMetadataOrBuilder() { - return citationMetadata_ == null - ? com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance() - : citationMetadata_; - } - - public static final int GROUNDING_METADATA_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.GroundingMetadata groundingMetadata_; - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the groundingMetadata field is set. - */ - @java.lang.Override - public boolean hasGroundingMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The groundingMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata getGroundingMetadata() { - return groundingMetadata_ == null - ? com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance() - : groundingMetadata_; - } - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadataOrBuilder getGroundingMetadataOrBuilder() { - return groundingMetadata_ == null - ? com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance() - : groundingMetadata_; - } - - public static final int URL_CONTEXT_METADATA_FIELD_NUMBER = 11; - private com.google.cloud.vertexai.api.UrlContextMetadata urlContextMetadata_; - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the urlContextMetadata field is set. - */ - @java.lang.Override - public boolean hasUrlContextMetadata() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The urlContextMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextMetadata getUrlContextMetadata() { - return urlContextMetadata_ == null - ? com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance() - : urlContextMetadata_; - } - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder - getUrlContextMetadataOrBuilder() { - return urlContextMetadata_ == null - ? com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance() - : urlContextMetadata_; - } - - 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 (index_ != 0) { - output.writeInt32(1, index_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getContent()); - } - if (finishReason_ - != com.google.cloud.vertexai.api.Candidate.FinishReason.FINISH_REASON_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, finishReason_); - } - for (int i = 0; i < safetyRatings_.size(); i++) { - output.writeMessage(4, safetyRatings_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, finishMessage_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(6, getCitationMetadata()); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(7, getGroundingMetadata()); - } - if (java.lang.Double.doubleToRawLongBits(score_) != 0) { - output.writeDouble(8, score_); - } - if (java.lang.Double.doubleToRawLongBits(avgLogprobs_) != 0) { - output.writeDouble(9, avgLogprobs_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(10, getLogprobsResult()); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(11, getUrlContextMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (index_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, index_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); - } - if (finishReason_ - != com.google.cloud.vertexai.api.Candidate.FinishReason.FINISH_REASON_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, finishReason_); - } - for (int i = 0; i < safetyRatings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, safetyRatings_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, finishMessage_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCitationMetadata()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGroundingMetadata()); - } - if (java.lang.Double.doubleToRawLongBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, score_); - } - if (java.lang.Double.doubleToRawLongBits(avgLogprobs_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(9, avgLogprobs_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLogprobsResult()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUrlContextMetadata()); - } - 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.vertexai.api.Candidate)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Candidate other = (com.google.cloud.vertexai.api.Candidate) obj; - - if (getIndex() != other.getIndex()) return false; - if (hasContent() != other.hasContent()) return false; - if (hasContent()) { - if (!getContent().equals(other.getContent())) return false; - } - if (java.lang.Double.doubleToLongBits(getScore()) - != java.lang.Double.doubleToLongBits(other.getScore())) return false; - if (java.lang.Double.doubleToLongBits(getAvgLogprobs()) - != java.lang.Double.doubleToLongBits(other.getAvgLogprobs())) return false; - if (hasLogprobsResult() != other.hasLogprobsResult()) return false; - if (hasLogprobsResult()) { - if (!getLogprobsResult().equals(other.getLogprobsResult())) return false; - } - if (finishReason_ != other.finishReason_) return false; - if (!getSafetyRatingsList().equals(other.getSafetyRatingsList())) return false; - if (hasFinishMessage() != other.hasFinishMessage()) return false; - if (hasFinishMessage()) { - if (!getFinishMessage().equals(other.getFinishMessage())) return false; - } - if (hasCitationMetadata() != other.hasCitationMetadata()) return false; - if (hasCitationMetadata()) { - if (!getCitationMetadata().equals(other.getCitationMetadata())) return false; - } - if (hasGroundingMetadata() != other.hasGroundingMetadata()) return false; - if (hasGroundingMetadata()) { - if (!getGroundingMetadata().equals(other.getGroundingMetadata())) return false; - } - if (hasUrlContextMetadata() != other.hasUrlContextMetadata()) return false; - if (hasUrlContextMetadata()) { - if (!getUrlContextMetadata().equals(other.getUrlContextMetadata())) 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) + INDEX_FIELD_NUMBER; - hash = (53 * hash) + getIndex(); - if (hasContent()) { - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getScore())); - hash = (37 * hash) + AVG_LOGPROBS_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getAvgLogprobs())); - if (hasLogprobsResult()) { - hash = (37 * hash) + LOGPROBS_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getLogprobsResult().hashCode(); - } - hash = (37 * hash) + FINISH_REASON_FIELD_NUMBER; - hash = (53 * hash) + finishReason_; - if (getSafetyRatingsCount() > 0) { - hash = (37 * hash) + SAFETY_RATINGS_FIELD_NUMBER; - hash = (53 * hash) + getSafetyRatingsList().hashCode(); - } - if (hasFinishMessage()) { - hash = (37 * hash) + FINISH_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getFinishMessage().hashCode(); - } - if (hasCitationMetadata()) { - hash = (37 * hash) + CITATION_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getCitationMetadata().hashCode(); - } - if (hasGroundingMetadata()) { - hash = (37 * hash) + GROUNDING_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGroundingMetadata().hashCode(); - } - if (hasUrlContextMetadata()) { - hash = (37 * hash) + URL_CONTEXT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUrlContextMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Candidate 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.vertexai.api.Candidate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Candidate 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.vertexai.api.Candidate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Candidate parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Candidate parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Candidate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Candidate 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A response candidate generated from the model.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Candidate} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Candidate) - com.google.cloud.vertexai.api.CandidateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Candidate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Candidate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Candidate.class, - com.google.cloud.vertexai.api.Candidate.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Candidate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetContentFieldBuilder(); - internalGetLogprobsResultFieldBuilder(); - internalGetSafetyRatingsFieldBuilder(); - internalGetCitationMetadataFieldBuilder(); - internalGetGroundingMetadataFieldBuilder(); - internalGetUrlContextMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - index_ = 0; - content_ = null; - if (contentBuilder_ != null) { - contentBuilder_.dispose(); - contentBuilder_ = null; - } - score_ = 0D; - avgLogprobs_ = 0D; - logprobsResult_ = null; - if (logprobsResultBuilder_ != null) { - logprobsResultBuilder_.dispose(); - logprobsResultBuilder_ = null; - } - finishReason_ = 0; - if (safetyRatingsBuilder_ == null) { - safetyRatings_ = java.util.Collections.emptyList(); - } else { - safetyRatings_ = null; - safetyRatingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - finishMessage_ = ""; - citationMetadata_ = null; - if (citationMetadataBuilder_ != null) { - citationMetadataBuilder_.dispose(); - citationMetadataBuilder_ = null; - } - groundingMetadata_ = null; - if (groundingMetadataBuilder_ != null) { - groundingMetadataBuilder_.dispose(); - groundingMetadataBuilder_ = null; - } - urlContextMetadata_ = null; - if (urlContextMetadataBuilder_ != null) { - urlContextMetadataBuilder_.dispose(); - urlContextMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Candidate_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Candidate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate build() { - com.google.cloud.vertexai.api.Candidate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate buildPartial() { - com.google.cloud.vertexai.api.Candidate result = - new com.google.cloud.vertexai.api.Candidate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Candidate result) { - if (safetyRatingsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - safetyRatings_ = java.util.Collections.unmodifiableList(safetyRatings_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.safetyRatings_ = safetyRatings_; - } else { - result.safetyRatings_ = safetyRatingsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Candidate result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.index_ = index_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.score_ = score_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.avgLogprobs_ = avgLogprobs_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.logprobsResult_ = - logprobsResultBuilder_ == null ? logprobsResult_ : logprobsResultBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.finishReason_ = finishReason_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.finishMessage_ = finishMessage_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.citationMetadata_ = - citationMetadataBuilder_ == null ? citationMetadata_ : citationMetadataBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.groundingMetadata_ = - groundingMetadataBuilder_ == null - ? groundingMetadata_ - : groundingMetadataBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.urlContextMetadata_ = - urlContextMetadataBuilder_ == null - ? urlContextMetadata_ - : urlContextMetadataBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Candidate) { - return mergeFrom((com.google.cloud.vertexai.api.Candidate) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Candidate other) { - if (other == com.google.cloud.vertexai.api.Candidate.getDefaultInstance()) return this; - if (other.getIndex() != 0) { - setIndex(other.getIndex()); - } - if (other.hasContent()) { - mergeContent(other.getContent()); - } - if (java.lang.Double.doubleToRawLongBits(other.getScore()) != 0) { - setScore(other.getScore()); - } - if (java.lang.Double.doubleToRawLongBits(other.getAvgLogprobs()) != 0) { - setAvgLogprobs(other.getAvgLogprobs()); - } - if (other.hasLogprobsResult()) { - mergeLogprobsResult(other.getLogprobsResult()); - } - if (other.finishReason_ != 0) { - setFinishReasonValue(other.getFinishReasonValue()); - } - if (safetyRatingsBuilder_ == null) { - if (!other.safetyRatings_.isEmpty()) { - if (safetyRatings_.isEmpty()) { - safetyRatings_ = other.safetyRatings_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureSafetyRatingsIsMutable(); - safetyRatings_.addAll(other.safetyRatings_); - } - onChanged(); - } - } else { - if (!other.safetyRatings_.isEmpty()) { - if (safetyRatingsBuilder_.isEmpty()) { - safetyRatingsBuilder_.dispose(); - safetyRatingsBuilder_ = null; - safetyRatings_ = other.safetyRatings_; - bitField0_ = (bitField0_ & ~0x00000040); - safetyRatingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSafetyRatingsFieldBuilder() - : null; - } else { - safetyRatingsBuilder_.addAllMessages(other.safetyRatings_); - } - } - } - if (other.hasFinishMessage()) { - finishMessage_ = other.finishMessage_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.hasCitationMetadata()) { - mergeCitationMetadata(other.getCitationMetadata()); - } - if (other.hasGroundingMetadata()) { - mergeGroundingMetadata(other.getGroundingMetadata()); - } - if (other.hasUrlContextMetadata()) { - mergeUrlContextMetadata(other.getUrlContextMetadata()); - } - 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: - { - index_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage(internalGetContentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - finishReason_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 24 - case 34: - { - com.google.cloud.vertexai.api.SafetyRating m = - input.readMessage( - com.google.cloud.vertexai.api.SafetyRating.parser(), extensionRegistry); - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(m); - } else { - safetyRatingsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - finishMessage_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetCitationMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetGroundingMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 58 - case 65: - { - score_ = input.readDouble(); - bitField0_ |= 0x00000004; - break; - } // case 65 - case 73: - { - avgLogprobs_ = input.readDouble(); - bitField0_ |= 0x00000008; - break; - } // case 73 - case 82: - { - input.readMessage( - internalGetLogprobsResultFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 82 - case 90: - { - input.readMessage( - internalGetUrlContextMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 90 - 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 index_; - - /** - * - * - *
-     * Output only. Index of the candidate.
-     * 
- * - * int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The index. - */ - @java.lang.Override - public int getIndex() { - return index_; - } - - /** - * - * - *
-     * Output only. Index of the candidate.
-     * 
- * - * int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The index to set. - * @return This builder for chaining. - */ - public Builder setIndex(int value) { - - index_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Index of the candidate.
-     * 
- * - * int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - index_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.Content content_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentBuilder_; - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the content field is set. - */ - public boolean hasContent() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The content. - */ - public com.google.cloud.vertexai.api.Content getContent() { - if (contentBuilder_ == null) { - return content_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : content_; - } else { - return contentBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setContent(com.google.cloud.vertexai.api.Content value) { - if (contentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - } else { - contentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setContent(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentBuilder_ == null) { - content_ = builderForValue.build(); - } else { - contentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeContent(com.google.cloud.vertexai.api.Content value) { - if (contentBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && content_ != null - && content_ != com.google.cloud.vertexai.api.Content.getDefaultInstance()) { - getContentBuilder().mergeFrom(value); - } else { - content_ = value; - } - } else { - contentBuilder_.mergeFrom(value); - } - if (content_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearContent() { - bitField0_ = (bitField0_ & ~0x00000002); - content_ = null; - if (contentBuilder_ != null) { - contentBuilder_.dispose(); - contentBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getContentBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetContentFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder() { - if (contentBuilder_ != null) { - return contentBuilder_.getMessageOrBuilder(); - } else { - return content_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : content_; - } - } - - /** - * - * - *
-     * Output only. Content parts of the candidate.
-     * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentFieldBuilder() { - if (contentBuilder_ == null) { - contentBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - getContent(), getParentForChildren(), isClean()); - content_ = null; - } - return contentBuilder_; - } - - private double score_; - - /** - * - * - *
-     * Output only. Confidence score of the candidate.
-     * 
- * - * double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - @java.lang.Override - public double getScore() { - return score_; - } - - /** - * - * - *
-     * Output only. Confidence score of the candidate.
-     * 
- * - * double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(double value) { - - score_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Confidence score of the candidate.
-     * 
- * - * double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - bitField0_ = (bitField0_ & ~0x00000004); - score_ = 0D; - onChanged(); - return this; - } - - private double avgLogprobs_; - - /** - * - * - *
-     * Output only. Average log probability score of the candidate.
-     * 
- * - * double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The avgLogprobs. - */ - @java.lang.Override - public double getAvgLogprobs() { - return avgLogprobs_; - } - - /** - * - * - *
-     * Output only. Average log probability score of the candidate.
-     * 
- * - * double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The avgLogprobs to set. - * @return This builder for chaining. - */ - public Builder setAvgLogprobs(double value) { - - avgLogprobs_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Average log probability score of the candidate.
-     * 
- * - * double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearAvgLogprobs() { - bitField0_ = (bitField0_ & ~0x00000008); - avgLogprobs_ = 0D; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.LogprobsResult logprobsResult_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult, - com.google.cloud.vertexai.api.LogprobsResult.Builder, - com.google.cloud.vertexai.api.LogprobsResultOrBuilder> - logprobsResultBuilder_; - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the logprobsResult field is set. - */ - public boolean hasLogprobsResult() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The logprobsResult. - */ - public com.google.cloud.vertexai.api.LogprobsResult getLogprobsResult() { - if (logprobsResultBuilder_ == null) { - return logprobsResult_ == null - ? com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance() - : logprobsResult_; - } else { - return logprobsResultBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setLogprobsResult(com.google.cloud.vertexai.api.LogprobsResult value) { - if (logprobsResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - logprobsResult_ = value; - } else { - logprobsResultBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setLogprobsResult( - com.google.cloud.vertexai.api.LogprobsResult.Builder builderForValue) { - if (logprobsResultBuilder_ == null) { - logprobsResult_ = builderForValue.build(); - } else { - logprobsResultBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeLogprobsResult(com.google.cloud.vertexai.api.LogprobsResult value) { - if (logprobsResultBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && logprobsResult_ != null - && logprobsResult_ - != com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance()) { - getLogprobsResultBuilder().mergeFrom(value); - } else { - logprobsResult_ = value; - } - } else { - logprobsResultBuilder_.mergeFrom(value); - } - if (logprobsResult_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearLogprobsResult() { - bitField0_ = (bitField0_ & ~0x00000010); - logprobsResult_ = null; - if (logprobsResultBuilder_ != null) { - logprobsResultBuilder_.dispose(); - logprobsResultBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.Builder getLogprobsResultBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetLogprobsResultFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.LogprobsResultOrBuilder getLogprobsResultOrBuilder() { - if (logprobsResultBuilder_ != null) { - return logprobsResultBuilder_.getMessageOrBuilder(); - } else { - return logprobsResult_ == null - ? com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance() - : logprobsResult_; - } - } - - /** - * - * - *
-     * Output only. Log-likelihood scores for the response tokens and top tokens
-     * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult, - com.google.cloud.vertexai.api.LogprobsResult.Builder, - com.google.cloud.vertexai.api.LogprobsResultOrBuilder> - internalGetLogprobsResultFieldBuilder() { - if (logprobsResultBuilder_ == null) { - logprobsResultBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult, - com.google.cloud.vertexai.api.LogprobsResult.Builder, - com.google.cloud.vertexai.api.LogprobsResultOrBuilder>( - getLogprobsResult(), getParentForChildren(), isClean()); - logprobsResult_ = null; - } - return logprobsResultBuilder_; - } - - private int finishReason_ = 0; - - /** - * - * - *
-     * Output only. The reason why the model stopped generating tokens.
-     * If empty, the model has not stopped generating the tokens.
-     * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for finishReason. - */ - @java.lang.Override - public int getFinishReasonValue() { - return finishReason_; - } - - /** - * - * - *
-     * Output only. The reason why the model stopped generating tokens.
-     * If empty, the model has not stopped generating the tokens.
-     * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for finishReason to set. - * @return This builder for chaining. - */ - public Builder setFinishReasonValue(int value) { - finishReason_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The reason why the model stopped generating tokens.
-     * If empty, the model has not stopped generating the tokens.
-     * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The finishReason. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate.FinishReason getFinishReason() { - com.google.cloud.vertexai.api.Candidate.FinishReason result = - com.google.cloud.vertexai.api.Candidate.FinishReason.forNumber(finishReason_); - return result == null - ? com.google.cloud.vertexai.api.Candidate.FinishReason.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. The reason why the model stopped generating tokens.
-     * If empty, the model has not stopped generating the tokens.
-     * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The finishReason to set. - * @return This builder for chaining. - */ - public Builder setFinishReason(com.google.cloud.vertexai.api.Candidate.FinishReason value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - finishReason_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The reason why the model stopped generating tokens.
-     * If empty, the model has not stopped generating the tokens.
-     * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearFinishReason() { - bitField0_ = (bitField0_ & ~0x00000020); - finishReason_ = 0; - onChanged(); - return this; - } - - private java.util.List safetyRatings_ = - java.util.Collections.emptyList(); - - private void ensureSafetyRatingsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - safetyRatings_ = - new java.util.ArrayList(safetyRatings_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder> - safetyRatingsBuilder_; - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getSafetyRatingsList() { - if (safetyRatingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(safetyRatings_); - } else { - return safetyRatingsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getSafetyRatingsCount() { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.size(); - } else { - return safetyRatingsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index) { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.get(index); - } else { - return safetyRatingsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setSafetyRatings(int index, com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.set(index, value); - onChanged(); - } else { - safetyRatingsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setSafetyRatings( - int index, com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.set(index, builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings(com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(value); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings(int index, com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(index, value); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings( - com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings( - int index, com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(index, builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllSafetyRatings( - java.lang.Iterable values) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, safetyRatings_); - onChanged(); - } else { - safetyRatingsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearSafetyRatings() { - if (safetyRatingsBuilder_ == null) { - safetyRatings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - safetyRatingsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeSafetyRatings(int index) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.remove(index); - onChanged(); - } else { - safetyRatingsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder getSafetyRatingsBuilder(int index) { - return internalGetSafetyRatingsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( - int index) { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.get(index); - } else { - return safetyRatingsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getSafetyRatingsOrBuilderList() { - if (safetyRatingsBuilder_ != null) { - return safetyRatingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(safetyRatings_); - } - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder addSafetyRatingsBuilder() { - return internalGetSafetyRatingsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder addSafetyRatingsBuilder(int index) { - return internalGetSafetyRatingsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of ratings for the safety of a response candidate.
-     *
-     * There is at most one rating per category.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getSafetyRatingsBuilderList() { - return internalGetSafetyRatingsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder> - internalGetSafetyRatingsFieldBuilder() { - if (safetyRatingsBuilder_ == null) { - safetyRatingsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder>( - safetyRatings_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - safetyRatings_ = null; - } - return safetyRatingsBuilder_; - } - - private java.lang.Object finishMessage_ = ""; - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the finishMessage field is set. - */ - public boolean hasFinishMessage() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The finishMessage. - */ - public java.lang.String getFinishMessage() { - java.lang.Object ref = finishMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - finishMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for finishMessage. - */ - public com.google.protobuf.ByteString getFinishMessageBytes() { - java.lang.Object ref = finishMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - finishMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The finishMessage to set. - * @return This builder for chaining. - */ - public Builder setFinishMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - finishMessage_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearFinishMessage() { - finishMessage_ = getDefaultInstance().getFinishMessage(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Describes the reason the mode stopped generating tokens in
-     * more detail. This is only filled when `finish_reason` is set.
-     * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for finishMessage to set. - * @return This builder for chaining. - */ - public Builder setFinishMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - finishMessage_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.CitationMetadata citationMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CitationMetadata, - com.google.cloud.vertexai.api.CitationMetadata.Builder, - com.google.cloud.vertexai.api.CitationMetadataOrBuilder> - citationMetadataBuilder_; - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the citationMetadata field is set. - */ - public boolean hasCitationMetadata() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The citationMetadata. - */ - public com.google.cloud.vertexai.api.CitationMetadata getCitationMetadata() { - if (citationMetadataBuilder_ == null) { - return citationMetadata_ == null - ? com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance() - : citationMetadata_; - } else { - return citationMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCitationMetadata(com.google.cloud.vertexai.api.CitationMetadata value) { - if (citationMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - citationMetadata_ = value; - } else { - citationMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCitationMetadata( - com.google.cloud.vertexai.api.CitationMetadata.Builder builderForValue) { - if (citationMetadataBuilder_ == null) { - citationMetadata_ = builderForValue.build(); - } else { - citationMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCitationMetadata(com.google.cloud.vertexai.api.CitationMetadata value) { - if (citationMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && citationMetadata_ != null - && citationMetadata_ - != com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance()) { - getCitationMetadataBuilder().mergeFrom(value); - } else { - citationMetadata_ = value; - } - } else { - citationMetadataBuilder_.mergeFrom(value); - } - if (citationMetadata_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCitationMetadata() { - bitField0_ = (bitField0_ & ~0x00000100); - citationMetadata_ = null; - if (citationMetadataBuilder_ != null) { - citationMetadataBuilder_.dispose(); - citationMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CitationMetadata.Builder getCitationMetadataBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetCitationMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CitationMetadataOrBuilder getCitationMetadataOrBuilder() { - if (citationMetadataBuilder_ != null) { - return citationMetadataBuilder_.getMessageOrBuilder(); - } else { - return citationMetadata_ == null - ? com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance() - : citationMetadata_; - } - } - - /** - * - * - *
-     * Output only. Source attribution of the generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CitationMetadata, - com.google.cloud.vertexai.api.CitationMetadata.Builder, - com.google.cloud.vertexai.api.CitationMetadataOrBuilder> - internalGetCitationMetadataFieldBuilder() { - if (citationMetadataBuilder_ == null) { - citationMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CitationMetadata, - com.google.cloud.vertexai.api.CitationMetadata.Builder, - com.google.cloud.vertexai.api.CitationMetadataOrBuilder>( - getCitationMetadata(), getParentForChildren(), isClean()); - citationMetadata_ = null; - } - return citationMetadataBuilder_; - } - - private com.google.cloud.vertexai.api.GroundingMetadata groundingMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata, - com.google.cloud.vertexai.api.GroundingMetadata.Builder, - com.google.cloud.vertexai.api.GroundingMetadataOrBuilder> - groundingMetadataBuilder_; - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the groundingMetadata field is set. - */ - public boolean hasGroundingMetadata() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The groundingMetadata. - */ - public com.google.cloud.vertexai.api.GroundingMetadata getGroundingMetadata() { - if (groundingMetadataBuilder_ == null) { - return groundingMetadata_ == null - ? com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance() - : groundingMetadata_; - } else { - return groundingMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGroundingMetadata(com.google.cloud.vertexai.api.GroundingMetadata value) { - if (groundingMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - groundingMetadata_ = value; - } else { - groundingMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGroundingMetadata( - com.google.cloud.vertexai.api.GroundingMetadata.Builder builderForValue) { - if (groundingMetadataBuilder_ == null) { - groundingMetadata_ = builderForValue.build(); - } else { - groundingMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeGroundingMetadata(com.google.cloud.vertexai.api.GroundingMetadata value) { - if (groundingMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && groundingMetadata_ != null - && groundingMetadata_ - != com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance()) { - getGroundingMetadataBuilder().mergeFrom(value); - } else { - groundingMetadata_ = value; - } - } else { - groundingMetadataBuilder_.mergeFrom(value); - } - if (groundingMetadata_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearGroundingMetadata() { - bitField0_ = (bitField0_ & ~0x00000200); - groundingMetadata_ = null; - if (groundingMetadataBuilder_ != null) { - groundingMetadataBuilder_.dispose(); - groundingMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.Builder getGroundingMetadataBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetGroundingMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadataOrBuilder - getGroundingMetadataOrBuilder() { - if (groundingMetadataBuilder_ != null) { - return groundingMetadataBuilder_.getMessageOrBuilder(); - } else { - return groundingMetadata_ == null - ? com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance() - : groundingMetadata_; - } - } - - /** - * - * - *
-     * Output only. Metadata specifies sources used to ground generated content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata, - com.google.cloud.vertexai.api.GroundingMetadata.Builder, - com.google.cloud.vertexai.api.GroundingMetadataOrBuilder> - internalGetGroundingMetadataFieldBuilder() { - if (groundingMetadataBuilder_ == null) { - groundingMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata, - com.google.cloud.vertexai.api.GroundingMetadata.Builder, - com.google.cloud.vertexai.api.GroundingMetadataOrBuilder>( - getGroundingMetadata(), getParentForChildren(), isClean()); - groundingMetadata_ = null; - } - return groundingMetadataBuilder_; - } - - private com.google.cloud.vertexai.api.UrlContextMetadata urlContextMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContextMetadata, - com.google.cloud.vertexai.api.UrlContextMetadata.Builder, - com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder> - urlContextMetadataBuilder_; - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the urlContextMetadata field is set. - */ - public boolean hasUrlContextMetadata() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The urlContextMetadata. - */ - public com.google.cloud.vertexai.api.UrlContextMetadata getUrlContextMetadata() { - if (urlContextMetadataBuilder_ == null) { - return urlContextMetadata_ == null - ? com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance() - : urlContextMetadata_; - } else { - return urlContextMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUrlContextMetadata(com.google.cloud.vertexai.api.UrlContextMetadata value) { - if (urlContextMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - urlContextMetadata_ = value; - } else { - urlContextMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUrlContextMetadata( - com.google.cloud.vertexai.api.UrlContextMetadata.Builder builderForValue) { - if (urlContextMetadataBuilder_ == null) { - urlContextMetadata_ = builderForValue.build(); - } else { - urlContextMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUrlContextMetadata(com.google.cloud.vertexai.api.UrlContextMetadata value) { - if (urlContextMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && urlContextMetadata_ != null - && urlContextMetadata_ - != com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance()) { - getUrlContextMetadataBuilder().mergeFrom(value); - } else { - urlContextMetadata_ = value; - } - } else { - urlContextMetadataBuilder_.mergeFrom(value); - } - if (urlContextMetadata_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUrlContextMetadata() { - bitField0_ = (bitField0_ & ~0x00000400); - urlContextMetadata_ = null; - if (urlContextMetadataBuilder_ != null) { - urlContextMetadataBuilder_.dispose(); - urlContextMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlContextMetadata.Builder getUrlContextMetadataBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetUrlContextMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder - getUrlContextMetadataOrBuilder() { - if (urlContextMetadataBuilder_ != null) { - return urlContextMetadataBuilder_.getMessageOrBuilder(); - } else { - return urlContextMetadata_ == null - ? com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance() - : urlContextMetadata_; - } - } - - /** - * - * - *
-     * Output only. Metadata related to url context retrieval tool.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContextMetadata, - com.google.cloud.vertexai.api.UrlContextMetadata.Builder, - com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder> - internalGetUrlContextMetadataFieldBuilder() { - if (urlContextMetadataBuilder_ == null) { - urlContextMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContextMetadata, - com.google.cloud.vertexai.api.UrlContextMetadata.Builder, - com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder>( - getUrlContextMetadata(), getParentForChildren(), isClean()); - urlContextMetadata_ = null; - } - return urlContextMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Candidate) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Candidate) - private static final com.google.cloud.vertexai.api.Candidate DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Candidate(); - } - - public static com.google.cloud.vertexai.api.Candidate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Candidate 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.vertexai.api.Candidate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java deleted file mode 100644 index 0a46d9dfd34a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CandidateOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Candidate) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Index of the candidate.
-   * 
- * - * int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The index. - */ - int getIndex(); - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the content field is set. - */ - boolean hasContent(); - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The content. - */ - com.google.cloud.vertexai.api.Content getContent(); - - /** - * - * - *
-   * Output only. Content parts of the candidate.
-   * 
- * - * - * .google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder(); - - /** - * - * - *
-   * Output only. Confidence score of the candidate.
-   * 
- * - * double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The score. - */ - double getScore(); - - /** - * - * - *
-   * Output only. Average log probability score of the candidate.
-   * 
- * - * double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The avgLogprobs. - */ - double getAvgLogprobs(); - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the logprobsResult field is set. - */ - boolean hasLogprobsResult(); - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The logprobsResult. - */ - com.google.cloud.vertexai.api.LogprobsResult getLogprobsResult(); - - /** - * - * - *
-   * Output only. Log-likelihood scores for the response tokens and top tokens
-   * 
- * - * - * .google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.LogprobsResultOrBuilder getLogprobsResultOrBuilder(); - - /** - * - * - *
-   * Output only. The reason why the model stopped generating tokens.
-   * If empty, the model has not stopped generating the tokens.
-   * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for finishReason. - */ - int getFinishReasonValue(); - - /** - * - * - *
-   * Output only. The reason why the model stopped generating tokens.
-   * If empty, the model has not stopped generating the tokens.
-   * 
- * - * - * .google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The finishReason. - */ - com.google.cloud.vertexai.api.Candidate.FinishReason getFinishReason(); - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getSafetyRatingsList(); - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index); - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getSafetyRatingsCount(); - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getSafetyRatingsOrBuilderList(); - - /** - * - * - *
-   * Output only. List of ratings for the safety of a response candidate.
-   *
-   * There is at most one rating per category.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index); - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the finishMessage field is set. - */ - boolean hasFinishMessage(); - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The finishMessage. - */ - java.lang.String getFinishMessage(); - - /** - * - * - *
-   * Output only. Describes the reason the mode stopped generating tokens in
-   * more detail. This is only filled when `finish_reason` is set.
-   * 
- * - * optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for finishMessage. - */ - com.google.protobuf.ByteString getFinishMessageBytes(); - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the citationMetadata field is set. - */ - boolean hasCitationMetadata(); - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The citationMetadata. - */ - com.google.cloud.vertexai.api.CitationMetadata getCitationMetadata(); - - /** - * - * - *
-   * Output only. Source attribution of the generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.CitationMetadataOrBuilder getCitationMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the groundingMetadata field is set. - */ - boolean hasGroundingMetadata(); - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The groundingMetadata. - */ - com.google.cloud.vertexai.api.GroundingMetadata getGroundingMetadata(); - - /** - * - * - *
-   * Output only. Metadata specifies sources used to ground generated content.
-   * 
- * - * - * .google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.GroundingMetadataOrBuilder getGroundingMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the urlContextMetadata field is set. - */ - boolean hasUrlContextMetadata(); - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The urlContextMetadata. - */ - com.google.cloud.vertexai.api.UrlContextMetadata getUrlContextMetadata(); - - /** - * - * - *
-   * Output only. Metadata related to url context retrieval tool.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder getUrlContextMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java deleted file mode 100644 index 3e3c1959b7da..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java +++ /dev/null @@ -1,1461 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Source attributions for content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Citation} - */ -@com.google.protobuf.Generated -public final class Citation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Citation) - CitationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Citation"); - } - - // Use Citation.newBuilder() to construct. - private Citation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Citation() { - uri_ = ""; - title_ = ""; - license_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Citation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Citation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Citation.class, - com.google.cloud.vertexai.api.Citation.Builder.class); - } - - private int bitField0_; - public static final int START_INDEX_FIELD_NUMBER = 1; - private int startIndex_ = 0; - - /** - * - * - *
-   * Output only. Start index into the content.
-   * 
- * - * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - @java.lang.Override - public int getStartIndex() { - return startIndex_; - } - - public static final int END_INDEX_FIELD_NUMBER = 2; - private int endIndex_ = 0; - - /** - * - * - *
-   * Output only. End index into the content.
-   * 
- * - * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - @java.lang.Override - public int getEndIndex() { - return endIndex_; - } - - public static final int URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - - /** - * - * - *
-   * Output only. Url reference of the attribution.
-   * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-   * Output only. Url reference of the attribution.
-   * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 TITLE_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-   * Output only. Title of the attribution.
-   * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Title of the attribution.
-   * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LICENSE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object license_ = ""; - - /** - * - * - *
-   * Output only. License of the attribution.
-   * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The license. - */ - @java.lang.Override - public java.lang.String getLicense() { - java.lang.Object ref = license_; - 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(); - license_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. License of the attribution.
-   * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for license. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLicenseBytes() { - java.lang.Object ref = license_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - license_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLICATION_DATE_FIELD_NUMBER = 6; - private com.google.type.Date publicationDate_; - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the publicationDate field is set. - */ - @java.lang.Override - public boolean hasPublicationDate() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The publicationDate. - */ - @java.lang.Override - public com.google.type.Date getPublicationDate() { - return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_; - } - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.type.DateOrBuilder getPublicationDateOrBuilder() { - return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_; - } - - 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 (startIndex_ != 0) { - output.writeInt32(1, startIndex_); - } - if (endIndex_ != 0) { - output.writeInt32(2, endIndex_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, title_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(license_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, license_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getPublicationDate()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startIndex_); - } - if (endIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endIndex_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, title_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(license_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, license_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPublicationDate()); - } - 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.vertexai.api.Citation)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Citation other = (com.google.cloud.vertexai.api.Citation) obj; - - if (getStartIndex() != other.getStartIndex()) return false; - if (getEndIndex() != other.getEndIndex()) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getLicense().equals(other.getLicense())) return false; - if (hasPublicationDate() != other.hasPublicationDate()) return false; - if (hasPublicationDate()) { - if (!getPublicationDate().equals(other.getPublicationDate())) 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) + START_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getStartIndex(); - hash = (37 * hash) + END_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getEndIndex(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + LICENSE_FIELD_NUMBER; - hash = (53 * hash) + getLicense().hashCode(); - if (hasPublicationDate()) { - hash = (37 * hash) + PUBLICATION_DATE_FIELD_NUMBER; - hash = (53 * hash) + getPublicationDate().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Citation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Citation 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.vertexai.api.Citation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Citation 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.vertexai.api.Citation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Citation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Citation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Citation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Citation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Citation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Citation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Citation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Citation 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Source attributions for content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Citation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Citation) - com.google.cloud.vertexai.api.CitationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Citation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Citation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Citation.class, - com.google.cloud.vertexai.api.Citation.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Citation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPublicationDateFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startIndex_ = 0; - endIndex_ = 0; - uri_ = ""; - title_ = ""; - license_ = ""; - publicationDate_ = null; - if (publicationDateBuilder_ != null) { - publicationDateBuilder_.dispose(); - publicationDateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Citation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Citation getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Citation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Citation build() { - com.google.cloud.vertexai.api.Citation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Citation buildPartial() { - com.google.cloud.vertexai.api.Citation result = - new com.google.cloud.vertexai.api.Citation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Citation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startIndex_ = startIndex_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endIndex_ = endIndex_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.license_ = license_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.publicationDate_ = - publicationDateBuilder_ == null ? publicationDate_ : publicationDateBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Citation) { - return mergeFrom((com.google.cloud.vertexai.api.Citation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Citation other) { - if (other == com.google.cloud.vertexai.api.Citation.getDefaultInstance()) return this; - if (other.getStartIndex() != 0) { - setStartIndex(other.getStartIndex()); - } - if (other.getEndIndex() != 0) { - setEndIndex(other.getEndIndex()); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getLicense().isEmpty()) { - license_ = other.license_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasPublicationDate()) { - mergePublicationDate(other.getPublicationDate()); - } - 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: - { - startIndex_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - endIndex_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - license_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetPublicationDateFieldBuilder().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 int startIndex_; - - /** - * - * - *
-     * Output only. Start index into the content.
-     * 
- * - * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - @java.lang.Override - public int getStartIndex() { - return startIndex_; - } - - /** - * - * - *
-     * Output only. Start index into the content.
-     * 
- * - * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The startIndex to set. - * @return This builder for chaining. - */ - public Builder setStartIndex(int value) { - - startIndex_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Start index into the content.
-     * 
- * - * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStartIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - startIndex_ = 0; - onChanged(); - return this; - } - - private int endIndex_; - - /** - * - * - *
-     * Output only. End index into the content.
-     * 
- * - * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - @java.lang.Override - public int getEndIndex() { - return endIndex_; - } - - /** - * - * - *
-     * Output only. End index into the content.
-     * 
- * - * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endIndex to set. - * @return This builder for chaining. - */ - public Builder setEndIndex(int value) { - - endIndex_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. End index into the content.
-     * 
- * - * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndIndex() { - bitField0_ = (bitField0_ & ~0x00000002); - endIndex_ = 0; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - - /** - * - * - *
-     * Output only. Url reference of the attribution.
-     * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-     * Output only. Url reference of the attribution.
-     * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-     * Output only. Url reference of the attribution.
-     * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - - /** - * - * - *
-     * Output only. Url reference of the attribution.
-     * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Url reference of the attribution.
-     * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 title_ = ""; - - /** - * - * - *
-     * Output only. Title of the attribution.
-     * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Title of the attribution.
-     * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Title of the attribution.
-     * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Title of the attribution.
-     * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Title of the attribution.
-     * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object license_ = ""; - - /** - * - * - *
-     * Output only. License of the attribution.
-     * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The license. - */ - public java.lang.String getLicense() { - java.lang.Object ref = license_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - license_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. License of the attribution.
-     * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for license. - */ - public com.google.protobuf.ByteString getLicenseBytes() { - java.lang.Object ref = license_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - license_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. License of the attribution.
-     * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The license to set. - * @return This builder for chaining. - */ - public Builder setLicense(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - license_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. License of the attribution.
-     * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearLicense() { - license_ = getDefaultInstance().getLicense(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. License of the attribution.
-     * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for license to set. - * @return This builder for chaining. - */ - public Builder setLicenseBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - license_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.type.Date publicationDate_; - private com.google.protobuf.SingleFieldBuilder< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - publicationDateBuilder_; - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the publicationDate field is set. - */ - public boolean hasPublicationDate() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The publicationDate. - */ - public com.google.type.Date getPublicationDate() { - if (publicationDateBuilder_ == null) { - return publicationDate_ == null - ? com.google.type.Date.getDefaultInstance() - : publicationDate_; - } else { - return publicationDateBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPublicationDate(com.google.type.Date value) { - if (publicationDateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicationDate_ = value; - } else { - publicationDateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPublicationDate(com.google.type.Date.Builder builderForValue) { - if (publicationDateBuilder_ == null) { - publicationDate_ = builderForValue.build(); - } else { - publicationDateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergePublicationDate(com.google.type.Date value) { - if (publicationDateBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && publicationDate_ != null - && publicationDate_ != com.google.type.Date.getDefaultInstance()) { - getPublicationDateBuilder().mergeFrom(value); - } else { - publicationDate_ = value; - } - } else { - publicationDateBuilder_.mergeFrom(value); - } - if (publicationDate_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPublicationDate() { - bitField0_ = (bitField0_ & ~0x00000020); - publicationDate_ = null; - if (publicationDateBuilder_ != null) { - publicationDateBuilder_.dispose(); - publicationDateBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.type.Date.Builder getPublicationDateBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetPublicationDateFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.type.DateOrBuilder getPublicationDateOrBuilder() { - if (publicationDateBuilder_ != null) { - return publicationDateBuilder_.getMessageOrBuilder(); - } else { - return publicationDate_ == null - ? com.google.type.Date.getDefaultInstance() - : publicationDate_; - } - } - - /** - * - * - *
-     * Output only. Publication date of the attribution.
-     * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - internalGetPublicationDateFieldBuilder() { - if (publicationDateBuilder_ == null) { - publicationDateBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - getPublicationDate(), getParentForChildren(), isClean()); - publicationDate_ = null; - } - return publicationDateBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Citation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Citation) - private static final com.google.cloud.vertexai.api.Citation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Citation(); - } - - public static com.google.cloud.vertexai.api.Citation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Citation 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.vertexai.api.Citation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java deleted file mode 100644 index 053e30ee4f45..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java +++ /dev/null @@ -1,966 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A collection of source attributions for a piece of content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CitationMetadata} - */ -@com.google.protobuf.Generated -public final class CitationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CitationMetadata) - CitationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CitationMetadata"); - } - - // Use CitationMetadata.newBuilder() to construct. - private CitationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CitationMetadata() { - citations_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_CitationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_CitationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CitationMetadata.class, - com.google.cloud.vertexai.api.CitationMetadata.Builder.class); - } - - public static final int CITATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List citations_; - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getCitationsList() { - return citations_; - } - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCitationsOrBuilderList() { - return citations_; - } - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCitationsCount() { - return citations_.size(); - } - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Citation getCitations(int index) { - return citations_.get(index); - } - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CitationOrBuilder getCitationsOrBuilder(int index) { - return citations_.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 < citations_.size(); i++) { - output.writeMessage(1, citations_.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 < citations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, citations_.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.vertexai.api.CitationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CitationMetadata other = - (com.google.cloud.vertexai.api.CitationMetadata) obj; - - if (!getCitationsList().equals(other.getCitationsList())) 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 (getCitationsCount() > 0) { - hash = (37 * hash) + CITATIONS_FIELD_NUMBER; - hash = (53 * hash) + getCitationsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CitationMetadata 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.vertexai.api.CitationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CitationMetadata 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.vertexai.api.CitationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CitationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CitationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A collection of source attributions for a piece of content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CitationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CitationMetadata) - com.google.cloud.vertexai.api.CitationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_CitationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_CitationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CitationMetadata.class, - com.google.cloud.vertexai.api.CitationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CitationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (citationsBuilder_ == null) { - citations_ = java.util.Collections.emptyList(); - } else { - citations_ = null; - citationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_CitationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CitationMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CitationMetadata build() { - com.google.cloud.vertexai.api.CitationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CitationMetadata buildPartial() { - com.google.cloud.vertexai.api.CitationMetadata result = - new com.google.cloud.vertexai.api.CitationMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.CitationMetadata result) { - if (citationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - citations_ = java.util.Collections.unmodifiableList(citations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.citations_ = citations_; - } else { - result.citations_ = citationsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.CitationMetadata result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CitationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.CitationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CitationMetadata other) { - if (other == com.google.cloud.vertexai.api.CitationMetadata.getDefaultInstance()) return this; - if (citationsBuilder_ == null) { - if (!other.citations_.isEmpty()) { - if (citations_.isEmpty()) { - citations_ = other.citations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCitationsIsMutable(); - citations_.addAll(other.citations_); - } - onChanged(); - } - } else { - if (!other.citations_.isEmpty()) { - if (citationsBuilder_.isEmpty()) { - citationsBuilder_.dispose(); - citationsBuilder_ = null; - citations_ = other.citations_; - bitField0_ = (bitField0_ & ~0x00000001); - citationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCitationsFieldBuilder() - : null; - } else { - citationsBuilder_.addAllMessages(other.citations_); - } - } - } - 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.vertexai.api.Citation m = - input.readMessage( - com.google.cloud.vertexai.api.Citation.parser(), extensionRegistry); - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(m); - } else { - citationsBuilder_.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 citations_ = - java.util.Collections.emptyList(); - - private void ensureCitationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - citations_ = new java.util.ArrayList(citations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Citation, - com.google.cloud.vertexai.api.Citation.Builder, - com.google.cloud.vertexai.api.CitationOrBuilder> - citationsBuilder_; - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getCitationsList() { - if (citationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(citations_); - } else { - return citationsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCitationsCount() { - if (citationsBuilder_ == null) { - return citations_.size(); - } else { - return citationsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Citation getCitations(int index) { - if (citationsBuilder_ == null) { - return citations_.get(index); - } else { - return citationsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCitations(int index, com.google.cloud.vertexai.api.Citation value) { - if (citationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitationsIsMutable(); - citations_.set(index, value); - onChanged(); - } else { - citationsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCitations( - int index, com.google.cloud.vertexai.api.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.set(index, builderForValue.build()); - onChanged(); - } else { - citationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCitations(com.google.cloud.vertexai.api.Citation value) { - if (citationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitationsIsMutable(); - citations_.add(value); - onChanged(); - } else { - citationsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCitations(int index, com.google.cloud.vertexai.api.Citation value) { - if (citationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitationsIsMutable(); - citations_.add(index, value); - onChanged(); - } else { - citationsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCitations(com.google.cloud.vertexai.api.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(builderForValue.build()); - onChanged(); - } else { - citationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCitations( - int index, com.google.cloud.vertexai.api.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(index, builderForValue.build()); - onChanged(); - } else { - citationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCitations( - java.lang.Iterable values) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, citations_); - onChanged(); - } else { - citationsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCitations() { - if (citationsBuilder_ == null) { - citations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - citationsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCitations(int index) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.remove(index); - onChanged(); - } else { - citationsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Citation.Builder getCitationsBuilder(int index) { - return internalGetCitationsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CitationOrBuilder getCitationsOrBuilder(int index) { - if (citationsBuilder_ == null) { - return citations_.get(index); - } else { - return citationsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCitationsOrBuilderList() { - if (citationsBuilder_ != null) { - return citationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(citations_); - } - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Citation.Builder addCitationsBuilder() { - return internalGetCitationsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Citation.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Citation.Builder addCitationsBuilder(int index) { - return internalGetCitationsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Citation.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of citations.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCitationsBuilderList() { - return internalGetCitationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Citation, - com.google.cloud.vertexai.api.Citation.Builder, - com.google.cloud.vertexai.api.CitationOrBuilder> - internalGetCitationsFieldBuilder() { - if (citationsBuilder_ == null) { - citationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Citation, - com.google.cloud.vertexai.api.Citation.Builder, - com.google.cloud.vertexai.api.CitationOrBuilder>( - citations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - citations_ = null; - } - return citationsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CitationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CitationMetadata) - private static final com.google.cloud.vertexai.api.CitationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CitationMetadata(); - } - - public static com.google.cloud.vertexai.api.CitationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CitationMetadata 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.vertexai.api.CitationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java deleted file mode 100644 index a211875e40ea..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CitationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CitationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getCitationsList(); - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Citation getCitations(int index); - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCitationsCount(); - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCitationsOrBuilderList(); - - /** - * - * - *
-   * Output only. List of citations.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.CitationOrBuilder getCitationsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java deleted file mode 100644 index 7c16bf43b17e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CitationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Citation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Start index into the content.
-   * 
- * - * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - int getStartIndex(); - - /** - * - * - *
-   * Output only. End index into the content.
-   * 
- * - * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - int getEndIndex(); - - /** - * - * - *
-   * Output only. Url reference of the attribution.
-   * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uri. - */ - java.lang.String getUri(); - - /** - * - * - *
-   * Output only. Url reference of the attribution.
-   * 
- * - * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - - /** - * - * - *
-   * Output only. Title of the attribution.
-   * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-   * Output only. Title of the attribution.
-   * 
- * - * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - - /** - * - * - *
-   * Output only. License of the attribution.
-   * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The license. - */ - java.lang.String getLicense(); - - /** - * - * - *
-   * Output only. License of the attribution.
-   * 
- * - * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for license. - */ - com.google.protobuf.ByteString getLicenseBytes(); - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the publicationDate field is set. - */ - boolean hasPublicationDate(); - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The publicationDate. - */ - com.google.type.Date getPublicationDate(); - - /** - * - * - *
-   * Output only. Publication date of the attribution.
-   * 
- * - * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.type.DateOrBuilder getPublicationDateOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfig.java deleted file mode 100644 index dc1349b4d2ed..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfig.java +++ /dev/null @@ -1,699 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configurations (e.g. inference timeout) that are applied on your endpoints.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ClientConnectionConfig} - */ -@com.google.protobuf.Generated -public final class ClientConnectionConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ClientConnectionConfig) - ClientConnectionConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ClientConnectionConfig"); - } - - // Use ClientConnectionConfig.newBuilder() to construct. - private ClientConnectionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ClientConnectionConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ClientConnectionConfig.class, - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder.class); - } - - private int bitField0_; - public static final int INFERENCE_TIMEOUT_FIELD_NUMBER = 1; - private com.google.protobuf.Duration inferenceTimeout_; - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return Whether the inferenceTimeout field is set. - */ - @java.lang.Override - public boolean hasInferenceTimeout() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return The inferenceTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getInferenceTimeout() { - return inferenceTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : inferenceTimeout_; - } - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getInferenceTimeoutOrBuilder() { - return inferenceTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : inferenceTimeout_; - } - - 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.writeMessage(1, getInferenceTimeout()); - } - 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.computeMessageSize(1, getInferenceTimeout()); - } - 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.vertexai.api.ClientConnectionConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ClientConnectionConfig other = - (com.google.cloud.vertexai.api.ClientConnectionConfig) obj; - - if (hasInferenceTimeout() != other.hasInferenceTimeout()) return false; - if (hasInferenceTimeout()) { - if (!getInferenceTimeout().equals(other.getInferenceTimeout())) 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 (hasInferenceTimeout()) { - hash = (37 * hash) + INFERENCE_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getInferenceTimeout().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig 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.vertexai.api.ClientConnectionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig 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.vertexai.api.ClientConnectionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ClientConnectionConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configurations (e.g. inference timeout) that are applied on your endpoints.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ClientConnectionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ClientConnectionConfig) - com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ClientConnectionConfig.class, - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ClientConnectionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInferenceTimeoutFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - inferenceTimeout_ = null; - if (inferenceTimeoutBuilder_ != null) { - inferenceTimeoutBuilder_.dispose(); - inferenceTimeoutBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ClientConnectionConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ClientConnectionConfig build() { - com.google.cloud.vertexai.api.ClientConnectionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ClientConnectionConfig buildPartial() { - com.google.cloud.vertexai.api.ClientConnectionConfig result = - new com.google.cloud.vertexai.api.ClientConnectionConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ClientConnectionConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.inferenceTimeout_ = - inferenceTimeoutBuilder_ == null ? inferenceTimeout_ : inferenceTimeoutBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ClientConnectionConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ClientConnectionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ClientConnectionConfig other) { - if (other == com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance()) - return this; - if (other.hasInferenceTimeout()) { - mergeInferenceTimeout(other.getInferenceTimeout()); - } - 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( - internalGetInferenceTimeoutFieldBuilder().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.protobuf.Duration inferenceTimeout_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - inferenceTimeoutBuilder_; - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return Whether the inferenceTimeout field is set. - */ - public boolean hasInferenceTimeout() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return The inferenceTimeout. - */ - public com.google.protobuf.Duration getInferenceTimeout() { - if (inferenceTimeoutBuilder_ == null) { - return inferenceTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : inferenceTimeout_; - } else { - return inferenceTimeoutBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public Builder setInferenceTimeout(com.google.protobuf.Duration value) { - if (inferenceTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inferenceTimeout_ = value; - } else { - inferenceTimeoutBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public Builder setInferenceTimeout(com.google.protobuf.Duration.Builder builderForValue) { - if (inferenceTimeoutBuilder_ == null) { - inferenceTimeout_ = builderForValue.build(); - } else { - inferenceTimeoutBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public Builder mergeInferenceTimeout(com.google.protobuf.Duration value) { - if (inferenceTimeoutBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && inferenceTimeout_ != null - && inferenceTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { - getInferenceTimeoutBuilder().mergeFrom(value); - } else { - inferenceTimeout_ = value; - } - } else { - inferenceTimeoutBuilder_.mergeFrom(value); - } - if (inferenceTimeout_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public Builder clearInferenceTimeout() { - bitField0_ = (bitField0_ & ~0x00000001); - inferenceTimeout_ = null; - if (inferenceTimeoutBuilder_ != null) { - inferenceTimeoutBuilder_.dispose(); - inferenceTimeoutBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public com.google.protobuf.Duration.Builder getInferenceTimeoutBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetInferenceTimeoutFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - public com.google.protobuf.DurationOrBuilder getInferenceTimeoutOrBuilder() { - if (inferenceTimeoutBuilder_ != null) { - return inferenceTimeoutBuilder_.getMessageOrBuilder(); - } else { - return inferenceTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : inferenceTimeout_; - } - } - - /** - * - * - *
-     * Customizable online prediction request timeout.
-     * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - internalGetInferenceTimeoutFieldBuilder() { - if (inferenceTimeoutBuilder_ == null) { - inferenceTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getInferenceTimeout(), getParentForChildren(), isClean()); - inferenceTimeout_ = null; - } - return inferenceTimeoutBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ClientConnectionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ClientConnectionConfig) - private static final com.google.cloud.vertexai.api.ClientConnectionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ClientConnectionConfig(); - } - - public static com.google.cloud.vertexai.api.ClientConnectionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClientConnectionConfig 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.vertexai.api.ClientConnectionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfigOrBuilder.java deleted file mode 100644 index afdb411ded8c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ClientConnectionConfigOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ClientConnectionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ClientConnectionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return Whether the inferenceTimeout field is set. - */ - boolean hasInferenceTimeout(); - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - * - * @return The inferenceTimeout. - */ - com.google.protobuf.Duration getInferenceTimeout(); - - /** - * - * - *
-   * Customizable online prediction request timeout.
-   * 
- * - * .google.protobuf.Duration inference_timeout = 1; - */ - com.google.protobuf.DurationOrBuilder getInferenceTimeoutOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResult.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResult.java deleted file mode 100644 index 845c963d7a03..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResult.java +++ /dev/null @@ -1,982 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Result of executing the [ExecutableCode].
- *
- * Always follows a `part` containing the [ExecutableCode].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CodeExecutionResult} - */ -@com.google.protobuf.Generated -public final class CodeExecutionResult extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CodeExecutionResult) - CodeExecutionResultOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CodeExecutionResult"); - } - - // Use CodeExecutionResult.newBuilder() to construct. - private CodeExecutionResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CodeExecutionResult() { - outcome_ = 0; - output_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_CodeExecutionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CodeExecutionResult.class, - com.google.cloud.vertexai.api.CodeExecutionResult.Builder.class); - } - - /** - * - * - *
-   * Enumeration of possible outcomes of the code execution.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.CodeExecutionResult.Outcome} - */ - public enum Outcome implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified status. This value should not be used.
-     * 
- * - * OUTCOME_UNSPECIFIED = 0; - */ - OUTCOME_UNSPECIFIED(0), - /** - * - * - *
-     * Code execution completed successfully.
-     * 
- * - * OUTCOME_OK = 1; - */ - OUTCOME_OK(1), - /** - * - * - *
-     * Code execution finished but with a failure. `stderr` should contain the
-     * reason.
-     * 
- * - * OUTCOME_FAILED = 2; - */ - OUTCOME_FAILED(2), - /** - * - * - *
-     * Code execution ran for too long, and was cancelled. There may or may not
-     * be a partial output present.
-     * 
- * - * OUTCOME_DEADLINE_EXCEEDED = 3; - */ - OUTCOME_DEADLINE_EXCEEDED(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Outcome"); - } - - /** - * - * - *
-     * Unspecified status. This value should not be used.
-     * 
- * - * OUTCOME_UNSPECIFIED = 0; - */ - public static final int OUTCOME_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Code execution completed successfully.
-     * 
- * - * OUTCOME_OK = 1; - */ - public static final int OUTCOME_OK_VALUE = 1; - - /** - * - * - *
-     * Code execution finished but with a failure. `stderr` should contain the
-     * reason.
-     * 
- * - * OUTCOME_FAILED = 2; - */ - public static final int OUTCOME_FAILED_VALUE = 2; - - /** - * - * - *
-     * Code execution ran for too long, and was cancelled. There may or may not
-     * be a partial output present.
-     * 
- * - * OUTCOME_DEADLINE_EXCEEDED = 3; - */ - public static final int OUTCOME_DEADLINE_EXCEEDED_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 Outcome 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 Outcome forNumber(int value) { - switch (value) { - case 0: - return OUTCOME_UNSPECIFIED; - case 1: - return OUTCOME_OK; - case 2: - return OUTCOME_FAILED; - case 3: - return OUTCOME_DEADLINE_EXCEEDED; - 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 Outcome findValueByNumber(int number) { - return Outcome.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.CodeExecutionResult.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Outcome[] VALUES = values(); - - public static Outcome 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 Outcome(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.CodeExecutionResult.Outcome) - } - - public static final int OUTCOME_FIELD_NUMBER = 1; - private int outcome_ = 0; - - /** - * - * - *
-   * Required. Outcome of the code execution.
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for outcome. - */ - @java.lang.Override - public int getOutcomeValue() { - return outcome_; - } - - /** - * - * - *
-   * Required. Outcome of the code execution.
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outcome. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult.Outcome getOutcome() { - com.google.cloud.vertexai.api.CodeExecutionResult.Outcome result = - com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.forNumber(outcome_); - return result == null - ? com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.UNRECOGNIZED - : result; - } - - public static final int OUTPUT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object output_ = ""; - - /** - * - * - *
-   * Optional. Contains stdout when code execution is successful, stderr or
-   * other description otherwise.
-   * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The output. - */ - @java.lang.Override - public java.lang.String getOutput() { - java.lang.Object ref = output_; - 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(); - output_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Contains stdout when code execution is successful, stderr or
-   * other description otherwise.
-   * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputBytes() { - java.lang.Object ref = output_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - output_ = 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 (outcome_ - != com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.OUTCOME_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, outcome_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(output_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, output_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outcome_ - != com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.OUTCOME_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, outcome_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(output_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, output_); - } - 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.vertexai.api.CodeExecutionResult)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CodeExecutionResult other = - (com.google.cloud.vertexai.api.CodeExecutionResult) obj; - - if (outcome_ != other.outcome_) return false; - if (!getOutput().equals(other.getOutput())) 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) + OUTCOME_FIELD_NUMBER; - hash = (53 * hash) + outcome_; - hash = (37 * hash) + OUTPUT_FIELD_NUMBER; - hash = (53 * hash) + getOutput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult 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.vertexai.api.CodeExecutionResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult 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.vertexai.api.CodeExecutionResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CodeExecutionResult 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Result of executing the [ExecutableCode].
-   *
-   * Always follows a `part` containing the [ExecutableCode].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CodeExecutionResult} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CodeExecutionResult) - com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_CodeExecutionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CodeExecutionResult.class, - com.google.cloud.vertexai.api.CodeExecutionResult.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CodeExecutionResult.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - outcome_ = 0; - output_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult build() { - com.google.cloud.vertexai.api.CodeExecutionResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult buildPartial() { - com.google.cloud.vertexai.api.CodeExecutionResult result = - new com.google.cloud.vertexai.api.CodeExecutionResult(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CodeExecutionResult result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.outcome_ = outcome_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.output_ = output_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CodeExecutionResult) { - return mergeFrom((com.google.cloud.vertexai.api.CodeExecutionResult) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CodeExecutionResult other) { - if (other == com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance()) - return this; - if (other.outcome_ != 0) { - setOutcomeValue(other.getOutcomeValue()); - } - if (!other.getOutput().isEmpty()) { - output_ = other.output_; - 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: - { - outcome_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - output_ = 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 outcome_ = 0; - - /** - * - * - *
-     * Required. Outcome of the code execution.
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for outcome. - */ - @java.lang.Override - public int getOutcomeValue() { - return outcome_; - } - - /** - * - * - *
-     * Required. Outcome of the code execution.
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for outcome to set. - * @return This builder for chaining. - */ - public Builder setOutcomeValue(int value) { - outcome_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Outcome of the code execution.
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outcome. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult.Outcome getOutcome() { - com.google.cloud.vertexai.api.CodeExecutionResult.Outcome result = - com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.forNumber(outcome_); - return result == null - ? com.google.cloud.vertexai.api.CodeExecutionResult.Outcome.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Required. Outcome of the code execution.
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The outcome to set. - * @return This builder for chaining. - */ - public Builder setOutcome(com.google.cloud.vertexai.api.CodeExecutionResult.Outcome value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - outcome_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Outcome of the code execution.
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearOutcome() { - bitField0_ = (bitField0_ & ~0x00000001); - outcome_ = 0; - onChanged(); - return this; - } - - private java.lang.Object output_ = ""; - - /** - * - * - *
-     * Optional. Contains stdout when code execution is successful, stderr or
-     * other description otherwise.
-     * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The output. - */ - public java.lang.String getOutput() { - java.lang.Object ref = output_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - output_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Contains stdout when code execution is successful, stderr or
-     * other description otherwise.
-     * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for output. - */ - public com.google.protobuf.ByteString getOutputBytes() { - java.lang.Object ref = output_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - output_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Contains stdout when code execution is successful, stderr or
-     * other description otherwise.
-     * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The output to set. - * @return This builder for chaining. - */ - public Builder setOutput(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - output_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Contains stdout when code execution is successful, stderr or
-     * other description otherwise.
-     * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOutput() { - output_ = getDefaultInstance().getOutput(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Contains stdout when code execution is successful, stderr or
-     * other description otherwise.
-     * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for output to set. - * @return This builder for chaining. - */ - public Builder setOutputBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - output_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CodeExecutionResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CodeExecutionResult) - private static final com.google.cloud.vertexai.api.CodeExecutionResult DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CodeExecutionResult(); - } - - public static com.google.cloud.vertexai.api.CodeExecutionResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CodeExecutionResult 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.vertexai.api.CodeExecutionResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResultOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResultOrBuilder.java deleted file mode 100644 index 4e7a3028acaf..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CodeExecutionResultOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CodeExecutionResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CodeExecutionResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Outcome of the code execution.
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for outcome. - */ - int getOutcomeValue(); - - /** - * - * - *
-   * Required. Outcome of the code execution.
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outcome. - */ - com.google.cloud.vertexai.api.CodeExecutionResult.Outcome getOutcome(); - - /** - * - * - *
-   * Optional. Contains stdout when code execution is successful, stderr or
-   * other description otherwise.
-   * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The output. - */ - java.lang.String getOutput(); - - /** - * - * - *
-   * Optional. Contains stdout when code execution is successful, stderr or
-   * other description otherwise.
-   * 
- * - * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for output. - */ - com.google.protobuf.ByteString getOutputBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java deleted file mode 100644 index deebd4bb8baf..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java +++ /dev/null @@ -1,1971 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for ComputeTokens RPC call.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ComputeTokensRequest} - */ -@com.google.protobuf.Generated -public final class ComputeTokensRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ComputeTokensRequest) - ComputeTokensRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ComputeTokensRequest"); - } - - // Use ComputeTokensRequest.newBuilder() to construct. - private ComputeTokensRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ComputeTokensRequest() { - endpoint_ = ""; - instances_ = java.util.Collections.emptyList(); - model_ = ""; - contents_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ComputeTokensRequest.class, - com.google.cloud.vertexai.api.ComputeTokensRequest.Builder.class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to get lists of tokens and
-   * token ids.
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to get lists of tokens and
-   * token ids.
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List instances_; - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getInstancesOrBuilderList() { - return instances_; - } - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.Value getInstances(int index) { - return instances_.get(index); - } - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - return instances_.get(index); - } - - public static final int MODEL_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * projects/{project}/locations/{location}/publishers/*/models/*
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * projects/{project}/locations/{location}/publishers/*/models/*
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENTS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List contents_; - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getContentsList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getContentsOrBuilderList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getContentsCount() { - return contents_.size(); - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContents(int index) { - return contents_.get(index); - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - return contents_.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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, model_); - } - for (int i = 0; i < contents_.size(); i++) { - output.writeMessage(4, contents_.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.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, model_); - } - for (int i = 0; i < contents_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, contents_.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.vertexai.api.ComputeTokensRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ComputeTokensRequest other = - (com.google.cloud.vertexai.api.ComputeTokensRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!getModel().equals(other.getModel())) return false; - if (!getContentsList().equals(other.getContentsList())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - if (getContentsCount() > 0) { - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContentsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest 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.vertexai.api.ComputeTokensRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest 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.vertexai.api.ComputeTokensRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ComputeTokensRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for ComputeTokens RPC call.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ComputeTokensRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ComputeTokensRequest) - com.google.cloud.vertexai.api.ComputeTokensRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ComputeTokensRequest.class, - com.google.cloud.vertexai.api.ComputeTokensRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ComputeTokensRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - } else { - instances_ = null; - instancesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - model_ = ""; - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - } else { - contents_ = null; - contentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ComputeTokensRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensRequest build() { - com.google.cloud.vertexai.api.ComputeTokensRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensRequest buildPartial() { - com.google.cloud.vertexai.api.ComputeTokensRequest result = - new com.google.cloud.vertexai.api.ComputeTokensRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.ComputeTokensRequest result) { - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - if (contentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - contents_ = java.util.Collections.unmodifiableList(contents_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.contents_ = contents_; - } else { - result.contents_ = contentsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ComputeTokensRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.model_ = model_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ComputeTokensRequest) { - return mergeFrom((com.google.cloud.vertexai.api.ComputeTokensRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ComputeTokensRequest other) { - if (other == com.google.cloud.vertexai.api.ComputeTokensRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - instancesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInstancesFieldBuilder() - : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (contentsBuilder_ == null) { - if (!other.contents_.isEmpty()) { - if (contents_.isEmpty()) { - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureContentsIsMutable(); - contents_.addAll(other.contents_); - } - onChanged(); - } - } else { - if (!other.contents_.isEmpty()) { - if (contentsBuilder_.isEmpty()) { - contentsBuilder_.dispose(); - contentsBuilder_ = null; - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000008); - contentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetContentsFieldBuilder() - : null; - } else { - contentsBuilder_.addAllMessages(other.contents_); - } - } - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(m); - } else { - instancesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.vertexai.api.Content m = - input.readMessage( - com.google.cloud.vertexai.api.Content.parser(), extensionRegistry); - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(m); - } else { - contentsBuilder_.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 bitField0_; - - private java.lang.Object endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to get lists of tokens and
-     * token ids.
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to get lists of tokens and
-     * token ids.
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to get lists of tokens and
-     * token ids.
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to get lists of tokens and
-     * token ids.
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to get lists of tokens and
-     * token ids.
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List instances_ = - java.util.Collections.emptyList(); - - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - instancesBuilder_; - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllInstances(java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder() { - return internalGetInstancesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token computing API call.
-     * Schema is identical to the prediction schema of the text model, even for
-     * the non-text models, like chat models, or Codey models.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInstancesBuilderList() { - return internalGetInstancesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private java.lang.Object model_ = ""; - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * projects/{project}/locations/{location}/publishers/*/models/*
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * projects/{project}/locations/{location}/publishers/*/models/*
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * projects/{project}/locations/{location}/publishers/*/models/*
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * projects/{project}/locations/{location}/publishers/*/models/*
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * projects/{project}/locations/{location}/publishers/*/models/*
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List contents_ = - java.util.Collections.emptyList(); - - private void ensureContentsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - contents_ = new java.util.ArrayList(contents_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentsBuilder_; - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getContentsList() { - if (contentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contents_); - } else { - return contentsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getContentsCount() { - if (contentsBuilder_ == null) { - return contents_.size(); - } else { - return contentsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content getContents(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.set(index, value); - onChanged(); - } else { - contentsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.set(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(value); - onChanged(); - } else { - contentsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(index, value); - onChanged(); - } else { - contentsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllContents( - java.lang.Iterable values) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contents_); - onChanged(); - } else { - contentsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearContents() { - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - contentsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeContents(int index) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.remove(index); - onChanged(); - } else { - contentsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getContentsBuilder(int index) { - return internalGetContentsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getContentsOrBuilderList() { - if (contentsBuilder_ != null) { - return contentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contents_); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder() { - return internalGetContentsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder(int index) { - return internalGetContentsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getContentsBuilderList() { - return internalGetContentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentsFieldBuilder() { - if (contentsBuilder_ == null) { - contentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - contents_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - contents_ = null; - } - return contentsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ComputeTokensRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ComputeTokensRequest) - private static final com.google.cloud.vertexai.api.ComputeTokensRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ComputeTokensRequest(); - } - - public static com.google.cloud.vertexai.api.ComputeTokensRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComputeTokensRequest 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.vertexai.api.ComputeTokensRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java deleted file mode 100644 index b1f1d17e6893..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ComputeTokensRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ComputeTokensRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to get lists of tokens and
-   * token ids.
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to get lists of tokens and
-   * token ids.
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInstancesList(); - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.Value getInstances(int index); - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getInstancesCount(); - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInstancesOrBuilderList(); - - /** - * - * - *
-   * Optional. The instances that are the input to token computing API call.
-   * Schema is identical to the prediction schema of the text model, even for
-   * the non-text models, like chat models, or Codey models.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * projects/{project}/locations/{location}/publishers/*/models/*
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * projects/{project}/locations/{location}/publishers/*/models/*
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getContentsList(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Content getContents(int index); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getContentsCount(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getContentsOrBuilderList(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java deleted file mode 100644 index ebadb43d42d1..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java +++ /dev/null @@ -1,969 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for ComputeTokens RPC call.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ComputeTokensResponse} - */ -@com.google.protobuf.Generated -public final class ComputeTokensResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ComputeTokensResponse) - ComputeTokensResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ComputeTokensResponse"); - } - - // Use ComputeTokensResponse.newBuilder() to construct. - private ComputeTokensResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ComputeTokensResponse() { - tokensInfo_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ComputeTokensResponse.class, - com.google.cloud.vertexai.api.ComputeTokensResponse.Builder.class); - } - - public static final int TOKENS_INFO_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List tokensInfo_; - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - @java.lang.Override - public java.util.List getTokensInfoList() { - return tokensInfo_; - } - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - @java.lang.Override - public java.util.List - getTokensInfoOrBuilderList() { - return tokensInfo_; - } - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - @java.lang.Override - public int getTokensInfoCount() { - return tokensInfo_.size(); - } - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TokensInfo getTokensInfo(int index) { - return tokensInfo_.get(index); - } - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TokensInfoOrBuilder getTokensInfoOrBuilder(int index) { - return tokensInfo_.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 < tokensInfo_.size(); i++) { - output.writeMessage(1, tokensInfo_.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 < tokensInfo_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tokensInfo_.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.vertexai.api.ComputeTokensResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ComputeTokensResponse other = - (com.google.cloud.vertexai.api.ComputeTokensResponse) obj; - - if (!getTokensInfoList().equals(other.getTokensInfoList())) 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 (getTokensInfoCount() > 0) { - hash = (37 * hash) + TOKENS_INFO_FIELD_NUMBER; - hash = (53 * hash) + getTokensInfoList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse 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.vertexai.api.ComputeTokensResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse 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.vertexai.api.ComputeTokensResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ComputeTokensResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for ComputeTokens RPC call.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ComputeTokensResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ComputeTokensResponse) - com.google.cloud.vertexai.api.ComputeTokensResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ComputeTokensResponse.class, - com.google.cloud.vertexai.api.ComputeTokensResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ComputeTokensResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (tokensInfoBuilder_ == null) { - tokensInfo_ = java.util.Collections.emptyList(); - } else { - tokensInfo_ = null; - tokensInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ComputeTokensResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensResponse build() { - com.google.cloud.vertexai.api.ComputeTokensResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ComputeTokensResponse buildPartial() { - com.google.cloud.vertexai.api.ComputeTokensResponse result = - new com.google.cloud.vertexai.api.ComputeTokensResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.ComputeTokensResponse result) { - if (tokensInfoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - tokensInfo_ = java.util.Collections.unmodifiableList(tokensInfo_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tokensInfo_ = tokensInfo_; - } else { - result.tokensInfo_ = tokensInfoBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ComputeTokensResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ComputeTokensResponse) { - return mergeFrom((com.google.cloud.vertexai.api.ComputeTokensResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ComputeTokensResponse other) { - if (other == com.google.cloud.vertexai.api.ComputeTokensResponse.getDefaultInstance()) - return this; - if (tokensInfoBuilder_ == null) { - if (!other.tokensInfo_.isEmpty()) { - if (tokensInfo_.isEmpty()) { - tokensInfo_ = other.tokensInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTokensInfoIsMutable(); - tokensInfo_.addAll(other.tokensInfo_); - } - onChanged(); - } - } else { - if (!other.tokensInfo_.isEmpty()) { - if (tokensInfoBuilder_.isEmpty()) { - tokensInfoBuilder_.dispose(); - tokensInfoBuilder_ = null; - tokensInfo_ = other.tokensInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - tokensInfoBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetTokensInfoFieldBuilder() - : null; - } else { - tokensInfoBuilder_.addAllMessages(other.tokensInfo_); - } - } - } - 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.vertexai.api.TokensInfo m = - input.readMessage( - com.google.cloud.vertexai.api.TokensInfo.parser(), extensionRegistry); - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - tokensInfo_.add(m); - } else { - tokensInfoBuilder_.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 tokensInfo_ = - java.util.Collections.emptyList(); - - private void ensureTokensInfoIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tokensInfo_ = - new java.util.ArrayList(tokensInfo_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.TokensInfo, - com.google.cloud.vertexai.api.TokensInfo.Builder, - com.google.cloud.vertexai.api.TokensInfoOrBuilder> - tokensInfoBuilder_; - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public java.util.List getTokensInfoList() { - if (tokensInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(tokensInfo_); - } else { - return tokensInfoBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public int getTokensInfoCount() { - if (tokensInfoBuilder_ == null) { - return tokensInfo_.size(); - } else { - return tokensInfoBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public com.google.cloud.vertexai.api.TokensInfo getTokensInfo(int index) { - if (tokensInfoBuilder_ == null) { - return tokensInfo_.get(index); - } else { - return tokensInfoBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder setTokensInfo(int index, com.google.cloud.vertexai.api.TokensInfo value) { - if (tokensInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensInfoIsMutable(); - tokensInfo_.set(index, value); - onChanged(); - } else { - tokensInfoBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder setTokensInfo( - int index, com.google.cloud.vertexai.api.TokensInfo.Builder builderForValue) { - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - tokensInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - tokensInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder addTokensInfo(com.google.cloud.vertexai.api.TokensInfo value) { - if (tokensInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensInfoIsMutable(); - tokensInfo_.add(value); - onChanged(); - } else { - tokensInfoBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder addTokensInfo(int index, com.google.cloud.vertexai.api.TokensInfo value) { - if (tokensInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensInfoIsMutable(); - tokensInfo_.add(index, value); - onChanged(); - } else { - tokensInfoBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder addTokensInfo(com.google.cloud.vertexai.api.TokensInfo.Builder builderForValue) { - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - tokensInfo_.add(builderForValue.build()); - onChanged(); - } else { - tokensInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder addTokensInfo( - int index, com.google.cloud.vertexai.api.TokensInfo.Builder builderForValue) { - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - tokensInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - tokensInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder addAllTokensInfo( - java.lang.Iterable values) { - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokensInfo_); - onChanged(); - } else { - tokensInfoBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder clearTokensInfo() { - if (tokensInfoBuilder_ == null) { - tokensInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tokensInfoBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public Builder removeTokensInfo(int index) { - if (tokensInfoBuilder_ == null) { - ensureTokensInfoIsMutable(); - tokensInfo_.remove(index); - onChanged(); - } else { - tokensInfoBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public com.google.cloud.vertexai.api.TokensInfo.Builder getTokensInfoBuilder(int index) { - return internalGetTokensInfoFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public com.google.cloud.vertexai.api.TokensInfoOrBuilder getTokensInfoOrBuilder(int index) { - if (tokensInfoBuilder_ == null) { - return tokensInfo_.get(index); - } else { - return tokensInfoBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public java.util.List - getTokensInfoOrBuilderList() { - if (tokensInfoBuilder_ != null) { - return tokensInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tokensInfo_); - } - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public com.google.cloud.vertexai.api.TokensInfo.Builder addTokensInfoBuilder() { - return internalGetTokensInfoFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.TokensInfo.getDefaultInstance()); - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public com.google.cloud.vertexai.api.TokensInfo.Builder addTokensInfoBuilder(int index) { - return internalGetTokensInfoFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.TokensInfo.getDefaultInstance()); - } - - /** - * - * - *
-     * Lists of tokens info from the input. A ComputeTokensRequest could have
-     * multiple instances with a prompt in each instance. We also need to return
-     * lists of tokens info for the request with multiple instances.
-     * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - public java.util.List - getTokensInfoBuilderList() { - return internalGetTokensInfoFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.TokensInfo, - com.google.cloud.vertexai.api.TokensInfo.Builder, - com.google.cloud.vertexai.api.TokensInfoOrBuilder> - internalGetTokensInfoFieldBuilder() { - if (tokensInfoBuilder_ == null) { - tokensInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.TokensInfo, - com.google.cloud.vertexai.api.TokensInfo.Builder, - com.google.cloud.vertexai.api.TokensInfoOrBuilder>( - tokensInfo_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - tokensInfo_ = null; - } - return tokensInfoBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ComputeTokensResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ComputeTokensResponse) - private static final com.google.cloud.vertexai.api.ComputeTokensResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ComputeTokensResponse(); - } - - public static com.google.cloud.vertexai.api.ComputeTokensResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComputeTokensResponse 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.vertexai.api.ComputeTokensResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java deleted file mode 100644 index d131535db9e7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ComputeTokensResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ComputeTokensResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - java.util.List getTokensInfoList(); - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - com.google.cloud.vertexai.api.TokensInfo getTokensInfo(int index); - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - int getTokensInfoCount(); - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - java.util.List - getTokensInfoOrBuilderList(); - - /** - * - * - *
-   * Lists of tokens info from the input. A ComputeTokensRequest could have
-   * multiple instances with a prompt in each instance. We also need to return
-   * lists of tokens info for the request with multiple instances.
-   * 
- * - * repeated .google.cloud.vertexai.v1.TokensInfo tokens_info = 1; - */ - com.google.cloud.vertexai.api.TokensInfoOrBuilder getTokensInfoOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java deleted file mode 100644 index 049531ab826d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Container Registry location for the container image.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ContainerRegistryDestination} - */ -@com.google.protobuf.Generated -public final class ContainerRegistryDestination extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ContainerRegistryDestination) - ContainerRegistryDestinationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ContainerRegistryDestination"); - } - - // Use ContainerRegistryDestination.newBuilder() to construct. - private ContainerRegistryDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ContainerRegistryDestination() { - outputUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ContainerRegistryDestination.class, - com.google.cloud.vertexai.api.ContainerRegistryDestination.Builder.class); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputUri_ = ""; - - /** - * - * - *
-   * Required. Container Registry URI of a container image.
-   * Only Google Container Registry and Artifact Registry are supported now.
-   * Accepted forms:
-   *
-   * *  Google Container Registry path. For example:
-   * `gcr.io/projectId/imageName:tag`.
-   *
-   * *  Artifact Registry path. For example:
-   * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-   *
-   * If a tag is not specified, "latest" will be used as the default tag.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - @java.lang.Override - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - 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(); - outputUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. Container Registry URI of a container image.
-   * Only Google Container Registry and Artifact Registry are supported now.
-   * Accepted forms:
-   *
-   * *  Google Container Registry path. For example:
-   * `gcr.io/projectId/imageName:tag`.
-   *
-   * *  Artifact Registry path. For example:
-   * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-   *
-   * If a tag is not specified, "latest" will be used as the default tag.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = 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.GeneratedMessage.isStringEmpty(outputUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, outputUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, outputUri_); - } - 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.vertexai.api.ContainerRegistryDestination)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ContainerRegistryDestination other = - (com.google.cloud.vertexai.api.ContainerRegistryDestination) obj; - - if (!getOutputUri().equals(other.getOutputUri())) 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) + OUTPUT_URI_FIELD_NUMBER; - hash = (53 * hash) + getOutputUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination 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.vertexai.api.ContainerRegistryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination 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.vertexai.api.ContainerRegistryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ContainerRegistryDestination 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Container Registry location for the container image.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ContainerRegistryDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ContainerRegistryDestination) - com.google.cloud.vertexai.api.ContainerRegistryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ContainerRegistryDestination.class, - com.google.cloud.vertexai.api.ContainerRegistryDestination.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ContainerRegistryDestination.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - outputUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ContainerRegistryDestination getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ContainerRegistryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ContainerRegistryDestination build() { - com.google.cloud.vertexai.api.ContainerRegistryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ContainerRegistryDestination buildPartial() { - com.google.cloud.vertexai.api.ContainerRegistryDestination result = - new com.google.cloud.vertexai.api.ContainerRegistryDestination(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ContainerRegistryDestination result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.outputUri_ = outputUri_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ContainerRegistryDestination) { - return mergeFrom((com.google.cloud.vertexai.api.ContainerRegistryDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ContainerRegistryDestination other) { - if (other == com.google.cloud.vertexai.api.ContainerRegistryDestination.getDefaultInstance()) - return this; - if (!other.getOutputUri().isEmpty()) { - outputUri_ = other.outputUri_; - 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: - { - outputUri_ = 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 outputUri_ = ""; - - /** - * - * - *
-     * Required. Container Registry URI of a container image.
-     * Only Google Container Registry and Artifact Registry are supported now.
-     * Accepted forms:
-     *
-     * *  Google Container Registry path. For example:
-     * `gcr.io/projectId/imageName:tag`.
-     *
-     * *  Artifact Registry path. For example:
-     * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-     *
-     * If a tag is not specified, "latest" will be used as the default tag.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. Container Registry URI of a container image.
-     * Only Google Container Registry and Artifact Registry are supported now.
-     * Accepted forms:
-     *
-     * *  Google Container Registry path. For example:
-     * `gcr.io/projectId/imageName:tag`.
-     *
-     * *  Artifact Registry path. For example:
-     * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-     *
-     * If a tag is not specified, "latest" will be used as the default tag.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. Container Registry URI of a container image.
-     * Only Google Container Registry and Artifact Registry are supported now.
-     * Accepted forms:
-     *
-     * *  Google Container Registry path. For example:
-     * `gcr.io/projectId/imageName:tag`.
-     *
-     * *  Artifact Registry path. For example:
-     * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-     *
-     * If a tag is not specified, "latest" will be used as the default tag.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Container Registry URI of a container image.
-     * Only Google Container Registry and Artifact Registry are supported now.
-     * Accepted forms:
-     *
-     * *  Google Container Registry path. For example:
-     * `gcr.io/projectId/imageName:tag`.
-     *
-     * *  Artifact Registry path. For example:
-     * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-     *
-     * If a tag is not specified, "latest" will be used as the default tag.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - outputUri_ = getDefaultInstance().getOutputUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Container Registry URI of a container image.
-     * Only Google Container Registry and Artifact Registry are supported now.
-     * Accepted forms:
-     *
-     * *  Google Container Registry path. For example:
-     * `gcr.io/projectId/imageName:tag`.
-     *
-     * *  Artifact Registry path. For example:
-     * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-     *
-     * If a tag is not specified, "latest" will be used as the default tag.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ContainerRegistryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ContainerRegistryDestination) - private static final com.google.cloud.vertexai.api.ContainerRegistryDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ContainerRegistryDestination(); - } - - public static com.google.cloud.vertexai.api.ContainerRegistryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContainerRegistryDestination 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.vertexai.api.ContainerRegistryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java deleted file mode 100644 index 50b9b8905e7a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ContainerRegistryDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ContainerRegistryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Container Registry URI of a container image.
-   * Only Google Container Registry and Artifact Registry are supported now.
-   * Accepted forms:
-   *
-   * *  Google Container Registry path. For example:
-   * `gcr.io/projectId/imageName:tag`.
-   *
-   * *  Artifact Registry path. For example:
-   * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-   *
-   * If a tag is not specified, "latest" will be used as the default tag.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - - /** - * - * - *
-   * Required. Container Registry URI of a container image.
-   * Only Google Container Registry and Artifact Registry are supported now.
-   * Accepted forms:
-   *
-   * *  Google Container Registry path. For example:
-   * `gcr.io/projectId/imageName:tag`.
-   *
-   * *  Artifact Registry path. For example:
-   * `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
-   *
-   * If a tag is not specified, "latest" will be used as the default tag.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java deleted file mode 100644 index 46b103f03d50..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java +++ /dev/null @@ -1,1202 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The base structured datatype containing multi-part content of a message.
- *
- * A `Content` includes a `role` field designating the producer of the `Content`
- * and a `parts` field containing multi-part data that contains the content of
- * the message turn.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Content} - */ -@com.google.protobuf.Generated -public final class Content extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Content) - ContentOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Content"); - } - - // Use Content.newBuilder() to construct. - private Content(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Content() { - role_ = ""; - parts_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Content_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Content_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Content.class, - com.google.cloud.vertexai.api.Content.Builder.class); - } - - public static final int ROLE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object role_ = ""; - - /** - * - * - *
-   * Optional. The producer of the content. Must be either 'user' or 'model'.
-   *
-   * Useful to set for multi-turn conversations, otherwise can be left blank
-   * or unset.
-   * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = role_; - 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(); - role_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The producer of the content. Must be either 'user' or 'model'.
-   *
-   * Useful to set for multi-turn conversations, otherwise can be left blank
-   * or unset.
-   * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List parts_; - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getPartsList() { - return parts_; - } - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getPartsOrBuilderList() { - return parts_; - } - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getPartsCount() { - return parts_.size(); - } - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Part getParts(int index) { - return parts_.get(index); - } - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PartOrBuilder getPartsOrBuilder(int index) { - return parts_.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.GeneratedMessage.isStringEmpty(role_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, role_); - } - for (int i = 0; i < parts_.size(); i++) { - output.writeMessage(2, parts_.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.GeneratedMessage.isStringEmpty(role_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, role_); - } - for (int i = 0; i < parts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parts_.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.vertexai.api.Content)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Content other = (com.google.cloud.vertexai.api.Content) obj; - - if (!getRole().equals(other.getRole())) return false; - if (!getPartsList().equals(other.getPartsList())) 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) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - if (getPartsCount() > 0) { - hash = (37 * hash) + PARTS_FIELD_NUMBER; - hash = (53 * hash) + getPartsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Content parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Content parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Content parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Content parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Content parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Content parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Content parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Content parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Content parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Content parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The base structured datatype containing multi-part content of a message.
-   *
-   * A `Content` includes a `role` field designating the producer of the `Content`
-   * and a `parts` field containing multi-part data that contains the content of
-   * the message turn.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Content} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Content) - com.google.cloud.vertexai.api.ContentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Content_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Content_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Content.class, - com.google.cloud.vertexai.api.Content.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Content.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - role_ = ""; - if (partsBuilder_ == null) { - parts_ = java.util.Collections.emptyList(); - } else { - parts_ = null; - partsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Content_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Content getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Content.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Content build() { - com.google.cloud.vertexai.api.Content result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Content buildPartial() { - com.google.cloud.vertexai.api.Content result = - new com.google.cloud.vertexai.api.Content(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Content result) { - if (partsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - parts_ = java.util.Collections.unmodifiableList(parts_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.parts_ = parts_; - } else { - result.parts_ = partsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Content result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.role_ = role_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Content) { - return mergeFrom((com.google.cloud.vertexai.api.Content) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Content other) { - if (other == com.google.cloud.vertexai.api.Content.getDefaultInstance()) return this; - if (!other.getRole().isEmpty()) { - role_ = other.role_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (partsBuilder_ == null) { - if (!other.parts_.isEmpty()) { - if (parts_.isEmpty()) { - parts_ = other.parts_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartsIsMutable(); - parts_.addAll(other.parts_); - } - onChanged(); - } - } else { - if (!other.parts_.isEmpty()) { - if (partsBuilder_.isEmpty()) { - partsBuilder_.dispose(); - partsBuilder_ = null; - parts_ = other.parts_; - bitField0_ = (bitField0_ & ~0x00000002); - partsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPartsFieldBuilder() - : null; - } else { - partsBuilder_.addAllMessages(other.parts_); - } - } - } - 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: - { - role_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.Part m = - input.readMessage( - com.google.cloud.vertexai.api.Part.parser(), extensionRegistry); - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(m); - } else { - partsBuilder_.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 role_ = ""; - - /** - * - * - *
-     * Optional. The producer of the content. Must be either 'user' or 'model'.
-     *
-     * Useful to set for multi-turn conversations, otherwise can be left blank
-     * or unset.
-     * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The producer of the content. Must be either 'user' or 'model'.
-     *
-     * Useful to set for multi-turn conversations, otherwise can be left blank
-     * or unset.
-     * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The producer of the content. Must be either 'user' or 'model'.
-     *
-     * Useful to set for multi-turn conversations, otherwise can be left blank
-     * or unset.
-     * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - role_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The producer of the content. Must be either 'user' or 'model'.
-     *
-     * Useful to set for multi-turn conversations, otherwise can be left blank
-     * or unset.
-     * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRole() { - role_ = getDefaultInstance().getRole(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The producer of the content. Must be either 'user' or 'model'.
-     *
-     * Useful to set for multi-turn conversations, otherwise can be left blank
-     * or unset.
-     * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - role_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List parts_ = - java.util.Collections.emptyList(); - - private void ensurePartsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - parts_ = new java.util.ArrayList(parts_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Part, - com.google.cloud.vertexai.api.Part.Builder, - com.google.cloud.vertexai.api.PartOrBuilder> - partsBuilder_; - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getPartsList() { - if (partsBuilder_ == null) { - return java.util.Collections.unmodifiableList(parts_); - } else { - return partsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getPartsCount() { - if (partsBuilder_ == null) { - return parts_.size(); - } else { - return partsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Part getParts(int index) { - if (partsBuilder_ == null) { - return parts_.get(index); - } else { - return partsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setParts(int index, com.google.cloud.vertexai.api.Part value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.set(index, value); - onChanged(); - } else { - partsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setParts(int index, com.google.cloud.vertexai.api.Part.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.set(index, builderForValue.build()); - onChanged(); - } else { - partsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addParts(com.google.cloud.vertexai.api.Part value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.add(value); - onChanged(); - } else { - partsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addParts(int index, com.google.cloud.vertexai.api.Part value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.add(index, value); - onChanged(); - } else { - partsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addParts(com.google.cloud.vertexai.api.Part.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(builderForValue.build()); - onChanged(); - } else { - partsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addParts(int index, com.google.cloud.vertexai.api.Part.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(index, builderForValue.build()); - onChanged(); - } else { - partsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllParts( - java.lang.Iterable values) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parts_); - onChanged(); - } else { - partsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearParts() { - if (partsBuilder_ == null) { - parts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeParts(int index) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.remove(index); - onChanged(); - } else { - partsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Part.Builder getPartsBuilder(int index) { - return internalGetPartsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.PartOrBuilder getPartsOrBuilder(int index) { - if (partsBuilder_ == null) { - return parts_.get(index); - } else { - return partsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getPartsOrBuilderList() { - if (partsBuilder_ != null) { - return partsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parts_); - } - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Part.Builder addPartsBuilder() { - return internalGetPartsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Part.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Part.Builder addPartsBuilder(int index) { - return internalGetPartsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Part.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. Ordered `Parts` that constitute a single message. Parts may have
-     * different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getPartsBuilderList() { - return internalGetPartsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Part, - com.google.cloud.vertexai.api.Part.Builder, - com.google.cloud.vertexai.api.PartOrBuilder> - internalGetPartsFieldBuilder() { - if (partsBuilder_ == null) { - partsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Part, - com.google.cloud.vertexai.api.Part.Builder, - com.google.cloud.vertexai.api.PartOrBuilder>( - parts_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - parts_ = null; - } - return partsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Content) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Content) - private static final com.google.cloud.vertexai.api.Content DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Content(); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Content getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java deleted file mode 100644 index 5720ce6b23af..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ContentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Content) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The producer of the content. Must be either 'user' or 'model'.
-   *
-   * Useful to set for multi-turn conversations, otherwise can be left blank
-   * or unset.
-   * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - java.lang.String getRole(); - - /** - * - * - *
-   * Optional. The producer of the content. Must be either 'user' or 'model'.
-   *
-   * Useful to set for multi-turn conversations, otherwise can be left blank
-   * or unset.
-   * 
- * - * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - com.google.protobuf.ByteString getRoleBytes(); - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getPartsList(); - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.Part getParts(int index); - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getPartsCount(); - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getPartsOrBuilderList(); - - /** - * - * - *
-   * Required. Ordered `Parts` that constitute a single message. Parts may have
-   * different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.PartOrBuilder getPartsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java deleted file mode 100644 index 63be6c6272de..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java +++ /dev/null @@ -1,971 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ContentProto extends com.google.protobuf.GeneratedFile { - private ContentProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ContentProto"); - } - - 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_vertexai_v1_Content_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Content_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Part_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Part_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Blob_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Blob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FileData_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FileData_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VideoMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VideoMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VoiceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VoiceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SpeechConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SpeechConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ImageConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ImageConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerationConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SafetySetting_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SafetySetting_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SafetyRating_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SafetyRating_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CitationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CitationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Citation_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Citation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Candidate_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Candidate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UrlContextMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UrlContextMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UrlMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UrlMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_LogprobsResult_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_LogprobsResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Segment_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Segment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingSupport_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingSupport_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SearchEntryPoint_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SearchEntryPoint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RetrievalMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RetrievalMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ModelArmorConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ModelArmorConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ModalityTokenCount_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ModalityTokenCount_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/vertexai/v1/content.proto" - + "\022\030google.cloud.vertexai.v1\032\037google/api/f" - + "ield_behavior.proto\032\031google/api/resource" - + ".proto\032&google/cloud/vertexai/v1/openapi.proto\032#google/cloud/vertexai/v1/tool.pr" - + "oto\032.google/cloud/vertexai/v1/vertex_rag" - + "_data.proto\032\036google/protobuf/duration.pr" - + "oto\032\034google/protobuf/struct.proto\032\026google/type/date.proto\"P\n" - + "\007Content\022\021\n" - + "\004role\030\001 \001(\tB\003\340A\001\0222\n" - + "\005parts\030\002" - + " \003(\0132\036.google.cloud.vertexai.v1.PartB\003\340A\002\"\332\004\n" - + "\004Part\022\023\n" - + "\004text\030\001 \001(\tB\003\340A\001H\000\022:\n" - + "\013inline_data\030\002" - + " \001(\0132\036.google.cloud.vertexai.v1.BlobB\003\340A\001H\000\022<\n" - + "\tfile_data\030\003" - + " \001(\0132\".google.cloud.vertexai.v1.FileDataB\003\340A\001H\000\022D\n\r" - + "function_call\030\005 \001(\0132&.goo" - + "gle.cloud.vertexai.v1.FunctionCallB\003\340A\001H\000\022L\n" - + "\021function_response\030\006 \001(\0132*.google.cl" - + "oud.vertexai.v1.FunctionResponseB\003\340A\001H\000\022H\n" - + "\017executable_code\030\010" - + " \001(\0132(.google.cloud.vertexai.v1.ExecutableCodeB\003\340A\001H\000\022S\n" - + "\025code_execution_result\030\t \001(\0132-.google.cloud." - + "vertexai.v1.CodeExecutionResultB\003\340A\001H\000\022\024\n" - + "\007thought\030\n" - + " \001(\010B\003\340A\001\022\036\n" - + "\021thought_signature\030\013 \001(\014B\003\340A\001\022F\n" - + "\016video_metadata\030\004 \001(\0132\'.g" - + "oogle.cloud.vertexai.v1.VideoMetadataB\003\340A\001H\001B\006\n" - + "\004dataB\n\n" - + "\010metadata\"1\n" - + "\004Blob\022\026\n" - + "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004data\030\002 \001(\014B\003\340A\002\"9\n" - + "\010FileData\022\026\n" - + "\tmime_type\030\001 \001(\tB\003\340A\002\022\025\n" - + "\010file_uri\030\002 \001(\tB\003\340A\002\"y\n\r" - + "VideoMetadata\0224\n" - + "\014start_offset\030\001" - + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\0222\n\n" - + "end_offset\030\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\"=\n" - + "\023PrebuiltVoiceConfig\022\027\n\n" - + "voice_name\030\001 \001(\tH\000\210\001\001B\r\n" - + "\013_voice_name\"P\n" - + "\025ReplicatedVoiceConfig\022\026\n" - + "\tmime_type\030\001 \001(\tB\003\340A\001\022\037\n" - + "\022voice_sample_audio\030\002 \001(\014B\003\340A\001\"\306\001\n" - + "\013VoiceConfig\022N\n" - + "\025prebuilt_voice_config\030\001" - + " \001(\0132-.google.cloud.vertexai.v1.PrebuiltVoiceConfigH\000\022W\n" - + "\027replicated_voice_config\030\003" - + " \001(\0132/.google.cloud.vertexai.v1.ReplicatedVoiceConfigB\003\340A\001H\000B\016\n" - + "\014voice_config\"l\n" - + "\022SpeakerVoiceConfig\022\024\n" - + "\007speaker\030\001 \001(\tB\003\340A\002\022@\n" - + "\014voice_config\030\002" - + " \001(\0132%.google.cloud.vertexai.v1.VoiceConfigB\003\340A\002\"k\n" - + "\027MultiSpeakerVoiceConfig\022P\n" - + "\025speaker_voice_configs\030\002" - + " \003(\0132,.google.cloud.vertexai.v1.SpeakerVoiceConfigB\003\340A\002\"\276\001\n" - + "\014SpeechConfig\022;\n" - + "\014voice_config\030\001 \001(\0132%.google.cloud.vertexai.v1.VoiceConfig\022\032\n\r" - + "language_code\030\002 \001(\tB\003\340A\001\022U\n" - + "\032multi_speaker_voice_config\030\003" - + " \001(\01321.google.cloud.vertexai.v1.MultiSpeakerVoiceConfig\">\n" - + "\013ImageConfig\022\036\n" - + "\014aspect_ratio\030\002 \001(\tB\003\340A\001H\000\210\001\001B\017\n\r" - + "_aspect_ratio\"\237\016\n" - + "\020GenerationConfig\022\035\n" - + "\013temperature\030\001 \001(\002B\003\340A\001H\000\210\001\001\022\027\n" - + "\005top_p\030\002 \001(\002B\003\340A\001H\001\210\001\001\022\027\n" - + "\005top_k\030\003 \001(\002B\003\340A\001H\002\210\001\001\022!\n" - + "\017candidate_count\030\004 \001(\005B\003\340A\001H\003\210\001\001\022#\n" - + "\021max_output_tokens\030\005 \001(\005B\003\340A\001H\004\210\001\001\022\033\n" - + "\016stop_sequences\030\006 \003(\tB\003\340A\001\022#\n" - + "\021response_logprobs\030\022 \001(\010B\003\340A\001H\005\210\001\001\022\032\n" - + "\010logprobs\030\007 \001(\005B\003\340A\001H\006\210\001\001\022\"\n" - + "\020presence_penalty\030\010 \001(\002B\003\340A\001H\007\210\001\001\022#\n" - + "\021frequency_penalty\030\t \001(\002B\003\340A\001H\010\210\001\001\022\026\n" - + "\004seed\030\014 \001(\005B\003\340A\001H\t\210\001\001\022\037\n" - + "\022response_mime_type\030\r" - + " \001(\tB\003\340A\001\022C\n" - + "\017response_schema\030\020 \001(\0132" - + " .google.cloud.vertexai.v1.SchemaB\003\340A\001H\n" - + "\210\001\001\022>\n" - + "\024response_json_schema\030\034" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\001H\013\210\001\001\022Z\n" - + "\016routing_config\030\021 \001(\01328.goo" - + "gle.cloud.vertexai.v1.GenerationConfig.RoutingConfigB\003\340A\001H\014\210\001\001\022G\n\r" - + "speech_config\030\027" - + " \001(\0132&.google.cloud.vertexai.v1.SpeechConfigB\003\340A\001H\r" - + "\210\001\001\022W\n" - + "\017thinking_config\030\031 \001(\013" - + "29.google.cloud.vertexai.v1.GenerationConfig.ThinkingConfigB\003\340A\001\022E\n" - + "\014image_config\030\036" - + " \001(\0132%.google.cloud.vertexai.v1.ImageConfigB\003\340A\001H\016\210\001\001\032\274\004\n\r" - + "RoutingConfig\022]\n" - + "\tauto_mode\030\001 \001(\0132H.google.cloud.vertexai.v1." - + "GenerationConfig.RoutingConfig.AutoRoutingModeH\000\022a\n" - + "\013manual_mode\030\002 \001(\0132J.google.c" - + "loud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\000\032\231\002\n" - + "\017AutoRoutingMode\022\206\001\n" - + "\030model_routing_preference\030\001 \001(\0162_.google.cloud.vertexai.v1.Generation" - + "Config.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\000\210\001\001\"`\n" - + "\026ModelRoutingPreference\022\013\n" - + "\007UNKNOWN\020\000\022\026\n" - + "\022PRIORITIZE_QUALITY\020\001\022\014\n" - + "\010BALANCED\020\002\022\023\n" - + "\017PRIORITIZE_COST\020\003B\033\n" - + "\031_model_routing_preference\032;\n" - + "\021ManualRoutingMode\022\027\n\n" - + "model_name\030\001 \001(\tH\000\210\001\001B\r\n" - + "\013_model_nameB\020\n" - + "\016routing_config\032\200\001\n" - + "\016ThinkingConfig\022\"\n" - + "\020include_thoughts\030\001 \001(\010B\003\340A\001H\000\210\001\001\022!\n" - + "\017thinking_budget\030\003 \001(\005B\003\340A\001H\001\210\001\001B\023\n" - + "\021_include_thoughtsB\022\n" - + "\020_thinking_budgetB\016\n" - + "\014_temperatureB\010\n" - + "\006_top_pB\010\n" - + "\006_top_kB\022\n" - + "\020_candidate_countB\024\n" - + "\022_max_output_tokensB\024\n" - + "\022_response_logprobsB\013\n" - + "\t_logprobsB\023\n" - + "\021_presence_penaltyB\024\n" - + "\022_frequency_penaltyB\007\n" - + "\005_seedB\022\n" - + "\020_response_schemaB\027\n" - + "\025_response_json_schemaB\021\n" - + "\017_routing_configB\020\n" - + "\016_speech_configB\017\n\r" - + "_image_config\"\345\003\n\r" - + "SafetySetting\022=\n" - + "\010category\030\001" - + " \001(\0162&.google.cloud.vertexai.v1.HarmCategoryB\003\340A\002\022R\n" - + "\tthreshold\030\002" - + " \001(\0162:.google.cloud.vertexai.v1.SafetySetting.HarmBlockThresholdB\003\340A\002\022L\n" - + "\006method\030\004" - + " \001(\01627.google.cloud.vertexai.v1.SafetySetting.HarmBlockMethodB\003\340A\001\"\235\001\n" - + "\022HarmBlockThreshold\022$\n" - + " HARM_BLOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n" - + "\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n" - + "\026BLOCK_MEDIUM_AND_ABOVE\020\002\022\023\n" - + "\017BLOCK_ONLY_HIGH\020\003\022\016\n\n" - + "BLOCK_NONE\020\004\022\007\n" - + "\003OFF\020\005\"S\n" - + "\017HarmBlockMethod\022!\n" - + "\035HARM_BLOCK_METHOD_UNSPECIFIED\020\000\022\014\n" - + "\010SEVERITY\020\001\022\017\n" - + "\013PROBABILITY\020\002\"\271\004\n" - + "\014SafetyRating\022=\n" - + "\010category\030\001" - + " \001(\0162&.google.cloud.vertexai.v1.HarmCategoryB\003\340A\003\022P\n" - + "\013probability\030\002" - + " \001(\01626.google.cloud.vertexai.v1.SafetyRating.HarmProbabilityB\003\340A\003\022\036\n" - + "\021probability_score\030\005 \001(\002B\003\340A\003\022J\n" - + "\010severity\030\006" - + " \001(\01623.google.cloud.vertexai.v1.SafetyRating.HarmSeverityB\003\340A\003\022\033\n" - + "\016severity_score\030\007 \001(\002B\003\340A\003\022\024\n" - + "\007blocked\030\003 \001(\010B\003\340A\003\"b\n" - + "\017HarmProbability\022 \n" - + "\034HARM_PROBABILITY_UNSPECIFIED\020\000\022\016\n\n" - + "NEGLIGIBLE\020\001\022\007\n" - + "\003LOW\020\002\022\n\n" - + "\006MEDIUM\020\003\022\010\n" - + "\004HIGH\020\004\"\224\001\n" - + "\014HarmSeverity\022\035\n" - + "\031HARM_SEVERITY_UNSPECIFIED\020\000\022\034\n" - + "\030HARM_SEVERITY_NEGLIGIBLE\020\001\022\025\n" - + "\021HARM_SEVERITY_LOW\020\002\022\030\n" - + "\024HARM_SEVERITY_MEDIUM\020\003\022\026\n" - + "\022HARM_SEVERITY_HIGH\020\004\"N\n" - + "\020CitationMetadata\022:\n" - + "\tcitations\030\001" - + " \003(\0132\".google.cloud.vertexai.v1.CitationB\003\340A\003\"\252\001\n" - + "\010Citation\022\030\n" - + "\013start_index\030\001 \001(\005B\003\340A\003\022\026\n" - + "\tend_index\030\002 \001(\005B\003\340A\003\022\020\n" - + "\003uri\030\003 \001(\tB\003\340A\003\022\022\n" - + "\005title\030\004 \001(\tB\003\340A\003\022\024\n" - + "\007license\030\005 \001(\tB\003\340A\003\0220\n" - + "\020publication_date\030\006 \001(\0132\021.google.type.DateB\003\340A\003\"\322\006\n" - + "\tCandidate\022\022\n" - + "\005index\030\001 \001(\005B\003\340A\003\0227\n" - + "\007content\030\002" - + " \001(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\003\022\022\n" - + "\005score\030\010 \001(\001B\003\340A\003\022\031\n" - + "\014avg_logprobs\030\t \001(\001B\003\340A\003\022F\n" - + "\017logprobs_result\030\n" - + " \001(\0132(.google.cloud.vertexai.v1.LogprobsResultB\003\340A\003\022L\n\r" - + "finish_reason\030\003" - + " \001(\01620.google.cloud.vertexai.v1.Candidate.FinishReasonB\003\340A\003\022C\n" - + "\016safety_ratings\030\004" - + " \003(\0132&.google.cloud.vertexai.v1.SafetyRatingB\003\340A\003\022 \n" - + "\016finish_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022J\n" - + "\021citation_metadata\030\006 \001(\0132*.g" - + "oogle.cloud.vertexai.v1.CitationMetadataB\003\340A\003\022L\n" - + "\022grounding_metadata\030\007 \001(\0132+.goog" - + "le.cloud.vertexai.v1.GroundingMetadataB\003\340A\003\022O\n" - + "\024url_context_metadata\030\013 \001(\0132,.goog" - + "le.cloud.vertexai.v1.UrlContextMetadataB\003\340A\003\"\315\001\n" - + "\014FinishReason\022\035\n" - + "\031FINISH_REASON_UNSPECIFIED\020\000\022\010\n" - + "\004STOP\020\001\022\016\n\n" - + "MAX_TOKENS\020\002\022\n" - + "\n" - + "\006SAFETY\020\003\022\016\n\n" - + "RECITATION\020\004\022\t\n" - + "\005OTHER\020\005\022\r\n" - + "\tBLOCKLIST\020\006\022\026\n" - + "\022PROHIBITED_CONTENT\020\007\022\010\n" - + "\004SPII\020\010\022\033\n" - + "\027MALFORMED_FUNCTION_CALL\020\t\022\017\n" - + "\013MODEL_ARMOR\020\n" - + "B\021\n" - + "\017_finish_message\"V\n" - + "\022UrlContextMetadata\022@\n" - + "\014url_metadata\030\001 \003(\0132%.go" - + "ogle.cloud.vertexai.v1.UrlMetadataB\003\340A\003\"\372\001\n" - + "\013UrlMetadata\022\025\n\r" - + "retrieved_url\030\001 \001(\t\022V\n" - + "\024url_retrieval_status\030\002 \001(\01628.google.cl" - + "oud.vertexai.v1.UrlMetadata.UrlRetrievalStatus\"|\n" - + "\022UrlRetrievalStatus\022$\n" - + " URL_RETRIEVAL_STATUS_UNSPECIFIED\020\000\022 \n" - + "\034URL_RETRIEVAL_STATUS_SUCCESS\020\001\022\036\n" - + "\032URL_RETRIEVAL_STATUS_ERROR\020\002\"\211\003\n" - + "\016LogprobsResult\022N\n" - + "\016top_candidates\030\001" - + " \003(\01326.google.cloud.vertexai.v1.LogprobsResult.TopCandidates\022M\n" - + "\021chosen_candidates\030\002" - + " \003(\01322.google.cloud.vertexai.v1.LogprobsResult.Candidate\032\177\n" - + "\tCandidate\022\022\n" - + "\005token\030\001 \001(\tH\000\210\001\001\022\025\n" - + "\010token_id\030\003 \001(\005H\001\210\001\001\022\034\n" - + "\017log_probability\030\002 \001(\002H\002\210\001\001B\010\n" - + "\006_tokenB\013\n" - + "\t_token_idB\022\n" - + "\020_log_probability\032W\n\r" - + "TopCandidates\022F\n\n" - + "candidates\030\001 \003(\01322.google.cloud.vertexai.v1.LogprobsResult.Candidate\"g\n" - + "\007Segment\022\027\n\n" - + "part_index\030\001 \001(\005B\003\340A\003\022\030\n" - + "\013start_index\030\002 \001(\005B\003\340A\003\022\026\n" - + "\tend_index\030\003 \001(\005B\003\340A\003\022\021\n" - + "\004text\030\004 \001(\tB\003\340A\003\"\306\007\n" - + "\016GroundingChunk\022;\n" - + "\003web\030\001 \001(\0132,.google.cloud.vertexai.v1.GroundingChunk.WebH\000\022V\n" - + "\021retrieved_context\030\002 \001(\01329.google.cloud.vert" - + "exai.v1.GroundingChunk.RetrievedContextH\000\022=\n" - + "\004maps\030\003 \001(\0132-.google.cloud.vertexai.v1.GroundingChunk.MapsH\000\032=\n" - + "\003Web\022\020\n" - + "\003uri\030\001 \001(\tH\000\210\001\001\022\022\n" - + "\005title\030\002 \001(\tH\001\210\001\001B\006\n" - + "\004_uriB\010\n" - + "\006_title\032\345\001\n" - + "\020RetrievedContext\0227\n" - + "\trag_chunk\030\004 \001(\0132\".google.cloud.vertexai.v1.RagChunkH\000\022\020\n" - + "\003uri\030\001 \001(\tH\001\210\001\001\022\022\n" - + "\005title\030\002 \001(\tH\002\210\001\001\022\021\n" - + "\004text\030\003 \001(\tH\003\210\001\001\022\037\n\r" - + "document_name\030\006 \001(\tB\003\340A\003H\004\210\001\001B\021\n" - + "\017context_detailsB\006\n" - + "\004_uriB\010\n" - + "\006_titleB\007\n" - + "\005_textB\020\n" - + "\016_document_name\032\252\003\n" - + "\004Maps\022\020\n" - + "\003uri\030\001 \001(\tH\000\210\001\001\022\022\n" - + "\005title\030\002 \001(\tH\001\210\001\001\022\021\n" - + "\004text\030\003 \001(\tH\002\210\001\001\022\025\n" - + "\010place_id\030\004 \001(\tH\003\210\001\001\022^\n" - + "\024place_answer_sources\030\005 \001(\0132@" - + ".google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources\032\311\001\n" - + "\022PlaceAnswerSources\022g\n" - + "\017review_snippets\030\001 \003(\0132N.googl" - + "e.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet\032J\n\r" - + "ReviewSnippet\022\021\n" - + "\treview_id\030\001 \001(\t\022\027\n" - + "\017google_maps_uri\030\002 \001(\t\022\r\n" - + "\005title\030\003 \001(\tB\006\n" - + "\004_uriB\010\n" - + "\006_titleB\007\n" - + "\005_textB\013\n" - + "\t_place_idB\014\n\n" - + "chunk_type\"\223\001\n" - + "\020GroundingSupport\0227\n" - + "\007segment\030\001 \001(\013" - + "2!.google.cloud.vertexai.v1.SegmentH\000\210\001\001\022\037\n" - + "\027grounding_chunk_indices\030\002 \003(\005\022\031\n" - + "\021confidence_scores\030\003 \003(\002B\n\n" - + "\010_segment\"\226\005\n" - + "\021GroundingMetadata\022\037\n" - + "\022web_search_queries\030\001 \003(\tB\003\340A\001\022P\n" - + "\022search_entry_point\030\004 \001(\0132*.go" - + "ogle.cloud.vertexai.v1.SearchEntryPointB\003\340A\001H\000\210\001\001\022B\n" - + "\020grounding_chunks\030\005" - + " \003(\0132(.google.cloud.vertexai.v1.GroundingChunk\022K\n" - + "\022grounding_supports\030\006" - + " \003(\0132*.google.cloud.vertexai.v1.GroundingSupportB\003\340A\001\022T\n" - + "\022retrieval_metadata\030\007 \001(\0132+.google.cloud.ve" - + "rtexai.v1.RetrievalMetadataB\006\340A\001\340A\003H\001\210\001\001\0225\n" - + " google_maps_widget_context_token\030\010 \001(" - + "\tB\006\340A\001\340A\003H\002\210\001\001\022[\n" - + "\024source_flagging_uris\030\t" - + " \003(\0132=.google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri\032@\n" - + "\021SourceFlaggingUri\022\021\n" - + "\tsource_id\030\001 \001(\t\022\030\n" - + "\020flag_content_uri\030\002 \001(\tB\025\n" - + "\023_search_entry_pointB\025\n" - + "\023_retrieval_metadataB#\n" - + "!_google_maps_widget_context_token\"H\n" - + "\020SearchEntryPoint\022\035\n" - + "\020rendered_content\030\001 \001(\tB\003\340A\001\022\025\n" - + "\010sdk_blob\030\002 \001(\014B\003\340A\001\"G\n" - + "\021RetrievalMetadata\0222\n" - + "%google_search_dynamic_retrieval_score\030\002 \001(\002B\003\340A\001\"\250\001\n" - + "\020ModelArmorConfig\022H\n" - + "\024prompt_template_name\030\001 \001(\tB*\340A\001\372A$\n" - + "\"modelarmor.googleapis.com/Template\022J\n" - + "\026response_template_name\030\002 \001(\tB*\340A\001\372A$\n" - + "\"modelarmor.googleapis.com/Template\"_\n" - + "\022ModalityTokenCount\0224\n" - + "\010modality\030\001 \001(\0162\".google.cloud.vertexai.v1.Modality\022\023\n" - + "\013token_count\030\002 \001(\005*\370\001\n" - + "\014HarmCategory\022\035\n" - + "\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n" - + "\031HARM_CATEGORY_HATE_SPEECH\020\001\022#\n" - + "\037HARM_CATEGORY_DANGEROUS_CONTENT\020\002\022\034\n" - + "\030HARM_CATEGORY_HARASSMENT\020\003\022#\n" - + "\037HARM_CATEGORY_SEXUALLY_EXPLICIT\020\004\022%\n" - + "\035HARM_CATEGORY_CIVIC_INTEGRITY\020\005\032\002\010\001\022\033\n" - + "\027HARM_CATEGORY_JAILBREAK\020\006*]\n" - + "\010Modality\022\030\n" - + "\024MODALITY_UNSPECIFIED\020\000\022\010\n" - + "\004TEXT\020\001\022\t\n" - + "\005IMAGE\020\002\022\t\n" - + "\005VIDEO\020\003\022\t\n" - + "\005AUDIO\020\004\022\014\n" - + "\010DOCUMENT\020\005B\256\002\n" - + "\035com.google.cloud.vertexai.apiB\014ContentProtoP\001Z>cloud.goog" - + "le.com/go/aiplatform/apiv1/aiplatformpb;" - + "aiplatformpb\252\002\032Google.Cloud.AIPlatform.V" - + "1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1\352Ab\n" - + "\"modelarmor.googleapis.com/Template\022 - * RagCorpus status. - * - * - * Protobuf type {@code google.cloud.vertexai.v1.CorpusStatus} - */ -@com.google.protobuf.Generated -public final class CorpusStatus extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CorpusStatus) - CorpusStatusOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CorpusStatus"); - } - - // Use CorpusStatus.newBuilder() to construct. - private CorpusStatus(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CorpusStatus() { - state_ = 0; - errorStatus_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_CorpusStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CorpusStatus.class, - com.google.cloud.vertexai.api.CorpusStatus.Builder.class); - } - - /** - * - * - *
-   * RagCorpus life state.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.CorpusStatus.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * This state is not supposed to happen.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * - * - *
-     * RagCorpus resource entry is initialized, but hasn't done validation.
-     * 
- * - * INITIALIZED = 1; - */ - INITIALIZED(1), - /** - * - * - *
-     * RagCorpus is provisioned successfully and is ready to serve.
-     * 
- * - * ACTIVE = 2; - */ - ACTIVE(2), - /** - * - * - *
-     * RagCorpus is in a problematic situation.
-     * See `error_message` field for details.
-     * 
- * - * ERROR = 3; - */ - ERROR(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "State"); - } - - /** - * - * - *
-     * This state is not supposed to happen.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - - /** - * - * - *
-     * RagCorpus resource entry is initialized, but hasn't done validation.
-     * 
- * - * INITIALIZED = 1; - */ - public static final int INITIALIZED_VALUE = 1; - - /** - * - * - *
-     * RagCorpus is provisioned successfully and is ready to serve.
-     * 
- * - * ACTIVE = 2; - */ - public static final int ACTIVE_VALUE = 2; - - /** - * - * - *
-     * RagCorpus is in a problematic situation.
-     * See `error_message` field for details.
-     * 
- * - * ERROR = 3; - */ - public static final int ERROR_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 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 UNKNOWN; - case 1: - return INITIALIZED; - case 2: - return ACTIVE; - case 3: - return ERROR; - 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.CorpusStatus.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.vertexai.v1.CorpusStatus.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_ = 0; - - /** - * - * - *
-   * Output only. RagCorpus life state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.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. RagCorpus life state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus.State getState() { - com.google.cloud.vertexai.api.CorpusStatus.State result = - com.google.cloud.vertexai.api.CorpusStatus.State.forNumber(state_); - return result == null ? com.google.cloud.vertexai.api.CorpusStatus.State.UNRECOGNIZED : result; - } - - public static final int ERROR_STATUS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object errorStatus_ = ""; - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - @java.lang.Override - public java.lang.String getErrorStatus() { - java.lang.Object ref = errorStatus_; - 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(); - errorStatus_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - @java.lang.Override - public com.google.protobuf.ByteString getErrorStatusBytes() { - java.lang.Object ref = errorStatus_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorStatus_ = 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 (state_ != com.google.cloud.vertexai.api.CorpusStatus.State.UNKNOWN.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorStatus_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, errorStatus_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vertexai.api.CorpusStatus.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorStatus_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorStatus_); - } - 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.vertexai.api.CorpusStatus)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CorpusStatus other = - (com.google.cloud.vertexai.api.CorpusStatus) obj; - - if (state_ != other.state_) return false; - if (!getErrorStatus().equals(other.getErrorStatus())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + ERROR_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getErrorStatus().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CorpusStatus 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.vertexai.api.CorpusStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CorpusStatus 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.vertexai.api.CorpusStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CorpusStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CorpusStatus 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * RagCorpus status.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CorpusStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CorpusStatus) - com.google.cloud.vertexai.api.CorpusStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_CorpusStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CorpusStatus.class, - com.google.cloud.vertexai.api.CorpusStatus.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CorpusStatus.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - state_ = 0; - errorStatus_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus build() { - com.google.cloud.vertexai.api.CorpusStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus buildPartial() { - com.google.cloud.vertexai.api.CorpusStatus result = - new com.google.cloud.vertexai.api.CorpusStatus(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CorpusStatus result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.errorStatus_ = errorStatus_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CorpusStatus) { - return mergeFrom((com.google.cloud.vertexai.api.CorpusStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CorpusStatus other) { - if (other == com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getErrorStatus().isEmpty()) { - errorStatus_ = other.errorStatus_; - 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: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - errorStatus_ = 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 state_ = 0; - - /** - * - * - *
-     * Output only. RagCorpus life state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.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. RagCorpus life state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus life state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus.State getState() { - com.google.cloud.vertexai.api.CorpusStatus.State result = - com.google.cloud.vertexai.api.CorpusStatus.State.forNumber(state_); - return result == null - ? com.google.cloud.vertexai.api.CorpusStatus.State.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. RagCorpus life state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vertexai.api.CorpusStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - state_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus life state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000001); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object errorStatus_ = ""; - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - public java.lang.String getErrorStatus() { - java.lang.Object ref = errorStatus_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - errorStatus_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - public com.google.protobuf.ByteString getErrorStatusBytes() { - java.lang.Object ref = errorStatus_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorStatus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The errorStatus to set. - * @return This builder for chaining. - */ - public Builder setErrorStatus(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - errorStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearErrorStatus() { - errorStatus_ = getDefaultInstance().getErrorStatus(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for errorStatus to set. - * @return This builder for chaining. - */ - public Builder setErrorStatusBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - errorStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CorpusStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CorpusStatus) - private static final com.google.cloud.vertexai.api.CorpusStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CorpusStatus(); - } - - public static com.google.cloud.vertexai.api.CorpusStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CorpusStatus 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.vertexai.api.CorpusStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CorpusStatusOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CorpusStatusOrBuilder.java deleted file mode 100644 index 4cbd8b65bb4d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CorpusStatusOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CorpusStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CorpusStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. RagCorpus life state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - - /** - * - * - *
-   * Output only. RagCorpus life state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.vertexai.api.CorpusStatus.State getState(); - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - java.lang.String getErrorStatus(); - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - com.google.protobuf.ByteString getErrorStatusBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java deleted file mode 100644 index 1fce3d512235..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java +++ /dev/null @@ -1,3290 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for [PredictionService.CountTokens][].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CountTokensRequest} - */ -@com.google.protobuf.Generated -public final class CountTokensRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CountTokensRequest) - CountTokensRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CountTokensRequest"); - } - - // Use CountTokensRequest.newBuilder() to construct. - private CountTokensRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CountTokensRequest() { - endpoint_ = ""; - model_ = ""; - instances_ = java.util.Collections.emptyList(); - contents_ = java.util.Collections.emptyList(); - tools_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CountTokensRequest.class, - com.google.cloud.vertexai.api.CountTokensRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to perform token counting.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to perform token counting.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List instances_; - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getInstancesOrBuilderList() { - return instances_; - } - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.Value getInstances(int index) { - return instances_.get(index); - } - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - return instances_.get(index); - } - - public static final int CONTENTS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List contents_; - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getContentsList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getContentsOrBuilderList() { - return contents_; - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getContentsCount() { - return contents_.size(); - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContents(int index) { - return contents_.get(index); - } - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - return contents_.get(index); - } - - public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.Content systemInstruction_; - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - @java.lang.Override - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - public static final int TOOLS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private java.util.List tools_; - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getToolsList() { - return tools_; - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getToolsOrBuilderList() { - return tools_; - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getToolsCount() { - return tools_.size(); - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool getTools(int index) { - return tools_.get(index); - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - return tools_.get(index); - } - - public static final int GENERATION_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.GenerationConfig generationConfig_; - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - @java.lang.Override - public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig() { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, model_); - } - for (int i = 0; i < contents_.size(); i++) { - output.writeMessage(4, contents_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getSystemInstruction()); - } - for (int i = 0; i < tools_.size(); i++) { - output.writeMessage(6, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getGenerationConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, model_); - } - for (int i = 0; i < contents_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, contents_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSystemInstruction()); - } - for (int i = 0; i < tools_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGenerationConfig()); - } - 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.vertexai.api.CountTokensRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CountTokensRequest other = - (com.google.cloud.vertexai.api.CountTokensRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getModel().equals(other.getModel())) return false; - if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!getContentsList().equals(other.getContentsList())) return false; - if (hasSystemInstruction() != other.hasSystemInstruction()) return false; - if (hasSystemInstruction()) { - if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; - } - if (!getToolsList().equals(other.getToolsList())) return false; - if (hasGenerationConfig() != other.hasGenerationConfig()) return false; - if (hasGenerationConfig()) { - if (!getGenerationConfig().equals(other.getGenerationConfig())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - if (getContentsCount() > 0) { - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContentsList().hashCode(); - } - if (hasSystemInstruction()) { - hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; - hash = (53 * hash) + getSystemInstruction().hashCode(); - } - if (getToolsCount() > 0) { - hash = (37 * hash) + TOOLS_FIELD_NUMBER; - hash = (53 * hash) + getToolsList().hashCode(); - } - if (hasGenerationConfig()) { - hash = (37 * hash) + GENERATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGenerationConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest 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.vertexai.api.CountTokensRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest 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.vertexai.api.CountTokensRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CountTokensRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for [PredictionService.CountTokens][].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CountTokensRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CountTokensRequest) - com.google.cloud.vertexai.api.CountTokensRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CountTokensRequest.class, - com.google.cloud.vertexai.api.CountTokensRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CountTokensRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInstancesFieldBuilder(); - internalGetContentsFieldBuilder(); - internalGetSystemInstructionFieldBuilder(); - internalGetToolsFieldBuilder(); - internalGetGenerationConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - model_ = ""; - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - } else { - instances_ = null; - instancesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - } else { - contents_ = null; - contentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - } else { - tools_ = null; - toolsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - generationConfig_ = null; - if (generationConfigBuilder_ != null) { - generationConfigBuilder_.dispose(); - generationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CountTokensRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensRequest build() { - com.google.cloud.vertexai.api.CountTokensRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensRequest buildPartial() { - com.google.cloud.vertexai.api.CountTokensRequest result = - new com.google.cloud.vertexai.api.CountTokensRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.CountTokensRequest result) { - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - if (contentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - contents_ = java.util.Collections.unmodifiableList(contents_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.contents_ = contents_; - } else { - result.contents_ = contentsBuilder_.build(); - } - if (toolsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - tools_ = java.util.Collections.unmodifiableList(tools_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.tools_ = tools_; - } else { - result.tools_ = toolsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.CountTokensRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.model_ = model_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.systemInstruction_ = - systemInstructionBuilder_ == null - ? systemInstruction_ - : systemInstructionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.generationConfig_ = - generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CountTokensRequest) { - return mergeFrom((com.google.cloud.vertexai.api.CountTokensRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CountTokensRequest other) { - if (other == com.google.cloud.vertexai.api.CountTokensRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000004); - instancesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInstancesFieldBuilder() - : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (contentsBuilder_ == null) { - if (!other.contents_.isEmpty()) { - if (contents_.isEmpty()) { - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureContentsIsMutable(); - contents_.addAll(other.contents_); - } - onChanged(); - } - } else { - if (!other.contents_.isEmpty()) { - if (contentsBuilder_.isEmpty()) { - contentsBuilder_.dispose(); - contentsBuilder_ = null; - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000008); - contentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetContentsFieldBuilder() - : null; - } else { - contentsBuilder_.addAllMessages(other.contents_); - } - } - } - if (other.hasSystemInstruction()) { - mergeSystemInstruction(other.getSystemInstruction()); - } - if (toolsBuilder_ == null) { - if (!other.tools_.isEmpty()) { - if (tools_.isEmpty()) { - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureToolsIsMutable(); - tools_.addAll(other.tools_); - } - onChanged(); - } - } else { - if (!other.tools_.isEmpty()) { - if (toolsBuilder_.isEmpty()) { - toolsBuilder_.dispose(); - toolsBuilder_ = null; - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000020); - toolsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetToolsFieldBuilder() - : null; - } else { - toolsBuilder_.addAllMessages(other.tools_); - } - } - } - if (other.hasGenerationConfig()) { - mergeGenerationConfig(other.getGenerationConfig()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(m); - } else { - instancesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 34: - { - com.google.cloud.vertexai.api.Content m = - input.readMessage( - com.google.cloud.vertexai.api.Content.parser(), extensionRegistry); - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(m); - } else { - contentsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - com.google.cloud.vertexai.api.Tool m = - input.readMessage( - com.google.cloud.vertexai.api.Tool.parser(), extensionRegistry); - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(m); - } else { - toolsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to perform token counting.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to perform token counting.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to perform token counting.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to perform token counting.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to perform token counting.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List instances_ = - java.util.Collections.emptyList(); - - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - instancesBuilder_; - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllInstances(java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder() { - return internalGetInstancesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The instances that are the input to token counting call.
-     * Schema is identical to the prediction schema of the underlying model.
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInstancesBuilderList() { - return internalGetInstancesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - instances_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private java.util.List contents_ = - java.util.Collections.emptyList(); - - private void ensureContentsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - contents_ = new java.util.ArrayList(contents_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentsBuilder_; - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getContentsList() { - if (contentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contents_); - } else { - return contentsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getContentsCount() { - if (contentsBuilder_ == null) { - return contents_.size(); - } else { - return contentsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content getContents(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.set(index, value); - onChanged(); - } else { - contentsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.set(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(value); - onChanged(); - } else { - contentsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(index, value); - onChanged(); - } else { - contentsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllContents( - java.lang.Iterable values) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contents_); - onChanged(); - } else { - contentsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearContents() { - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - contentsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeContents(int index) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.remove(index); - onChanged(); - } else { - contentsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getContentsBuilder(int index) { - return internalGetContentsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getContentsOrBuilderList() { - if (contentsBuilder_ != null) { - return contentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contents_); - } - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder() { - return internalGetContentsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder(int index) { - return internalGetContentsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Input content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getContentsBuilderList() { - return internalGetContentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentsFieldBuilder() { - if (contentsBuilder_ == null) { - contentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - contents_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - contents_ = null; - } - return contentsBuilder_; - } - - private com.google.cloud.vertexai.api.Content systemInstruction_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - systemInstructionBuilder_; - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - if (systemInstructionBuilder_ == null) { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } else { - return systemInstructionBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - systemInstruction_ = value; - } else { - systemInstructionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSystemInstruction( - com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (systemInstructionBuilder_ == null) { - systemInstruction_ = builderForValue.build(); - } else { - systemInstructionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && systemInstruction_ != null - && systemInstruction_ != com.google.cloud.vertexai.api.Content.getDefaultInstance()) { - getSystemInstructionBuilder().mergeFrom(value); - } else { - systemInstruction_ = value; - } - } else { - systemInstructionBuilder_.mergeFrom(value); - } - if (systemInstruction_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSystemInstruction() { - bitField0_ = (bitField0_ & ~0x00000010); - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getSystemInstructionBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetSystemInstructionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - if (systemInstructionBuilder_ != null) { - return systemInstructionBuilder_.getMessageOrBuilder(); - } else { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetSystemInstructionFieldBuilder() { - if (systemInstructionBuilder_ == null) { - systemInstructionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - getSystemInstruction(), getParentForChildren(), isClean()); - systemInstruction_ = null; - } - return systemInstructionBuilder_; - } - - private java.util.List tools_ = - java.util.Collections.emptyList(); - - private void ensureToolsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - tools_ = new java.util.ArrayList(tools_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - toolsBuilder_; - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getToolsList() { - if (toolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tools_); - } else { - return toolsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getToolsCount() { - if (toolsBuilder_ == null) { - return tools_.size(); - } else { - return toolsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool getTools(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.set(index, value); - onChanged(); - } else { - toolsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.set(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(value); - onChanged(); - } else { - toolsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(index, value); - onChanged(); - } else { - toolsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllTools( - java.lang.Iterable values) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); - onChanged(); - } else { - toolsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearTools() { - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - toolsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeTools(int index) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.remove(index); - onChanged(); - } else { - toolsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder getToolsBuilder(int index) { - return internalGetToolsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getToolsOrBuilderList() { - if (toolsBuilder_ != null) { - return toolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tools_); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder() { - return internalGetToolsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder(int index) { - return internalGetToolsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getToolsBuilderList() { - return internalGetToolsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - internalGetToolsFieldBuilder() { - if (toolsBuilder_ == null) { - toolsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder>( - tools_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); - tools_ = null; - } - return toolsBuilder_; - } - - private com.google.cloud.vertexai.api.GenerationConfig generationConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder> - generationConfigBuilder_; - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - public com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig() { - if (generationConfigBuilder_ == null) { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } else { - return generationConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenerationConfig(com.google.cloud.vertexai.api.GenerationConfig value) { - if (generationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - generationConfig_ = value; - } else { - generationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenerationConfig( - com.google.cloud.vertexai.api.GenerationConfig.Builder builderForValue) { - if (generationConfigBuilder_ == null) { - generationConfig_ = builderForValue.build(); - } else { - generationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGenerationConfig(com.google.cloud.vertexai.api.GenerationConfig value) { - if (generationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && generationConfig_ != null - && generationConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance()) { - getGenerationConfigBuilder().mergeFrom(value); - } else { - generationConfig_ = value; - } - } else { - generationConfigBuilder_.mergeFrom(value); - } - if (generationConfig_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGenerationConfig() { - bitField0_ = (bitField0_ & ~0x00000040); - generationConfig_ = null; - if (generationConfigBuilder_ != null) { - generationConfigBuilder_.dispose(); - generationConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.Builder getGenerationConfigBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetGenerationConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { - if (generationConfigBuilder_ != null) { - return generationConfigBuilder_.getMessageOrBuilder(); - } else { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - } - - /** - * - * - *
-     * Optional. Generation config that the model will use to generate the
-     * response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder> - internalGetGenerationConfigFieldBuilder() { - if (generationConfigBuilder_ == null) { - generationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder>( - getGenerationConfig(), getParentForChildren(), isClean()); - generationConfig_ = null; - } - return generationConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CountTokensRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CountTokensRequest) - private static final com.google.cloud.vertexai.api.CountTokensRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CountTokensRequest(); - } - - public static com.google.cloud.vertexai.api.CountTokensRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CountTokensRequest 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.vertexai.api.CountTokensRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java deleted file mode 100644 index 764be08fcb01..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CountTokensRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CountTokensRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to perform token counting.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to perform token counting.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Optional. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * string model = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInstancesList(); - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.Value getInstances(int index); - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getInstancesCount(); - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInstancesOrBuilderList(); - - /** - * - * - *
-   * Optional. The instances that are the input to token counting call.
-   * Schema is identical to the prediction schema of the underlying model.
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getContentsList(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Content getContents(int index); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getContentsCount(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getContentsOrBuilderList(); - - /** - * - * - *
-   * Optional. Input content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - boolean hasSystemInstruction(); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - com.google.cloud.vertexai.api.Content getSystemInstruction(); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getToolsList(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tool getTools(int index); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getToolsCount(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getToolsOrBuilderList(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - boolean hasGenerationConfig(); - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig(); - - /** - * - * - *
-   * Optional. Generation config that the model will use to generate the
-   * response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig generation_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java deleted file mode 100644 index 2f55ecfb1f96..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java +++ /dev/null @@ -1,1183 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for [PredictionService.CountTokens][].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CountTokensResponse} - */ -@com.google.protobuf.Generated -public final class CountTokensResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CountTokensResponse) - CountTokensResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CountTokensResponse"); - } - - // Use CountTokensResponse.newBuilder() to construct. - private CountTokensResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CountTokensResponse() { - promptTokensDetails_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CountTokensResponse.class, - com.google.cloud.vertexai.api.CountTokensResponse.Builder.class); - } - - public static final int TOTAL_TOKENS_FIELD_NUMBER = 1; - private int totalTokens_ = 0; - - /** - * - * - *
-   * The total number of tokens counted across all instances from the request.
-   * 
- * - * int32 total_tokens = 1; - * - * @return The totalTokens. - */ - @java.lang.Override - public int getTotalTokens() { - return totalTokens_; - } - - public static final int TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER = 2; - private int totalBillableCharacters_ = 0; - - /** - * - * - *
-   * The total number of billable characters counted across all instances from
-   * the request.
-   * 
- * - * int32 total_billable_characters = 2; - * - * @return The totalBillableCharacters. - */ - @java.lang.Override - public int getTotalBillableCharacters() { - return totalBillableCharacters_; - } - - public static final int PROMPT_TOKENS_DETAILS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List promptTokensDetails_; - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsList() { - return promptTokensDetails_; - } - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsOrBuilderList() { - return promptTokensDetails_; - } - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getPromptTokensDetailsCount() { - return promptTokensDetails_.size(); - } - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - return promptTokensDetails_.get(index); - } - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder( - int index) { - return promptTokensDetails_.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 (totalTokens_ != 0) { - output.writeInt32(1, totalTokens_); - } - if (totalBillableCharacters_ != 0) { - output.writeInt32(2, totalBillableCharacters_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - output.writeMessage(3, promptTokensDetails_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (totalTokens_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, totalTokens_); - } - if (totalBillableCharacters_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalBillableCharacters_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, promptTokensDetails_.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.vertexai.api.CountTokensResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CountTokensResponse other = - (com.google.cloud.vertexai.api.CountTokensResponse) obj; - - if (getTotalTokens() != other.getTotalTokens()) return false; - if (getTotalBillableCharacters() != other.getTotalBillableCharacters()) return false; - if (!getPromptTokensDetailsList().equals(other.getPromptTokensDetailsList())) 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) + TOTAL_TOKENS_FIELD_NUMBER; - hash = (53 * hash) + getTotalTokens(); - hash = (37 * hash) + TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER; - hash = (53 * hash) + getTotalBillableCharacters(); - if (getPromptTokensDetailsCount() > 0) { - hash = (37 * hash) + PROMPT_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getPromptTokensDetailsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse 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.vertexai.api.CountTokensResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse 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.vertexai.api.CountTokensResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CountTokensResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for [PredictionService.CountTokens][].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CountTokensResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CountTokensResponse) - com.google.cloud.vertexai.api.CountTokensResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CountTokensResponse.class, - com.google.cloud.vertexai.api.CountTokensResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CountTokensResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - totalTokens_ = 0; - totalBillableCharacters_ = 0; - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - } else { - promptTokensDetails_ = null; - promptTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CountTokensResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensResponse build() { - com.google.cloud.vertexai.api.CountTokensResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CountTokensResponse buildPartial() { - com.google.cloud.vertexai.api.CountTokensResponse result = - new com.google.cloud.vertexai.api.CountTokensResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.CountTokensResponse result) { - if (promptTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - promptTokensDetails_ = java.util.Collections.unmodifiableList(promptTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.promptTokensDetails_ = promptTokensDetails_; - } else { - result.promptTokensDetails_ = promptTokensDetailsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.CountTokensResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.totalTokens_ = totalTokens_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.totalBillableCharacters_ = totalBillableCharacters_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CountTokensResponse) { - return mergeFrom((com.google.cloud.vertexai.api.CountTokensResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CountTokensResponse other) { - if (other == com.google.cloud.vertexai.api.CountTokensResponse.getDefaultInstance()) - return this; - if (other.getTotalTokens() != 0) { - setTotalTokens(other.getTotalTokens()); - } - if (other.getTotalBillableCharacters() != 0) { - setTotalBillableCharacters(other.getTotalBillableCharacters()); - } - if (promptTokensDetailsBuilder_ == null) { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetails_.isEmpty()) { - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.addAll(other.promptTokensDetails_); - } - onChanged(); - } - } else { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetailsBuilder_.isEmpty()) { - promptTokensDetailsBuilder_.dispose(); - promptTokensDetailsBuilder_ = null; - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000004); - promptTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPromptTokensDetailsFieldBuilder() - : null; - } else { - promptTokensDetailsBuilder_.addAllMessages(other.promptTokensDetails_); - } - } - } - 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: - { - totalTokens_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - totalBillableCharacters_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(m); - } else { - promptTokensDetailsBuilder_.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 int totalTokens_; - - /** - * - * - *
-     * The total number of tokens counted across all instances from the request.
-     * 
- * - * int32 total_tokens = 1; - * - * @return The totalTokens. - */ - @java.lang.Override - public int getTotalTokens() { - return totalTokens_; - } - - /** - * - * - *
-     * The total number of tokens counted across all instances from the request.
-     * 
- * - * int32 total_tokens = 1; - * - * @param value The totalTokens to set. - * @return This builder for chaining. - */ - public Builder setTotalTokens(int value) { - - totalTokens_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The total number of tokens counted across all instances from the request.
-     * 
- * - * int32 total_tokens = 1; - * - * @return This builder for chaining. - */ - public Builder clearTotalTokens() { - bitField0_ = (bitField0_ & ~0x00000001); - totalTokens_ = 0; - onChanged(); - return this; - } - - private int totalBillableCharacters_; - - /** - * - * - *
-     * The total number of billable characters counted across all instances from
-     * the request.
-     * 
- * - * int32 total_billable_characters = 2; - * - * @return The totalBillableCharacters. - */ - @java.lang.Override - public int getTotalBillableCharacters() { - return totalBillableCharacters_; - } - - /** - * - * - *
-     * The total number of billable characters counted across all instances from
-     * the request.
-     * 
- * - * int32 total_billable_characters = 2; - * - * @param value The totalBillableCharacters to set. - * @return This builder for chaining. - */ - public Builder setTotalBillableCharacters(int value) { - - totalBillableCharacters_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The total number of billable characters counted across all instances from
-     * the request.
-     * 
- * - * int32 total_billable_characters = 2; - * - * @return This builder for chaining. - */ - public Builder clearTotalBillableCharacters() { - bitField0_ = (bitField0_ & ~0x00000002); - totalBillableCharacters_ = 0; - onChanged(); - return this; - } - - private java.util.List promptTokensDetails_ = - java.util.Collections.emptyList(); - - private void ensurePromptTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - promptTokensDetails_ = - new java.util.ArrayList( - promptTokensDetails_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - promptTokensDetailsBuilder_; - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsList() { - if (promptTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } else { - return promptTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getPromptTokensDetailsCount() { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.size(); - } else { - return promptTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails(com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllPromptTokensDetails( - java.lang.Iterable values) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTokensDetails_); - onChanged(); - } else { - promptTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPromptTokensDetails() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - promptTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removePromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.remove(index); - onChanged(); - } else { - promptTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder getPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getPromptTokensDetailsOrBuilder(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsOrBuilderList() { - if (promptTokensDetailsBuilder_ != null) { - return promptTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addPromptTokensDetailsBuilder() { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsBuilderList() { - return internalGetPromptTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetPromptTokensDetailsFieldBuilder() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - promptTokensDetails_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - promptTokensDetails_ = null; - } - return promptTokensDetailsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CountTokensResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CountTokensResponse) - private static final com.google.cloud.vertexai.api.CountTokensResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CountTokensResponse(); - } - - public static com.google.cloud.vertexai.api.CountTokensResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CountTokensResponse 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.vertexai.api.CountTokensResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java deleted file mode 100644 index 3d3078b58c38..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CountTokensResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CountTokensResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The total number of tokens counted across all instances from the request.
-   * 
- * - * int32 total_tokens = 1; - * - * @return The totalTokens. - */ - int getTotalTokens(); - - /** - * - * - *
-   * The total number of billable characters counted across all instances from
-   * the request.
-   * 
- * - * int32 total_billable_characters = 2; - * - * @return The totalBillableCharacters. - */ - int getTotalBillableCharacters(); - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPromptTokensDetailsList(); - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index); - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPromptTokensDetailsCount(); - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getPromptTokensDetailsOrBuilderList(); - - /** - * - * - *
-   * Output only. List of modalities that were processed in the request input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder( - int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java deleted file mode 100644 index 0c85194fb5c2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java +++ /dev/null @@ -1,892 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Runtime operation information for
- * [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CreateEndpointOperationMetadata} - */ -@com.google.protobuf.Generated -public final class CreateEndpointOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CreateEndpointOperationMetadata) - CreateEndpointOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CreateEndpointOperationMetadata"); - } - - // Use CreateEndpointOperationMetadata.newBuilder() to construct. - private CreateEndpointOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CreateEndpointOperationMetadata() { - deploymentStage_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.class, - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - public static final int DEPLOYMENT_STAGE_FIELD_NUMBER = 2; - private int deploymentStage_ = 0; - - /** - * - * - *
-   * Output only. The deployment stage of the model. Only populated if this
-   * CreateEndpoint request deploys a model at the same time.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - @java.lang.Override - public int getDeploymentStageValue() { - return deploymentStage_; - } - - /** - * - * - *
-   * Output only. The deployment stage of the model. Only populated if this
-   * CreateEndpoint request deploys a model at the same time.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage() { - com.google.cloud.vertexai.api.DeploymentStage result = - com.google.cloud.vertexai.api.DeploymentStage.forNumber(deploymentStage_); - return result == null ? com.google.cloud.vertexai.api.DeploymentStage.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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getGenericMetadata()); - } - if (deploymentStage_ - != com.google.cloud.vertexai.api.DeploymentStage.DEPLOYMENT_STAGE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, deploymentStage_); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - if (deploymentStage_ - != com.google.cloud.vertexai.api.DeploymentStage.DEPLOYMENT_STAGE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, deploymentStage_); - } - 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.vertexai.api.CreateEndpointOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata other = - (com.google.cloud.vertexai.api.CreateEndpointOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; - } - if (deploymentStage_ != other.deploymentStage_) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (37 * hash) + DEPLOYMENT_STAGE_FIELD_NUMBER; - hash = (53 * hash) + deploymentStage_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata 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.vertexai.api.CreateEndpointOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata 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.vertexai.api.CreateEndpointOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CreateEndpointOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Runtime operation information for
-   * [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CreateEndpointOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CreateEndpointOperationMetadata) - com.google.cloud.vertexai.api.CreateEndpointOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.class, - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - deploymentStage_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointOperationMetadata build() { - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata result = - new com.google.cloud.vertexai.api.CreateEndpointOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.CreateEndpointOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deploymentStage_ = deploymentStage_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CreateEndpointOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.CreateEndpointOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CreateEndpointOperationMetadata other) { - if (other - == com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.getDefaultInstance()) - return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - if (other.deploymentStage_ != 0) { - setDeploymentStageValue(other.getDeploymentStageValue()); - } - 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( - internalGetGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - deploymentStage_ = input.readEnum(); - 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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - private int deploymentStage_ = 0; - - /** - * - * - *
-     * Output only. The deployment stage of the model. Only populated if this
-     * CreateEndpoint request deploys a model at the same time.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - @java.lang.Override - public int getDeploymentStageValue() { - return deploymentStage_; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model. Only populated if this
-     * CreateEndpoint request deploys a model at the same time.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for deploymentStage to set. - * @return This builder for chaining. - */ - public Builder setDeploymentStageValue(int value) { - deploymentStage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model. Only populated if this
-     * CreateEndpoint request deploys a model at the same time.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage() { - com.google.cloud.vertexai.api.DeploymentStage result = - com.google.cloud.vertexai.api.DeploymentStage.forNumber(deploymentStage_); - return result == null ? com.google.cloud.vertexai.api.DeploymentStage.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model. Only populated if this
-     * CreateEndpoint request deploys a model at the same time.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The deploymentStage to set. - * @return This builder for chaining. - */ - public Builder setDeploymentStage(com.google.cloud.vertexai.api.DeploymentStage value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - deploymentStage_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model. Only populated if this
-     * CreateEndpoint request deploys a model at the same time.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDeploymentStage() { - bitField0_ = (bitField0_ & ~0x00000002); - deploymentStage_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CreateEndpointOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CreateEndpointOperationMetadata) - private static final com.google.cloud.vertexai.api.CreateEndpointOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CreateEndpointOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.CreateEndpointOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateEndpointOperationMetadata 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.vertexai.api.CreateEndpointOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java deleted file mode 100644 index c0d4d31a4e65..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CreateEndpointOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CreateEndpointOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. The deployment stage of the model. Only populated if this
-   * CreateEndpoint request deploys a model at the same time.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - int getDeploymentStageValue(); - - /** - * - * - *
-   * Output only. The deployment stage of the model. Only populated if this
-   * CreateEndpoint request deploys a model at the same time.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java deleted file mode 100644 index 4bf4a0e51066..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java +++ /dev/null @@ -1,1215 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CreateEndpointRequest} - */ -@com.google.protobuf.Generated -public final class CreateEndpointRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CreateEndpointRequest) - CreateEndpointRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CreateEndpointRequest"); - } - - // Use CreateEndpointRequest.newBuilder() to construct. - private CreateEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CreateEndpointRequest() { - parent_ = ""; - endpointId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CreateEndpointRequest.class, - com.google.cloud.vertexai.api.CreateEndpointRequest.Builder.class); - } - - private int bitField0_; - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - - /** - * - * - *
-   * Required. The resource name of the Location to create the Endpoint in.
-   * Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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 Location to create the Endpoint in.
-   * Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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 ENDPOINT_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Endpoint endpoint_; - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - @java.lang.Override - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - public static final int ENDPOINT_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpointId_ = ""; - - /** - * - * - *
-   * Immutable. The ID to use for endpoint, which will become the final
-   * component of the endpoint resource name.
-   * If not provided, Vertex AI will generate a value for this ID.
-   *
-   * If the first character is a letter, this value may be up to 63 characters,
-   * and valid characters are `[a-z0-9-]`. The last character must be a letter
-   * or number.
-   *
-   * If the first character is a number, this value may be up to 9 characters,
-   * and valid characters are `[0-9]` with no leading zeros.
-   *
-   * When using HTTP/JSON, this field is populated
-   * based on a query string argument, such as `?endpoint_id=12345`. This is the
-   * fallback for fields that are not included in either the URI or the body.
-   * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The endpointId. - */ - @java.lang.Override - public java.lang.String getEndpointId() { - java.lang.Object ref = endpointId_; - 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(); - endpointId_ = s; - return s; - } - } - - /** - * - * - *
-   * Immutable. The ID to use for endpoint, which will become the final
-   * component of the endpoint resource name.
-   * If not provided, Vertex AI will generate a value for this ID.
-   *
-   * If the first character is a letter, this value may be up to 63 characters,
-   * and valid characters are `[a-z0-9-]`. The last character must be a letter
-   * or number.
-   *
-   * If the first character is a number, this value may be up to 9 characters,
-   * and valid characters are `[0-9]` with no leading zeros.
-   *
-   * When using HTTP/JSON, this field is populated
-   * based on a query string argument, such as `?endpoint_id=12345`. This is the
-   * fallback for fields that are not included in either the URI or the body.
-   * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for endpointId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointIdBytes() { - java.lang.Object ref = endpointId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getEndpoint()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, endpointId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndpoint()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, endpointId_); - } - 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.vertexai.api.CreateEndpointRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CreateEndpointRequest other = - (com.google.cloud.vertexai.api.CreateEndpointRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasEndpoint() != other.hasEndpoint()) return false; - if (hasEndpoint()) { - if (!getEndpoint().equals(other.getEndpoint())) return false; - } - if (!getEndpointId().equals(other.getEndpointId())) 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 (hasEndpoint()) { - hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - } - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest 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.vertexai.api.CreateEndpointRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest 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.vertexai.api.CreateEndpointRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CreateEndpointRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CreateEndpointRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CreateEndpointRequest) - com.google.cloud.vertexai.api.CreateEndpointRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CreateEndpointRequest.class, - com.google.cloud.vertexai.api.CreateEndpointRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CreateEndpointRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetEndpointFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = null; - } - endpointId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CreateEndpointRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointRequest build() { - com.google.cloud.vertexai.api.CreateEndpointRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CreateEndpointRequest buildPartial() { - com.google.cloud.vertexai.api.CreateEndpointRequest result = - new com.google.cloud.vertexai.api.CreateEndpointRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CreateEndpointRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endpointId_ = endpointId_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CreateEndpointRequest) { - return mergeFrom((com.google.cloud.vertexai.api.CreateEndpointRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CreateEndpointRequest other) { - if (other == com.google.cloud.vertexai.api.CreateEndpointRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasEndpoint()) { - mergeEndpoint(other.getEndpoint()); - } - if (!other.getEndpointId().isEmpty()) { - endpointId_ = other.endpointId_; - 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( - internalGetEndpointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - endpointId_ = input.readStringRequireUtf8(); - 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 parent_ = ""; - - /** - * - * - *
-     * Required. The resource name of the Location to create the Endpoint in.
-     * Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location to create the Endpoint in.
-     * Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location to create the Endpoint in.
-     * Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location to create the Endpoint in.
-     * Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location to create the Endpoint in.
-     * Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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.vertexai.api.Endpoint endpoint_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - endpointBuilder_; - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - if (endpointBuilder_ == null) { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } else { - return endpointBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - } else { - endpointBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointBuilder_ == null) { - endpoint_ = builderForValue.build(); - } else { - endpointBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endpoint_ != null - && endpoint_ != com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()) { - getEndpointBuilder().mergeFrom(value); - } else { - endpoint_ = value; - } - } else { - endpointBuilder_.mergeFrom(value); - } - if (endpoint_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearEndpoint() { - bitField0_ = (bitField0_ & ~0x00000002); - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Endpoint.Builder getEndpointBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetEndpointFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - if (endpointBuilder_ != null) { - return endpointBuilder_.getMessageOrBuilder(); - } else { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - } - - /** - * - * - *
-     * Required. The Endpoint to create.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - internalGetEndpointFieldBuilder() { - if (endpointBuilder_ == null) { - endpointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder>( - getEndpoint(), getParentForChildren(), isClean()); - endpoint_ = null; - } - return endpointBuilder_; - } - - private java.lang.Object endpointId_ = ""; - - /** - * - * - *
-     * Immutable. The ID to use for endpoint, which will become the final
-     * component of the endpoint resource name.
-     * If not provided, Vertex AI will generate a value for this ID.
-     *
-     * If the first character is a letter, this value may be up to 63 characters,
-     * and valid characters are `[a-z0-9-]`. The last character must be a letter
-     * or number.
-     *
-     * If the first character is a number, this value may be up to 9 characters,
-     * and valid characters are `[0-9]` with no leading zeros.
-     *
-     * When using HTTP/JSON, this field is populated
-     * based on a query string argument, such as `?endpoint_id=12345`. This is the
-     * fallback for fields that are not included in either the URI or the body.
-     * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The endpointId. - */ - public java.lang.String getEndpointId() { - java.lang.Object ref = endpointId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Immutable. The ID to use for endpoint, which will become the final
-     * component of the endpoint resource name.
-     * If not provided, Vertex AI will generate a value for this ID.
-     *
-     * If the first character is a letter, this value may be up to 63 characters,
-     * and valid characters are `[a-z0-9-]`. The last character must be a letter
-     * or number.
-     *
-     * If the first character is a number, this value may be up to 9 characters,
-     * and valid characters are `[0-9]` with no leading zeros.
-     *
-     * When using HTTP/JSON, this field is populated
-     * based on a query string argument, such as `?endpoint_id=12345`. This is the
-     * fallback for fields that are not included in either the URI or the body.
-     * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for endpointId. - */ - public com.google.protobuf.ByteString getEndpointIdBytes() { - java.lang.Object ref = endpointId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpointId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Immutable. The ID to use for endpoint, which will become the final
-     * component of the endpoint resource name.
-     * If not provided, Vertex AI will generate a value for this ID.
-     *
-     * If the first character is a letter, this value may be up to 63 characters,
-     * and valid characters are `[a-z0-9-]`. The last character must be a letter
-     * or number.
-     *
-     * If the first character is a number, this value may be up to 9 characters,
-     * and valid characters are `[0-9]` with no leading zeros.
-     *
-     * When using HTTP/JSON, this field is populated
-     * based on a query string argument, such as `?endpoint_id=12345`. This is the
-     * fallback for fields that are not included in either the URI or the body.
-     * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The endpointId to set. - * @return This builder for chaining. - */ - public Builder setEndpointId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The ID to use for endpoint, which will become the final
-     * component of the endpoint resource name.
-     * If not provided, Vertex AI will generate a value for this ID.
-     *
-     * If the first character is a letter, this value may be up to 63 characters,
-     * and valid characters are `[a-z0-9-]`. The last character must be a letter
-     * or number.
-     *
-     * If the first character is a number, this value may be up to 9 characters,
-     * and valid characters are `[0-9]` with no leading zeros.
-     *
-     * When using HTTP/JSON, this field is populated
-     * based on a query string argument, such as `?endpoint_id=12345`. This is the
-     * fallback for fields that are not included in either the URI or the body.
-     * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearEndpointId() { - endpointId_ = getDefaultInstance().getEndpointId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The ID to use for endpoint, which will become the final
-     * component of the endpoint resource name.
-     * If not provided, Vertex AI will generate a value for this ID.
-     *
-     * If the first character is a letter, this value may be up to 63 characters,
-     * and valid characters are `[a-z0-9-]`. The last character must be a letter
-     * or number.
-     *
-     * If the first character is a number, this value may be up to 9 characters,
-     * and valid characters are `[0-9]` with no leading zeros.
-     *
-     * When using HTTP/JSON, this field is populated
-     * based on a query string argument, such as `?endpoint_id=12345`. This is the
-     * fallback for fields that are not included in either the URI or the body.
-     * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for endpointId to set. - * @return This builder for chaining. - */ - public Builder setEndpointIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpointId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CreateEndpointRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CreateEndpointRequest) - private static final com.google.cloud.vertexai.api.CreateEndpointRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CreateEndpointRequest(); - } - - public static com.google.cloud.vertexai.api.CreateEndpointRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateEndpointRequest 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.vertexai.api.CreateEndpointRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java deleted file mode 100644 index bb14e2ebef3f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CreateEndpointRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CreateEndpointRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the Location to create the Endpoint in.
-   * Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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 Location to create the Endpoint in.
-   * Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - boolean hasEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - com.google.cloud.vertexai.api.Endpoint getEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint to create.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder(); - - /** - * - * - *
-   * Immutable. The ID to use for endpoint, which will become the final
-   * component of the endpoint resource name.
-   * If not provided, Vertex AI will generate a value for this ID.
-   *
-   * If the first character is a letter, this value may be up to 63 characters,
-   * and valid characters are `[a-z0-9-]`. The last character must be a letter
-   * or number.
-   *
-   * If the first character is a number, this value may be up to 9 characters,
-   * and valid characters are `[0-9]` with no leading zeros.
-   *
-   * When using HTTP/JSON, this field is populated
-   * based on a query string argument, such as `?endpoint_id=12345`. This is the
-   * fallback for fields that are not included in either the URI or the body.
-   * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The endpointId. - */ - java.lang.String getEndpointId(); - - /** - * - * - *
-   * Immutable. The ID to use for endpoint, which will become the final
-   * component of the endpoint resource name.
-   * If not provided, Vertex AI will generate a value for this ID.
-   *
-   * If the first character is a letter, this value may be up to 63 characters,
-   * and valid characters are `[a-z0-9-]`. The last character must be a letter
-   * or number.
-   *
-   * If the first character is a number, this value may be up to 9 characters,
-   * and valid characters are `[0-9]` with no leading zeros.
-   *
-   * When using HTTP/JSON, this field is populated
-   * based on a query string argument, such as `?endpoint_id=12345`. This is the
-   * fallback for fields that are not included in either the URI or the body.
-   * 
- * - * string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for endpointId. - */ - com.google.protobuf.ByteString getEndpointIdBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java deleted file mode 100644 index c7dfc03df780..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The storage details for CSV output content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CsvDestination} - */ -@com.google.protobuf.Generated -public final class CsvDestination extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CsvDestination) - CsvDestinationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CsvDestination"); - } - - // Use CsvDestination.newBuilder() to construct. - private CsvDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CsvDestination() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CsvDestination.class, - com.google.cloud.vertexai.api.CsvDestination.Builder.class); - } - - private int bitField0_; - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GcsDestination gcsDestination_; - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination getGcsDestination() { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - - 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.writeMessage(1, getGcsDestination()); - } - 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.computeMessageSize(1, getGcsDestination()); - } - 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.vertexai.api.CsvDestination)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CsvDestination other = - (com.google.cloud.vertexai.api.CsvDestination) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination().equals(other.getGcsDestination())) 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 (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvDestination 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.vertexai.api.CsvDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvDestination 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.vertexai.api.CsvDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CsvDestination 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The storage details for CSV output content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CsvDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CsvDestination) - com.google.cloud.vertexai.api.CsvDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CsvDestination.class, - com.google.cloud.vertexai.api.CsvDestination.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CsvDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGcsDestinationFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - gcsDestination_ = null; - if (gcsDestinationBuilder_ != null) { - gcsDestinationBuilder_.dispose(); - gcsDestinationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvDestination getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CsvDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvDestination build() { - com.google.cloud.vertexai.api.CsvDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvDestination buildPartial() { - com.google.cloud.vertexai.api.CsvDestination result = - new com.google.cloud.vertexai.api.CsvDestination(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CsvDestination result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.gcsDestination_ = - gcsDestinationBuilder_ == null ? gcsDestination_ : gcsDestinationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CsvDestination) { - return mergeFrom((com.google.cloud.vertexai.api.CsvDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CsvDestination other) { - if (other == com.google.cloud.vertexai.api.CsvDestination.getDefaultInstance()) return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - 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( - internalGetGcsDestinationFieldBuilder().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.vertexai.api.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - public com.google.cloud.vertexai.api.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsDestination(com.google.cloud.vertexai.api.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - } else { - gcsDestinationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsDestination( - com.google.cloud.vertexai.api.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGcsDestination(com.google.cloud.vertexai.api.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && gcsDestination_ != null - && gcsDestination_ - != com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance()) { - getGcsDestinationBuilder().mergeFrom(value); - } else { - gcsDestination_ = value; - } - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - if (gcsDestination_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGcsDestination() { - bitField0_ = (bitField0_ & ~0x00000001); - gcsDestination_ = null; - if (gcsDestinationBuilder_ != null) { - gcsDestinationBuilder_.dispose(); - gcsDestinationBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsDestination.Builder getGcsDestinationBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGcsDestinationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - internalGetGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder>( - getGcsDestination(), getParentForChildren(), isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CsvDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CsvDestination) - private static final com.google.cloud.vertexai.api.CsvDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CsvDestination(); - } - - public static com.google.cloud.vertexai.api.CsvDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CsvDestination 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.vertexai.api.CsvDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java deleted file mode 100644 index 3f05c6a3e391..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CsvDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CsvDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - com.google.cloud.vertexai.api.GcsDestination getGcsDestination(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java deleted file mode 100644 index 4f17bd7d2d9f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java +++ /dev/null @@ -1,720 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The storage details for CSV input content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CsvSource} - */ -@com.google.protobuf.Generated -public final class CsvSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.CsvSource) - CsvSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CsvSource"); - } - - // Use CsvSource.newBuilder() to construct. - private CsvSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CsvSource() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CsvSource.class, - com.google.cloud.vertexai.api.CsvSource.Builder.class); - } - - private int bitField0_; - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GcsSource gcsSource_; - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - 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.writeMessage(1, getGcsSource()); - } - 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.computeMessageSize(1, getGcsSource()); - } - 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.vertexai.api.CsvSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.CsvSource other = (com.google.cloud.vertexai.api.CsvSource) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource().equals(other.getGcsSource())) 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 (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvSource 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.vertexai.api.CsvSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvSource 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.vertexai.api.CsvSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.CsvSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.CsvSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The storage details for CSV input content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.CsvSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.CsvSource) - com.google.cloud.vertexai.api.CsvSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.CsvSource.class, - com.google.cloud.vertexai.api.CsvSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.CsvSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGcsSourceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_CsvSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.CsvSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvSource build() { - com.google.cloud.vertexai.api.CsvSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.CsvSource buildPartial() { - com.google.cloud.vertexai.api.CsvSource result = - new com.google.cloud.vertexai.api.CsvSource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.CsvSource result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.CsvSource) { - return mergeFrom((com.google.cloud.vertexai.api.CsvSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.CsvSource other) { - if (other == com.google.cloud.vertexai.api.CsvSource.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - 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( - internalGetGcsSourceFieldBuilder().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.vertexai.api.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - gcsSourceBuilder_; - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - } else { - gcsSourceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && gcsSource_ != null - && gcsSource_ != com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) { - getGcsSourceBuilder().mergeFrom(value); - } else { - gcsSource_ = value; - } - } else { - gcsSourceBuilder_.mergeFrom(value); - } - if (gcsSource_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGcsSource() { - bitField0_ = (bitField0_ & ~0x00000001); - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsSource.Builder getGcsSourceBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - internalGetGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder>( - getGcsSource(), getParentForChildren(), isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.CsvSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.CsvSource) - private static final com.google.cloud.vertexai.api.CsvSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.CsvSource(); - } - - public static com.google.cloud.vertexai.api.CsvSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CsvSource 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.vertexai.api.CsvSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java deleted file mode 100644 index 959130b7d915..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface CsvSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.CsvSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsSource. - */ - com.google.cloud.vertexai.api.GcsSource getGcsSource(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java deleted file mode 100644 index 3c0d3e742521..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java +++ /dev/null @@ -1,2302 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A description of resources that are dedicated to a DeployedModel or
- * DeployedIndex, and that need a higher degree of manual configuration.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DedicatedResources} - */ -@com.google.protobuf.Generated -public final class DedicatedResources extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DedicatedResources) - DedicatedResourcesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DedicatedResources"); - } - - // Use DedicatedResources.newBuilder() to construct. - private DedicatedResources(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DedicatedResources() { - autoscalingMetricSpecs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DedicatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DedicatedResources.class, - com.google.cloud.vertexai.api.DedicatedResources.Builder.class); - } - - private int bitField0_; - public static final int MACHINE_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.MachineSpec machineSpec_; - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - @java.lang.Override - public boolean hasMachineSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpec getMachineSpec() { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder() { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - - public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 2; - private int minReplicaCount_ = 0; - - /** - * - * - *
-   * Required. Immutable. The minimum number of machine replicas that will be
-   * always deployed on. This value must be greater than or equal to 1.
-   *
-   * If traffic increases, it may dynamically be deployed onto more replicas,
-   * and as traffic decreases, some of these extra replicas may be freed.
-   * 
- * - * - * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The minReplicaCount. - */ - @java.lang.Override - public int getMinReplicaCount() { - return minReplicaCount_; - } - - public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 3; - private int maxReplicaCount_ = 0; - - /** - * - * - *
-   * Immutable. The maximum number of replicas that may be deployed on when the
-   * traffic against it increases. If the requested value is too large, the
-   * deployment will error, but if deployment succeeds then the ability to scale
-   * to that many replicas is guaranteed (barring service outages). If traffic
-   * increases beyond what its replicas at maximum may handle, a portion of the
-   * traffic will be dropped. If this value is not provided, will use
-   * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
-   * as the default value.
-   *
-   * The value of this field impacts the charge against Vertex CPU and GPU
-   * quotas. Specifically, you will be charged for (max_replica_count *
-   * number of cores in the selected machine type) and (max_replica_count *
-   * number of GPUs per replica in the selected machine type).
-   * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - public static final int REQUIRED_REPLICA_COUNT_FIELD_NUMBER = 9; - private int requiredReplicaCount_ = 0; - - /** - * - * - *
-   * Optional. Number of required available replicas for the deployment to
-   * succeed. This field is only needed when partial deployment/mutation is
-   * desired. If set, the deploy/mutate operation will succeed once
-   * available_replica_count reaches required_replica_count, and the rest of
-   * the replicas will be retried. If not set, the default
-   * required_replica_count will be min_replica_count.
-   * 
- * - * int32 required_replica_count = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requiredReplicaCount. - */ - @java.lang.Override - public int getRequiredReplicaCount() { - return requiredReplicaCount_; - } - - public static final int AUTOSCALING_METRIC_SPECS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List - autoscalingMetricSpecs_; - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getAutoscalingMetricSpecsList() { - return autoscalingMetricSpecs_; - } - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public java.util.List - getAutoscalingMetricSpecsOrBuilderList() { - return autoscalingMetricSpecs_; - } - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public int getAutoscalingMetricSpecsCount() { - return autoscalingMetricSpecs_.size(); - } - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutoscalingMetricSpec getAutoscalingMetricSpecs(int index) { - return autoscalingMetricSpecs_.get(index); - } - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder - getAutoscalingMetricSpecsOrBuilder(int index) { - return autoscalingMetricSpecs_.get(index); - } - - public static final int SPOT_FIELD_NUMBER = 5; - private boolean spot_ = false; - - /** - * - * - *
-   * Optional. If true, schedule the deployment workload on [spot
-   * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
-   * 
- * - * bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The spot. - */ - @java.lang.Override - public boolean getSpot() { - return spot_; - } - - 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.writeMessage(1, getMachineSpec()); - } - if (minReplicaCount_ != 0) { - output.writeInt32(2, minReplicaCount_); - } - if (maxReplicaCount_ != 0) { - output.writeInt32(3, maxReplicaCount_); - } - for (int i = 0; i < autoscalingMetricSpecs_.size(); i++) { - output.writeMessage(4, autoscalingMetricSpecs_.get(i)); - } - if (spot_ != false) { - output.writeBool(5, spot_); - } - if (requiredReplicaCount_ != 0) { - output.writeInt32(9, requiredReplicaCount_); - } - 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.computeMessageSize(1, getMachineSpec()); - } - if (minReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minReplicaCount_); - } - if (maxReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_); - } - for (int i = 0; i < autoscalingMetricSpecs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, autoscalingMetricSpecs_.get(i)); - } - if (spot_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, spot_); - } - if (requiredReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, requiredReplicaCount_); - } - 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.vertexai.api.DedicatedResources)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DedicatedResources other = - (com.google.cloud.vertexai.api.DedicatedResources) obj; - - if (hasMachineSpec() != other.hasMachineSpec()) return false; - if (hasMachineSpec()) { - if (!getMachineSpec().equals(other.getMachineSpec())) return false; - } - if (getMinReplicaCount() != other.getMinReplicaCount()) return false; - if (getMaxReplicaCount() != other.getMaxReplicaCount()) return false; - if (getRequiredReplicaCount() != other.getRequiredReplicaCount()) return false; - if (!getAutoscalingMetricSpecsList().equals(other.getAutoscalingMetricSpecsList())) - return false; - if (getSpot() != other.getSpot()) 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 (hasMachineSpec()) { - hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getMachineSpec().hashCode(); - } - hash = (37 * hash) + MIN_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMinReplicaCount(); - hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxReplicaCount(); - hash = (37 * hash) + REQUIRED_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getRequiredReplicaCount(); - if (getAutoscalingMetricSpecsCount() > 0) { - hash = (37 * hash) + AUTOSCALING_METRIC_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getAutoscalingMetricSpecsList().hashCode(); - } - hash = (37 * hash) + SPOT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSpot()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DedicatedResources 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.vertexai.api.DedicatedResources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DedicatedResources 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.vertexai.api.DedicatedResources parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DedicatedResources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DedicatedResources 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A description of resources that are dedicated to a DeployedModel or
-   * DeployedIndex, and that need a higher degree of manual configuration.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DedicatedResources} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DedicatedResources) - com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DedicatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DedicatedResources.class, - com.google.cloud.vertexai.api.DedicatedResources.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DedicatedResources.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetMachineSpecFieldBuilder(); - internalGetAutoscalingMetricSpecsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - machineSpec_ = null; - if (machineSpecBuilder_ != null) { - machineSpecBuilder_.dispose(); - machineSpecBuilder_ = null; - } - minReplicaCount_ = 0; - maxReplicaCount_ = 0; - requiredReplicaCount_ = 0; - if (autoscalingMetricSpecsBuilder_ == null) { - autoscalingMetricSpecs_ = java.util.Collections.emptyList(); - } else { - autoscalingMetricSpecs_ = null; - autoscalingMetricSpecsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - spot_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResources getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResources build() { - com.google.cloud.vertexai.api.DedicatedResources result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResources buildPartial() { - com.google.cloud.vertexai.api.DedicatedResources result = - new com.google.cloud.vertexai.api.DedicatedResources(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.DedicatedResources result) { - if (autoscalingMetricSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - autoscalingMetricSpecs_ = java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.autoscalingMetricSpecs_ = autoscalingMetricSpecs_; - } else { - result.autoscalingMetricSpecs_ = autoscalingMetricSpecsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.DedicatedResources result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.machineSpec_ = - machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.minReplicaCount_ = minReplicaCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.maxReplicaCount_ = maxReplicaCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.requiredReplicaCount_ = requiredReplicaCount_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.spot_ = spot_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DedicatedResources) { - return mergeFrom((com.google.cloud.vertexai.api.DedicatedResources) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DedicatedResources other) { - if (other == com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance()) - return this; - if (other.hasMachineSpec()) { - mergeMachineSpec(other.getMachineSpec()); - } - if (other.getMinReplicaCount() != 0) { - setMinReplicaCount(other.getMinReplicaCount()); - } - if (other.getMaxReplicaCount() != 0) { - setMaxReplicaCount(other.getMaxReplicaCount()); - } - if (other.getRequiredReplicaCount() != 0) { - setRequiredReplicaCount(other.getRequiredReplicaCount()); - } - if (autoscalingMetricSpecsBuilder_ == null) { - if (!other.autoscalingMetricSpecs_.isEmpty()) { - if (autoscalingMetricSpecs_.isEmpty()) { - autoscalingMetricSpecs_ = other.autoscalingMetricSpecs_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.addAll(other.autoscalingMetricSpecs_); - } - onChanged(); - } - } else { - if (!other.autoscalingMetricSpecs_.isEmpty()) { - if (autoscalingMetricSpecsBuilder_.isEmpty()) { - autoscalingMetricSpecsBuilder_.dispose(); - autoscalingMetricSpecsBuilder_ = null; - autoscalingMetricSpecs_ = other.autoscalingMetricSpecs_; - bitField0_ = (bitField0_ & ~0x00000010); - autoscalingMetricSpecsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetAutoscalingMetricSpecsFieldBuilder() - : null; - } else { - autoscalingMetricSpecsBuilder_.addAllMessages(other.autoscalingMetricSpecs_); - } - } - } - if (other.getSpot() != false) { - setSpot(other.getSpot()); - } - 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( - internalGetMachineSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - minReplicaCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - maxReplicaCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - com.google.cloud.vertexai.api.AutoscalingMetricSpec m = - input.readMessage( - com.google.cloud.vertexai.api.AutoscalingMetricSpec.parser(), - extensionRegistry); - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.add(m); - } else { - autoscalingMetricSpecsBuilder_.addMessage(m); - } - break; - } // case 34 - case 40: - { - spot_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 40 - case 72: - { - requiredReplicaCount_ = input.readInt32(); - bitField0_ |= 0x00000008; - 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 com.google.cloud.vertexai.api.MachineSpec machineSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder> - machineSpecBuilder_; - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - public boolean hasMachineSpec() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - public com.google.cloud.vertexai.api.MachineSpec getMachineSpec() { - if (machineSpecBuilder_ == null) { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } else { - return machineSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) { - if (machineSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - machineSpec_ = value; - } else { - machineSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setMachineSpec( - com.google.cloud.vertexai.api.MachineSpec.Builder builderForValue) { - if (machineSpecBuilder_ == null) { - machineSpec_ = builderForValue.build(); - } else { - machineSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) { - if (machineSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && machineSpec_ != null - && machineSpec_ != com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance()) { - getMachineSpecBuilder().mergeFrom(value); - } else { - machineSpec_ = value; - } - } else { - machineSpecBuilder_.mergeFrom(value); - } - if (machineSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearMachineSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - machineSpec_ = null; - if (machineSpecBuilder_ != null) { - machineSpecBuilder_.dispose(); - machineSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.MachineSpec.Builder getMachineSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetMachineSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder() { - if (machineSpecBuilder_ != null) { - return machineSpecBuilder_.getMessageOrBuilder(); - } else { - return machineSpec_ == null - ? com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance() - : machineSpec_; - } - } - - /** - * - * - *
-     * Required. Immutable. The specification of a single machine being used.
-     * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder> - internalGetMachineSpecFieldBuilder() { - if (machineSpecBuilder_ == null) { - machineSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MachineSpec, - com.google.cloud.vertexai.api.MachineSpec.Builder, - com.google.cloud.vertexai.api.MachineSpecOrBuilder>( - getMachineSpec(), getParentForChildren(), isClean()); - machineSpec_ = null; - } - return machineSpecBuilder_; - } - - private int minReplicaCount_; - - /** - * - * - *
-     * Required. Immutable. The minimum number of machine replicas that will be
-     * always deployed on. This value must be greater than or equal to 1.
-     *
-     * If traffic increases, it may dynamically be deployed onto more replicas,
-     * and as traffic decreases, some of these extra replicas may be freed.
-     * 
- * - * - * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The minReplicaCount. - */ - @java.lang.Override - public int getMinReplicaCount() { - return minReplicaCount_; - } - - /** - * - * - *
-     * Required. Immutable. The minimum number of machine replicas that will be
-     * always deployed on. This value must be greater than or equal to 1.
-     *
-     * If traffic increases, it may dynamically be deployed onto more replicas,
-     * and as traffic decreases, some of these extra replicas may be freed.
-     * 
- * - * - * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The minReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setMinReplicaCount(int value) { - - minReplicaCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Immutable. The minimum number of machine replicas that will be
-     * always deployed on. This value must be greater than or equal to 1.
-     *
-     * If traffic increases, it may dynamically be deployed onto more replicas,
-     * and as traffic decreases, some of these extra replicas may be freed.
-     * 
- * - * - * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearMinReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000002); - minReplicaCount_ = 0; - onChanged(); - return this; - } - - private int maxReplicaCount_; - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, will use
-     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
-     * as the default value.
-     *
-     * The value of this field impacts the charge against Vertex CPU and GPU
-     * quotas. Specifically, you will be charged for (max_replica_count *
-     * number of cores in the selected machine type) and (max_replica_count *
-     * number of GPUs per replica in the selected machine type).
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - @java.lang.Override - public int getMaxReplicaCount() { - return maxReplicaCount_; - } - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, will use
-     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
-     * as the default value.
-     *
-     * The value of this field impacts the charge against Vertex CPU and GPU
-     * quotas. Specifically, you will be charged for (max_replica_count *
-     * number of cores in the selected machine type) and (max_replica_count *
-     * number of GPUs per replica in the selected machine type).
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The maxReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setMaxReplicaCount(int value) { - - maxReplicaCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The maximum number of replicas that may be deployed on when the
-     * traffic against it increases. If the requested value is too large, the
-     * deployment will error, but if deployment succeeds then the ability to scale
-     * to that many replicas is guaranteed (barring service outages). If traffic
-     * increases beyond what its replicas at maximum may handle, a portion of the
-     * traffic will be dropped. If this value is not provided, will use
-     * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
-     * as the default value.
-     *
-     * The value of this field impacts the charge against Vertex CPU and GPU
-     * quotas. Specifically, you will be charged for (max_replica_count *
-     * number of cores in the selected machine type) and (max_replica_count *
-     * number of GPUs per replica in the selected machine type).
-     * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearMaxReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000004); - maxReplicaCount_ = 0; - onChanged(); - return this; - } - - private int requiredReplicaCount_; - - /** - * - * - *
-     * Optional. Number of required available replicas for the deployment to
-     * succeed. This field is only needed when partial deployment/mutation is
-     * desired. If set, the deploy/mutate operation will succeed once
-     * available_replica_count reaches required_replica_count, and the rest of
-     * the replicas will be retried. If not set, the default
-     * required_replica_count will be min_replica_count.
-     * 
- * - * int32 required_replica_count = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requiredReplicaCount. - */ - @java.lang.Override - public int getRequiredReplicaCount() { - return requiredReplicaCount_; - } - - /** - * - * - *
-     * Optional. Number of required available replicas for the deployment to
-     * succeed. This field is only needed when partial deployment/mutation is
-     * desired. If set, the deploy/mutate operation will succeed once
-     * available_replica_count reaches required_replica_count, and the rest of
-     * the replicas will be retried. If not set, the default
-     * required_replica_count will be min_replica_count.
-     * 
- * - * int32 required_replica_count = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requiredReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setRequiredReplicaCount(int value) { - - requiredReplicaCount_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Number of required available replicas for the deployment to
-     * succeed. This field is only needed when partial deployment/mutation is
-     * desired. If set, the deploy/mutate operation will succeed once
-     * available_replica_count reaches required_replica_count, and the rest of
-     * the replicas will be retried. If not set, the default
-     * required_replica_count will be min_replica_count.
-     * 
- * - * int32 required_replica_count = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequiredReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000008); - requiredReplicaCount_ = 0; - onChanged(); - return this; - } - - private java.util.List - autoscalingMetricSpecs_ = java.util.Collections.emptyList(); - - private void ensureAutoscalingMetricSpecsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - autoscalingMetricSpecs_ = - new java.util.ArrayList( - autoscalingMetricSpecs_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.AutoscalingMetricSpec, - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder, - com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder> - autoscalingMetricSpecsBuilder_; - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getAutoscalingMetricSpecsList() { - if (autoscalingMetricSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); - } else { - return autoscalingMetricSpecsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public int getAutoscalingMetricSpecsCount() { - if (autoscalingMetricSpecsBuilder_ == null) { - return autoscalingMetricSpecs_.size(); - } else { - return autoscalingMetricSpecsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.AutoscalingMetricSpec getAutoscalingMetricSpecs( - int index) { - if (autoscalingMetricSpecsBuilder_ == null) { - return autoscalingMetricSpecs_.get(index); - } else { - return autoscalingMetricSpecsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setAutoscalingMetricSpecs( - int index, com.google.cloud.vertexai.api.AutoscalingMetricSpec value) { - if (autoscalingMetricSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.set(index, value); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setAutoscalingMetricSpecs( - int index, com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder builderForValue) { - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAutoscalingMetricSpecs( - com.google.cloud.vertexai.api.AutoscalingMetricSpec value) { - if (autoscalingMetricSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.add(value); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAutoscalingMetricSpecs( - int index, com.google.cloud.vertexai.api.AutoscalingMetricSpec value) { - if (autoscalingMetricSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.add(index, value); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAutoscalingMetricSpecs( - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder builderForValue) { - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.add(builderForValue.build()); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAutoscalingMetricSpecs( - int index, com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder builderForValue) { - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder addAllAutoscalingMetricSpecs( - java.lang.Iterable values) { - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoscalingMetricSpecs_); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearAutoscalingMetricSpecs() { - if (autoscalingMetricSpecsBuilder_ == null) { - autoscalingMetricSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder removeAutoscalingMetricSpecs(int index) { - if (autoscalingMetricSpecsBuilder_ == null) { - ensureAutoscalingMetricSpecsIsMutable(); - autoscalingMetricSpecs_.remove(index); - onChanged(); - } else { - autoscalingMetricSpecsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder - getAutoscalingMetricSpecsBuilder(int index) { - return internalGetAutoscalingMetricSpecsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder - getAutoscalingMetricSpecsOrBuilder(int index) { - if (autoscalingMetricSpecsBuilder_ == null) { - return autoscalingMetricSpecs_.get(index); - } else { - return autoscalingMetricSpecsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getAutoscalingMetricSpecsOrBuilderList() { - if (autoscalingMetricSpecsBuilder_ != null) { - return autoscalingMetricSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); - } - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder - addAutoscalingMetricSpecsBuilder() { - return internalGetAutoscalingMetricSpecsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.AutoscalingMetricSpec.getDefaultInstance()); - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder - addAutoscalingMetricSpecsBuilder(int index) { - return internalGetAutoscalingMetricSpecsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.AutoscalingMetricSpec.getDefaultInstance()); - } - - /** - * - * - *
-     * Immutable. The metric specifications that overrides a resource
-     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-     * target value (default to 60 if not set). At most one entry is allowed per
-     * metric.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is above 0, the autoscaling will be based on both CPU utilization and
-     * accelerator's duty cycle metrics and scale up when either metrics exceeds
-     * its target value while scale down if both metrics are under their target
-     * value. The default target value is 60 for both metrics.
-     *
-     * If
-     * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-     * is 0, the autoscaling will be based on CPU utilization metric only with
-     * default target value 60 if not explicitly set.
-     *
-     * For example, in the case of Online Prediction, if you want to override
-     * target CPU utilization to 80, you should set
-     * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-     * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-     * to `80`.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - public java.util.List - getAutoscalingMetricSpecsBuilderList() { - return internalGetAutoscalingMetricSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.AutoscalingMetricSpec, - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder, - com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder> - internalGetAutoscalingMetricSpecsFieldBuilder() { - if (autoscalingMetricSpecsBuilder_ == null) { - autoscalingMetricSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.AutoscalingMetricSpec, - com.google.cloud.vertexai.api.AutoscalingMetricSpec.Builder, - com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder>( - autoscalingMetricSpecs_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - autoscalingMetricSpecs_ = null; - } - return autoscalingMetricSpecsBuilder_; - } - - private boolean spot_; - - /** - * - * - *
-     * Optional. If true, schedule the deployment workload on [spot
-     * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
-     * 
- * - * bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The spot. - */ - @java.lang.Override - public boolean getSpot() { - return spot_; - } - - /** - * - * - *
-     * Optional. If true, schedule the deployment workload on [spot
-     * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
-     * 
- * - * bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The spot to set. - * @return This builder for chaining. - */ - public Builder setSpot(boolean value) { - - spot_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. If true, schedule the deployment workload on [spot
-     * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
-     * 
- * - * bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearSpot() { - bitField0_ = (bitField0_ & ~0x00000020); - spot_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DedicatedResources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DedicatedResources) - private static final com.google.cloud.vertexai.api.DedicatedResources DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DedicatedResources(); - } - - public static com.google.cloud.vertexai.api.DedicatedResources getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DedicatedResources 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.vertexai.api.DedicatedResources getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java deleted file mode 100644 index c2f9fa6e7255..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DedicatedResourcesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DedicatedResources) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the machineSpec field is set. - */ - boolean hasMachineSpec(); - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The machineSpec. - */ - com.google.cloud.vertexai.api.MachineSpec getMachineSpec(); - - /** - * - * - *
-   * Required. Immutable. The specification of a single machine being used.
-   * 
- * - * - * .google.cloud.vertexai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.MachineSpecOrBuilder getMachineSpecOrBuilder(); - - /** - * - * - *
-   * Required. Immutable. The minimum number of machine replicas that will be
-   * always deployed on. This value must be greater than or equal to 1.
-   *
-   * If traffic increases, it may dynamically be deployed onto more replicas,
-   * and as traffic decreases, some of these extra replicas may be freed.
-   * 
- * - * - * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The minReplicaCount. - */ - int getMinReplicaCount(); - - /** - * - * - *
-   * Immutable. The maximum number of replicas that may be deployed on when the
-   * traffic against it increases. If the requested value is too large, the
-   * deployment will error, but if deployment succeeds then the ability to scale
-   * to that many replicas is guaranteed (barring service outages). If traffic
-   * increases beyond what its replicas at maximum may handle, a portion of the
-   * traffic will be dropped. If this value is not provided, will use
-   * [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
-   * as the default value.
-   *
-   * The value of this field impacts the charge against Vertex CPU and GPU
-   * quotas. Specifically, you will be charged for (max_replica_count *
-   * number of cores in the selected machine type) and (max_replica_count *
-   * number of GPUs per replica in the selected machine type).
-   * 
- * - * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The maxReplicaCount. - */ - int getMaxReplicaCount(); - - /** - * - * - *
-   * Optional. Number of required available replicas for the deployment to
-   * succeed. This field is only needed when partial deployment/mutation is
-   * desired. If set, the deploy/mutate operation will succeed once
-   * available_replica_count reaches required_replica_count, and the rest of
-   * the replicas will be retried. If not set, the default
-   * required_replica_count will be min_replica_count.
-   * 
- * - * int32 required_replica_count = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requiredReplicaCount. - */ - int getRequiredReplicaCount(); - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List - getAutoscalingMetricSpecsList(); - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.AutoscalingMetricSpec getAutoscalingMetricSpecs(int index); - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - int getAutoscalingMetricSpecsCount(); - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - java.util.List - getAutoscalingMetricSpecsOrBuilderList(); - - /** - * - * - *
-   * Immutable. The metric specifications that overrides a resource
-   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
-   * target value (default to 60 if not set). At most one entry is allowed per
-   * metric.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is above 0, the autoscaling will be based on both CPU utilization and
-   * accelerator's duty cycle metrics and scale up when either metrics exceeds
-   * its target value while scale down if both metrics are under their target
-   * value. The default target value is 60 for both metrics.
-   *
-   * If
-   * [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
-   * is 0, the autoscaling will be based on CPU utilization metric only with
-   * default target value 60 if not explicitly set.
-   *
-   * For example, in the case of Online Prediction, if you want to override
-   * target CPU utilization to 80, you should set
-   * [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
-   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
-   * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
-   * to `80`.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.AutoscalingMetricSpecOrBuilder getAutoscalingMetricSpecsOrBuilder( - int index); - - /** - * - * - *
-   * Optional. If true, schedule the deployment workload on [spot
-   * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
-   * 
- * - * bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The spot. - */ - boolean getSpot(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java deleted file mode 100644 index 5afe0d643532..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeleteEndpointRequest} - */ -@com.google.protobuf.Generated -public final class DeleteEndpointRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeleteEndpointRequest) - DeleteEndpointRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeleteEndpointRequest"); - } - - // Use DeleteEndpointRequest.newBuilder() to construct. - private DeleteEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeleteEndpointRequest() { - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeleteEndpointRequest.class, - com.google.cloud.vertexai.api.DeleteEndpointRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint resource to be deleted.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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 Endpoint resource to be deleted.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.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.vertexai.api.DeleteEndpointRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeleteEndpointRequest other = - (com.google.cloud.vertexai.api.DeleteEndpointRequest) 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.vertexai.api.DeleteEndpointRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest 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.vertexai.api.DeleteEndpointRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest 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.vertexai.api.DeleteEndpointRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeleteEndpointRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeleteEndpointRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeleteEndpointRequest) - com.google.cloud.vertexai.api.DeleteEndpointRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeleteEndpointRequest.class, - com.google.cloud.vertexai.api.DeleteEndpointRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeleteEndpointRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteEndpointRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeleteEndpointRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteEndpointRequest build() { - com.google.cloud.vertexai.api.DeleteEndpointRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteEndpointRequest buildPartial() { - com.google.cloud.vertexai.api.DeleteEndpointRequest result = - new com.google.cloud.vertexai.api.DeleteEndpointRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeleteEndpointRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeleteEndpointRequest) { - return mergeFrom((com.google.cloud.vertexai.api.DeleteEndpointRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeleteEndpointRequest other) { - if (other == com.google.cloud.vertexai.api.DeleteEndpointRequest.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 Endpoint resource to be deleted.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource to be deleted.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource to be deleted.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource to be deleted.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource to be deleted.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeleteEndpointRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeleteEndpointRequest) - private static final com.google.cloud.vertexai.api.DeleteEndpointRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeleteEndpointRequest(); - } - - public static com.google.cloud.vertexai.api.DeleteEndpointRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteEndpointRequest 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.vertexai.api.DeleteEndpointRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java deleted file mode 100644 index 4670aca9d11a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeleteEndpointRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeleteEndpointRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint resource to be deleted.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Required. The name of the Endpoint resource to be deleted.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java deleted file mode 100644 index 208949701562..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java +++ /dev/null @@ -1,707 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/operation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Details of operations that perform deletes of any entities.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeleteOperationMetadata} - */ -@com.google.protobuf.Generated -public final class DeleteOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeleteOperationMetadata) - DeleteOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeleteOperationMetadata"); - } - - // Use DeleteOperationMetadata.newBuilder() to construct. - private DeleteOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeleteOperationMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeleteOperationMetadata.class, - com.google.cloud.vertexai.api.DeleteOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - 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.writeMessage(1, getGenericMetadata()); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - 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.vertexai.api.DeleteOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeleteOperationMetadata other = - (com.google.cloud.vertexai.api.DeleteOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata 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.vertexai.api.DeleteOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata 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.vertexai.api.DeleteOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeleteOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Details of operations that perform deletes of any entities.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeleteOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeleteOperationMetadata) - com.google.cloud.vertexai.api.DeleteOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeleteOperationMetadata.class, - com.google.cloud.vertexai.api.DeleteOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeleteOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeleteOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteOperationMetadata build() { - com.google.cloud.vertexai.api.DeleteOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeleteOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.DeleteOperationMetadata result = - new com.google.cloud.vertexai.api.DeleteOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeleteOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeleteOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.DeleteOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeleteOperationMetadata other) { - if (other == com.google.cloud.vertexai.api.DeleteOperationMetadata.getDefaultInstance()) - return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - 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( - internalGetGenericMetadataFieldBuilder().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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The common part of the operation metadata.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeleteOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeleteOperationMetadata) - private static final com.google.cloud.vertexai.api.DeleteOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeleteOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.DeleteOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteOperationMetadata 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.vertexai.api.DeleteOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java deleted file mode 100644 index 11bd346474e0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/operation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeleteOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeleteOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The common part of the operation metadata.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java deleted file mode 100644 index a6b2578eaa40..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java +++ /dev/null @@ -1,881 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Runtime operation information for
- * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelOperationMetadata} - */ -@com.google.protobuf.Generated -public final class DeployModelOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeployModelOperationMetadata) - DeployModelOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeployModelOperationMetadata"); - } - - // Use DeployModelOperationMetadata.newBuilder() to construct. - private DeployModelOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeployModelOperationMetadata() { - deploymentStage_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelOperationMetadata.class, - com.google.cloud.vertexai.api.DeployModelOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - public static final int DEPLOYMENT_STAGE_FIELD_NUMBER = 2; - private int deploymentStage_ = 0; - - /** - * - * - *
-   * Output only. The deployment stage of the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - @java.lang.Override - public int getDeploymentStageValue() { - return deploymentStage_; - } - - /** - * - * - *
-   * Output only. The deployment stage of the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage() { - com.google.cloud.vertexai.api.DeploymentStage result = - com.google.cloud.vertexai.api.DeploymentStage.forNumber(deploymentStage_); - return result == null ? com.google.cloud.vertexai.api.DeploymentStage.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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getGenericMetadata()); - } - if (deploymentStage_ - != com.google.cloud.vertexai.api.DeploymentStage.DEPLOYMENT_STAGE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, deploymentStage_); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - if (deploymentStage_ - != com.google.cloud.vertexai.api.DeploymentStage.DEPLOYMENT_STAGE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, deploymentStage_); - } - 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.vertexai.api.DeployModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeployModelOperationMetadata other = - (com.google.cloud.vertexai.api.DeployModelOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; - } - if (deploymentStage_ != other.deploymentStage_) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (37 * hash) + DEPLOYMENT_STAGE_FIELD_NUMBER; - hash = (53 * hash) + deploymentStage_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata 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.vertexai.api.DeployModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata 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.vertexai.api.DeployModelOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeployModelOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Runtime operation information for
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeployModelOperationMetadata) - com.google.cloud.vertexai.api.DeployModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelOperationMetadata.class, - com.google.cloud.vertexai.api.DeployModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeployModelOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - deploymentStage_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeployModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelOperationMetadata build() { - com.google.cloud.vertexai.api.DeployModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.DeployModelOperationMetadata result = - new com.google.cloud.vertexai.api.DeployModelOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeployModelOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deploymentStage_ = deploymentStage_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeployModelOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.DeployModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeployModelOperationMetadata other) { - if (other == com.google.cloud.vertexai.api.DeployModelOperationMetadata.getDefaultInstance()) - return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - if (other.deploymentStage_ != 0) { - setDeploymentStageValue(other.getDeploymentStageValue()); - } - 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( - internalGetGenericMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - deploymentStage_ = input.readEnum(); - 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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - private int deploymentStage_ = 0; - - /** - * - * - *
-     * Output only. The deployment stage of the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - @java.lang.Override - public int getDeploymentStageValue() { - return deploymentStage_; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for deploymentStage to set. - * @return This builder for chaining. - */ - public Builder setDeploymentStageValue(int value) { - deploymentStage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage() { - com.google.cloud.vertexai.api.DeploymentStage result = - com.google.cloud.vertexai.api.DeploymentStage.forNumber(deploymentStage_); - return result == null ? com.google.cloud.vertexai.api.DeploymentStage.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The deploymentStage to set. - * @return This builder for chaining. - */ - public Builder setDeploymentStage(com.google.cloud.vertexai.api.DeploymentStage value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - deploymentStage_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The deployment stage of the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDeploymentStage() { - bitField0_ = (bitField0_ & ~0x00000002); - deploymentStage_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeployModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeployModelOperationMetadata) - private static final com.google.cloud.vertexai.api.DeployModelOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeployModelOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.DeployModelOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeployModelOperationMetadata 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.vertexai.api.DeployModelOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java deleted file mode 100644 index 4800e4056aef..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeployModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeployModelOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. The deployment stage of the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for deploymentStage. - */ - int getDeploymentStageValue(); - - /** - * - * - *
-   * Output only. The deployment stage of the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeploymentStage deployment_stage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deploymentStage. - */ - com.google.cloud.vertexai.api.DeploymentStage getDeploymentStage(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java deleted file mode 100644 index 1f37e9450855..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java +++ /dev/null @@ -1,1470 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelRequest} - */ -@com.google.protobuf.Generated -public final class DeployModelRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeployModelRequest) - DeployModelRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeployModelRequest"); - } - - // Use DeployModelRequest.newBuilder() to construct. - private DeployModelRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeployModelRequest() { - endpoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelRequest.class, - com.google.cloud.vertexai.api.DeployModelRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to deploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to deploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOYED_MODEL_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - @java.lang.Override - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 3; - - private static final class TrafficSplitDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getDeployedModel()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.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.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedModel()); - } - for (java.util.Map.Entry entry : - internalGetTrafficSplit().getMap().entrySet()) { - com.google.protobuf.MapEntry trafficSplit__ = - TrafficSplitDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, trafficSplit__); - } - 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.vertexai.api.DeployModelRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeployModelRequest other = - (com.google.cloud.vertexai.api.DeployModelRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (hasDeployedModel() != other.hasDeployedModel()) return false; - if (hasDeployedModel()) { - if (!getDeployedModel().equals(other.getDeployedModel())) return false; - } - if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (hasDeployedModel()) { - hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModel().hashCode(); - } - if (!internalGetTrafficSplit().getMap().isEmpty()) { - hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; - hash = (53 * hash) + internalGetTrafficSplit().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest 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.vertexai.api.DeployModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest 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.vertexai.api.DeployModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeployModelRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeployModelRequest) - com.google.cloud.vertexai.api.DeployModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelRequest.class, - com.google.cloud.vertexai.api.DeployModelRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeployModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDeployedModelFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - internalGetMutableTrafficSplit().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeployModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelRequest build() { - com.google.cloud.vertexai.api.DeployModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelRequest buildPartial() { - com.google.cloud.vertexai.api.DeployModelRequest result = - new com.google.cloud.vertexai.api.DeployModelRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeployModelRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployedModel_ = - deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.trafficSplit_ = internalGetTrafficSplit(); - result.trafficSplit_.makeImmutable(); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeployModelRequest) { - return mergeFrom((com.google.cloud.vertexai.api.DeployModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeployModelRequest other) { - if (other == com.google.cloud.vertexai.api.DeployModelRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasDeployedModel()) { - mergeDeployedModel(other.getDeployedModel()); - } - internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetDeployedModelFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - com.google.protobuf.MapEntry trafficSplit__ = - input.readMessage( - TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableTrafficSplit() - .getMutableMap() - .put(trafficSplit__.getKey(), trafficSplit__.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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to deploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to deploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to deploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to deploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to deploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - deployedModelBuilder_; - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - if (deployedModelBuilder_ == null) { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } else { - return deployedModelBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployedModel_ = value; - } else { - deployedModelBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDeployedModel( - com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelBuilder_ == null) { - deployedModel_ = builderForValue.build(); - } else { - deployedModelBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && deployedModel_ != null - && deployedModel_ != com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()) { - getDeployedModelBuilder().mergeFrom(value); - } else { - deployedModel_ = value; - } - } else { - deployedModelBuilder_.mergeFrom(value); - } - if (deployedModel_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDeployedModel() { - bitField0_ = (bitField0_ & ~0x00000002); - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder getDeployedModelBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetDeployedModelFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - if (deployedModelBuilder_ != null) { - return deployedModelBuilder_.getMessageOrBuilder(); - } else { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - } - - /** - * - * - *
-     * Required. The DeployedModel to be created within the Endpoint. Note that
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-     * must be updated for the DeployedModel to start receiving traffic, either as
-     * part of this call, or via
-     * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - internalGetDeployedModelFieldBuilder() { - if (deployedModelBuilder_ == null) { - deployedModelBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder>( - getDeployedModel(), getParentForChildren(), isClean()); - deployedModel_ = null; - } - return deployedModelBuilder_; - } - - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - private com.google.protobuf.MapField - internalGetMutableTrafficSplit() { - if (trafficSplit_ == null) { - trafficSplit_ = - com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); - } - if (!trafficSplit_.isMutable()) { - trafficSplit_ = trafficSplit_.copy(); - } - bitField0_ |= 0x00000004; - onChanged(); - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearTrafficSplit() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableTrafficSplit().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder removeTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableTrafficSplit().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableTrafficSplit() { - bitField0_ |= 0x00000004; - return internalGetMutableTrafficSplit().getMutableMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder putTrafficSplit(java.lang.String key, int value) { - if (key == null) { - throw new NullPointerException("map key"); - } - - internalGetMutableTrafficSplit().getMutableMap().put(key, value); - bitField0_ |= 0x00000004; - return this; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If this field is non-empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. To refer to the ID of the just being deployed Model, a
-     * "0" should be used, and the actual ID of the new DeployedModel will be
-     * filled in its place by this method. The traffic percentage values must add
-     * up to 100.
-     *
-     * If this field is empty, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-     * updated.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder putAllTrafficSplit(java.util.Map values) { - internalGetMutableTrafficSplit().getMutableMap().putAll(values); - bitField0_ |= 0x00000004; - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeployModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeployModelRequest) - private static final com.google.cloud.vertexai.api.DeployModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeployModelRequest(); - } - - public static com.google.cloud.vertexai.api.DeployModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeployModelRequest 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.vertexai.api.DeployModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java deleted file mode 100644 index 865b11b8ed48..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeployModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeployModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to deploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to deploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - boolean hasDeployedModel(); - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - com.google.cloud.vertexai.api.DeployedModel getDeployedModel(); - - /** - * - * - *
-   * Required. The DeployedModel to be created within the Endpoint. Note that
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
-   * must be updated for the DeployedModel to start receiving traffic, either as
-   * part of this call, or via
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitCount(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - boolean containsTrafficSplit(java.lang.String key); - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Deprecated - java.util.Map getTrafficSplit(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - java.util.Map getTrafficSplitMap(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If this field is non-empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. To refer to the ID of the just being deployed Model, a
-   * "0" should be used, and the actual ID of the new DeployedModel will be
-   * filled in its place by this method. The traffic percentage values must add
-   * up to 100.
-   *
-   * If this field is empty, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
-   * updated.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitOrThrow(java.lang.String key); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java deleted file mode 100644 index 1be5a5e61b64..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java +++ /dev/null @@ -1,702 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelResponse} - */ -@com.google.protobuf.Generated -public final class DeployModelResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeployModelResponse) - DeployModelResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeployModelResponse"); - } - - // Use DeployModelResponse.newBuilder() to construct. - private DeployModelResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeployModelResponse() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelResponse.class, - com.google.cloud.vertexai.api.DeployModelResponse.Builder.class); - } - - private int bitField0_; - public static final int DEPLOYED_MODEL_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - @java.lang.Override - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - 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.writeMessage(1, getDeployedModel()); - } - 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.computeMessageSize(1, getDeployedModel()); - } - 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.vertexai.api.DeployModelResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeployModelResponse other = - (com.google.cloud.vertexai.api.DeployModelResponse) obj; - - if (hasDeployedModel() != other.hasDeployedModel()) return false; - if (hasDeployedModel()) { - if (!getDeployedModel().equals(other.getDeployedModel())) 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 (hasDeployedModel()) { - hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModel().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse 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.vertexai.api.DeployModelResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse 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.vertexai.api.DeployModelResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeployModelResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployModelResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeployModelResponse) - com.google.cloud.vertexai.api.DeployModelResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployModelResponse.class, - com.google.cloud.vertexai.api.DeployModelResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeployModelResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDeployedModelFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeployModelResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelResponse build() { - com.google.cloud.vertexai.api.DeployModelResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployModelResponse buildPartial() { - com.google.cloud.vertexai.api.DeployModelResponse result = - new com.google.cloud.vertexai.api.DeployModelResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeployModelResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.deployedModel_ = - deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeployModelResponse) { - return mergeFrom((com.google.cloud.vertexai.api.DeployModelResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeployModelResponse other) { - if (other == com.google.cloud.vertexai.api.DeployModelResponse.getDefaultInstance()) - return this; - if (other.hasDeployedModel()) { - mergeDeployedModel(other.getDeployedModel()); - } - 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( - internalGetDeployedModelFieldBuilder().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.vertexai.api.DeployedModel deployedModel_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - deployedModelBuilder_; - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - if (deployedModelBuilder_ == null) { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } else { - return deployedModelBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder setDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployedModel_ = value; - } else { - deployedModelBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder setDeployedModel( - com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelBuilder_ == null) { - deployedModel_ = builderForValue.build(); - } else { - deployedModelBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && deployedModel_ != null - && deployedModel_ != com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()) { - getDeployedModelBuilder().mergeFrom(value); - } else { - deployedModel_ = value; - } - } else { - deployedModelBuilder_.mergeFrom(value); - } - if (deployedModel_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder clearDeployedModel() { - bitField0_ = (bitField0_ & ~0x00000001); - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder getDeployedModelBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetDeployedModelFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - if (deployedModelBuilder_ != null) { - return deployedModelBuilder_.getMessageOrBuilder(); - } else { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - } - - /** - * - * - *
-     * The DeployedModel that had been deployed in the Endpoint.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - internalGetDeployedModelFieldBuilder() { - if (deployedModelBuilder_ == null) { - deployedModelBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder>( - getDeployedModel(), getParentForChildren(), isClean()); - deployedModel_ = null; - } - return deployedModelBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeployModelResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeployModelResponse) - private static final com.google.cloud.vertexai.api.DeployModelResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeployModelResponse(); - } - - public static com.google.cloud.vertexai.api.DeployModelResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeployModelResponse 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.vertexai.api.DeployModelResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java deleted file mode 100644 index 4c6c06d42f90..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeployModelResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeployModelResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - boolean hasDeployedModel(); - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - com.google.cloud.vertexai.api.DeployedModel getDeployedModel(); - - /** - * - * - *
-   * The DeployedModel that had been deployed in the Endpoint.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java deleted file mode 100644 index b6e234716b4d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java +++ /dev/null @@ -1,6506 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A deployment of a Model. Endpoints contain one or more DeployedModels.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployedModel} - */ -@com.google.protobuf.Generated -public final class DeployedModel extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeployedModel) - DeployedModelOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeployedModel"); - } - - // Use DeployedModel.newBuilder() to construct. - private DeployedModel(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DeployedModel() { - id_ = ""; - model_ = ""; - modelVersionId_ = ""; - displayName_ = ""; - serviceAccount_ = ""; - checkpointId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 28: - return internalGetSystemLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployedModel.class, - com.google.cloud.vertexai.api.DeployedModel.Builder.class); - } - - public interface StatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeployedModel.Status) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The latest deployed model's status message (if any).
-     * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The message. - */ - java.lang.String getMessage(); - - /** - * - * - *
-     * Output only. The latest deployed model's status message (if any).
-     * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for message. - */ - com.google.protobuf.ByteString getMessageBytes(); - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - - /** - * - * - *
-     * Output only. The number of available replicas of the deployed model.
-     * 
- * - * int32 available_replica_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The availableReplicaCount. - */ - int getAvailableReplicaCount(); - } - - /** - * - * - *
-   * Runtime status of the deployed model.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployedModel.Status} - */ - public static final class Status extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DeployedModel.Status) - StatusOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Status"); - } - - // Use Status.newBuilder() to construct. - private Status(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Status() { - message_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_Status_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployedModel.Status.class, - com.google.cloud.vertexai.api.DeployedModel.Status.Builder.class); - } - - private int bitField0_; - public static final int MESSAGE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object message_ = ""; - - /** - * - * - *
-     * Output only. The latest deployed model's status message (if any).
-     * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - 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(); - message_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. The latest deployed model's status message (if any).
-     * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp lastUpdateTime_; - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - - /** - * - * - *
-     * Output only. The time at which the status was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - - public static final int AVAILABLE_REPLICA_COUNT_FIELD_NUMBER = 3; - private int availableReplicaCount_ = 0; - - /** - * - * - *
-     * Output only. The number of available replicas of the deployed model.
-     * 
- * - * int32 available_replica_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The availableReplicaCount. - */ - @java.lang.Override - public int getAvailableReplicaCount() { - return availableReplicaCount_; - } - - 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.GeneratedMessage.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, message_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getLastUpdateTime()); - } - if (availableReplicaCount_ != 0) { - output.writeInt32(3, availableReplicaCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, message_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLastUpdateTime()); - } - if (availableReplicaCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, availableReplicaCount_); - } - 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.vertexai.api.DeployedModel.Status)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeployedModel.Status other = - (com.google.cloud.vertexai.api.DeployedModel.Status) obj; - - if (!getMessage().equals(other.getMessage())) return false; - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; - } - if (getAvailableReplicaCount() != other.getAvailableReplicaCount()) 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) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - hash = (37 * hash) + AVAILABLE_REPLICA_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getAvailableReplicaCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status 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.vertexai.api.DeployedModel.Status parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status 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.vertexai.api.DeployedModel.Status parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeployedModel.Status 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Runtime status of the deployed model.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployedModel.Status} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeployedModel.Status) - com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_Status_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployedModel.Status.class, - com.google.cloud.vertexai.api.DeployedModel.Status.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeployedModel.Status.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetLastUpdateTimeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - message_ = ""; - lastUpdateTime_ = null; - if (lastUpdateTimeBuilder_ != null) { - lastUpdateTimeBuilder_.dispose(); - lastUpdateTimeBuilder_ = null; - } - availableReplicaCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel.Status getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel.Status build() { - com.google.cloud.vertexai.api.DeployedModel.Status result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel.Status buildPartial() { - com.google.cloud.vertexai.api.DeployedModel.Status result = - new com.google.cloud.vertexai.api.DeployedModel.Status(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeployedModel.Status result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.message_ = message_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lastUpdateTime_ = - lastUpdateTimeBuilder_ == null ? lastUpdateTime_ : lastUpdateTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.availableReplicaCount_ = availableReplicaCount_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeployedModel.Status) { - return mergeFrom((com.google.cloud.vertexai.api.DeployedModel.Status) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeployedModel.Status other) { - if (other == com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance()) - return this; - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - if (other.getAvailableReplicaCount() != 0) { - setAvailableReplicaCount(other.getAvailableReplicaCount()); - } - 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: - { - message_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetLastUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - availableReplicaCount_ = 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 message_ = ""; - - /** - * - * - *
-       * Output only. The latest deployed model's status message (if any).
-       * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. The latest deployed model's status message (if any).
-       * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for message. - */ - public com.google.protobuf.ByteString getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. The latest deployed model's status message (if any).
-       * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - message_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The latest deployed model's status message (if any).
-       * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The latest deployed model's status message (if any).
-       * 
- * - * string message = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - message_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - lastUpdateTimeBuilder_; - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && lastUpdateTime_ != null - && lastUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLastUpdateTimeBuilder().mergeFrom(value); - } else { - lastUpdateTime_ = value; - } - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - if (lastUpdateTime_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearLastUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - lastUpdateTime_ = null; - if (lastUpdateTimeBuilder_ != null) { - lastUpdateTimeBuilder_.dispose(); - lastUpdateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetLastUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : lastUpdateTime_; - } - } - - /** - * - * - *
-       * Output only. The time at which the status was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), getParentForChildren(), isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - private int availableReplicaCount_; - - /** - * - * - *
-       * Output only. The number of available replicas of the deployed model.
-       * 
- * - * int32 available_replica_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The availableReplicaCount. - */ - @java.lang.Override - public int getAvailableReplicaCount() { - return availableReplicaCount_; - } - - /** - * - * - *
-       * Output only. The number of available replicas of the deployed model.
-       * 
- * - * int32 available_replica_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The availableReplicaCount to set. - * @return This builder for chaining. - */ - public Builder setAvailableReplicaCount(int value) { - - availableReplicaCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The number of available replicas of the deployed model.
-       * 
- * - * int32 available_replica_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearAvailableReplicaCount() { - bitField0_ = (bitField0_ & ~0x00000004); - availableReplicaCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeployedModel.Status) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeployedModel.Status) - private static final com.google.cloud.vertexai.api.DeployedModel.Status DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeployedModel.Status(); - } - - public static com.google.cloud.vertexai.api.DeployedModel.Status getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Status 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.vertexai.api.DeployedModel.Status getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - private int predictionResourcesCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object predictionResources_; - - public enum PredictionResourcesCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DEDICATED_RESOURCES(7), - AUTOMATIC_RESOURCES(8), - SHARED_RESOURCES(17), - PREDICTIONRESOURCES_NOT_SET(0); - private final int value; - - private PredictionResourcesCase(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 PredictionResourcesCase valueOf(int value) { - return forNumber(value); - } - - public static PredictionResourcesCase forNumber(int value) { - switch (value) { - case 7: - return DEDICATED_RESOURCES; - case 8: - return AUTOMATIC_RESOURCES; - case 17: - return SHARED_RESOURCES; - case 0: - return PREDICTIONRESOURCES_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PredictionResourcesCase getPredictionResourcesCase() { - return PredictionResourcesCase.forNumber(predictionResourcesCase_); - } - - public static final int DEDICATED_RESOURCES_FIELD_NUMBER = 7; - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return Whether the dedicatedResources field is set. - */ - @java.lang.Override - public boolean hasDedicatedResources() { - return predictionResourcesCase_ == 7; - } - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return The dedicatedResources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResources getDedicatedResources() { - if (predictionResourcesCase_ == 7) { - return (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_; - } - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder - getDedicatedResourcesOrBuilder() { - if (predictionResourcesCase_ == 7) { - return (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_; - } - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - - public static final int AUTOMATIC_RESOURCES_FIELD_NUMBER = 8; - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return Whether the automaticResources field is set. - */ - @java.lang.Override - public boolean hasAutomaticResources() { - return predictionResourcesCase_ == 8; - } - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return The automaticResources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResources getAutomaticResources() { - if (predictionResourcesCase_ == 8) { - return (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_; - } - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder - getAutomaticResourcesOrBuilder() { - if (predictionResourcesCase_ == 8) { - return (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_; - } - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - - public static final int SHARED_RESOURCES_FIELD_NUMBER = 17; - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return Whether the sharedResources field is set. - */ - public boolean hasSharedResources() { - return predictionResourcesCase_ == 17; - } - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The sharedResources. - */ - public java.lang.String getSharedResources() { - java.lang.Object ref = ""; - if (predictionResourcesCase_ == 17) { - ref = predictionResources_; - } - 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 (predictionResourcesCase_ == 17) { - predictionResources_ = s; - } - return s; - } - } - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for sharedResources. - */ - public com.google.protobuf.ByteString getSharedResourcesBytes() { - java.lang.Object ref = ""; - if (predictionResourcesCase_ == 17) { - ref = predictionResources_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (predictionResourcesCase_ == 17) { - predictionResources_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - - /** - * - * - *
-   * Immutable. The ID of the DeployedModel. If not provided upon deployment,
-   * Vertex AI will generate a value for this ID.
-   *
-   * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-   * 
- * - * string id = 1 [(.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 ID of the DeployedModel. If not provided upon deployment,
-   * Vertex AI will generate a value for this ID.
-   *
-   * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-   * 
- * - * string id = 1 [(.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 MODEL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * The resource name of the Model that this is the deployment of. Note that
-   * the Model may be in a different location than the DeployedModel's Endpoint.
-   *
-   * The resource name may contain version id or version alias to specify the
-   * version.
-   * Example: `projects/{project}/locations/{location}/models/{model}@2`
-   * or
-   * `projects/{project}/locations/{location}/models/{model}@golden`
-   * if no version is specified, the default version will be deployed.
-   * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * The resource name of the Model that this is the deployment of. Note that
-   * the Model may be in a different location than the DeployedModel's Endpoint.
-   *
-   * The resource name may contain version id or version alias to specify the
-   * version.
-   * Example: `projects/{project}/locations/{location}/models/{model}@2`
-   * or
-   * `projects/{project}/locations/{location}/models/{model}@golden`
-   * if no version is specified, the default version will be deployed.
-   * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_VERSION_ID_FIELD_NUMBER = 18; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-   * Output only. The version ID of the model that is deployed.
-   * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - @java.lang.Override - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - 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(); - modelVersionId_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The version ID of the model that is deployed.
-   * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = 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 DeployedModel. If not provided upon creation,
-   * the Model's display_name is used.
-   * 
- * - * 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 DeployedModel. If not provided upon creation,
-   * the Model's display_name is used.
-   * 
- * - * 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 CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.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 EXPLANATION_SPEC_FIELD_NUMBER = 9; - private com.google.cloud.vertexai.api.ExplanationSpec explanationSpec_; - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return Whether the explanationSpec field is set. - */ - @java.lang.Override - public boolean hasExplanationSpec() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return The explanationSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpec getExplanationSpec() { - return explanationSpec_ == null - ? com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance() - : explanationSpec_; - } - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOrBuilder getExplanationSpecOrBuilder() { - return explanationSpec_ == null - ? com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance() - : explanationSpec_; - } - - public static final int DISABLE_EXPLANATIONS_FIELD_NUMBER = 19; - private boolean disableExplanations_ = false; - - /** - * - * - *
-   * If true, deploy the model without explainable feature, regardless the
-   * existence of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * or
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
-   * 
- * - * bool disable_explanations = 19; - * - * @return The disableExplanations. - */ - @java.lang.Override - public boolean getDisableExplanations() { - return disableExplanations_; - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccount_ = ""; - - /** - * - * - *
-   * The service account that the DeployedModel's container runs as. Specify the
-   * email address of the service account. If this service account is not
-   * specified, the container runs as a service account that doesn't have access
-   * to the resource project.
-   *
-   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-   * permission on this service account.
-   * 
- * - * string service_account = 11; - * - * @return The serviceAccount. - */ - @java.lang.Override - public java.lang.String getServiceAccount() { - java.lang.Object ref = serviceAccount_; - 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(); - serviceAccount_ = s; - return s; - } - } - - /** - * - * - *
-   * The service account that the DeployedModel's container runs as. Specify the
-   * email address of the service account. If this service account is not
-   * specified, the container runs as a service account that doesn't have access
-   * to the resource project.
-   *
-   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-   * permission on this service account.
-   * 
- * - * string service_account = 11; - * - * @return The bytes for serviceAccount. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountBytes() { - java.lang.Object ref = serviceAccount_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISABLE_CONTAINER_LOGGING_FIELD_NUMBER = 15; - private boolean disableContainerLogging_ = false; - - /** - * - * - *
-   * For custom-trained Models and AutoML Tabular Models, the container of the
-   * DeployedModel instances will send `stderr` and `stdout` streams to
-   * Cloud Logging by default. Please note that the logs incur cost,
-   * which are subject to [Cloud Logging
-   * pricing](https://cloud.google.com/logging/pricing).
-   *
-   * User can disable container logging by setting this flag to true.
-   * 
- * - * bool disable_container_logging = 15; - * - * @return The disableContainerLogging. - */ - @java.lang.Override - public boolean getDisableContainerLogging() { - return disableContainerLogging_; - } - - public static final int ENABLE_ACCESS_LOGGING_FIELD_NUMBER = 13; - private boolean enableAccessLogging_ = false; - - /** - * - * - *
-   * If true, online prediction access logs are sent to Cloud
-   * Logging.
-   * These logs are like standard server access logs, containing
-   * information like timestamp and latency for each prediction request.
-   *
-   * Note that logs may incur a cost, especially if your project
-   * receives prediction requests at a high queries per second rate (QPS).
-   * Estimate your costs before enabling this option.
-   * 
- * - * bool enable_access_logging = 13; - * - * @return The enableAccessLogging. - */ - @java.lang.Override - public boolean getEnableAccessLogging() { - return enableAccessLogging_; - } - - public static final int PRIVATE_ENDPOINTS_FIELD_NUMBER = 14; - private com.google.cloud.vertexai.api.PrivateEndpoints privateEndpoints_; - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the privateEndpoints field is set. - */ - @java.lang.Override - public boolean hasPrivateEndpoints() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The privateEndpoints. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateEndpoints getPrivateEndpoints() { - return privateEndpoints_ == null - ? com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance() - : privateEndpoints_; - } - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder getPrivateEndpointsOrBuilder() { - return privateEndpoints_ == null - ? com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance() - : privateEndpoints_; - } - - public static final int FASTER_DEPLOYMENT_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.vertexai.api.FasterDeploymentConfig fasterDeploymentConfig_; - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return Whether the fasterDeploymentConfig field is set. - */ - @java.lang.Override - public boolean hasFasterDeploymentConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return The fasterDeploymentConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FasterDeploymentConfig getFasterDeploymentConfig() { - return fasterDeploymentConfig_ == null - ? com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance() - : fasterDeploymentConfig_; - } - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder - getFasterDeploymentConfigOrBuilder() { - return fasterDeploymentConfig_ == null - ? com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance() - : fasterDeploymentConfig_; - } - - public static final int STATUS_FIELD_NUMBER = 26; - private com.google.cloud.vertexai.api.DeployedModel.Status status_; - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel.Status getStatus() { - return status_ == null - ? com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance() - : status_; - } - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder getStatusOrBuilder() { - return status_ == null - ? com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance() - : status_; - } - - public static final int SYSTEM_LABELS_FIELD_NUMBER = 28; - - private static final class SystemLabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField systemLabels_; - - private com.google.protobuf.MapField - internalGetSystemLabels() { - if (systemLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SystemLabelsDefaultEntryHolder.defaultEntry); - } - return systemLabels_; - } - - public int getSystemLabelsCount() { - return internalGetSystemLabels().getMap().size(); - } - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public boolean containsSystemLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetSystemLabels().getMap().containsKey(key); - } - - /** Use {@link #getSystemLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSystemLabels() { - return getSystemLabelsMap(); - } - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public java.util.Map getSystemLabelsMap() { - return internalGetSystemLabels().getMap(); - } - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public /* nullable */ java.lang.String getSystemLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetSystemLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public java.lang.String getSystemLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetSystemLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CHECKPOINT_ID_FIELD_NUMBER = 29; - - @SuppressWarnings("serial") - private volatile java.lang.Object checkpointId_ = ""; - - /** - * - * - *
-   * The checkpoint id of the model.
-   * 
- * - * string checkpoint_id = 29; - * - * @return The checkpointId. - */ - @java.lang.Override - public java.lang.String getCheckpointId() { - java.lang.Object ref = checkpointId_; - 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(); - checkpointId_ = s; - return s; - } - } - - /** - * - * - *
-   * The checkpoint id of the model.
-   * 
- * - * string checkpoint_id = 29; - * - * @return The bytes for checkpointId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCheckpointIdBytes() { - java.lang.Object ref = checkpointId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - checkpointId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SPECULATIVE_DECODING_SPEC_FIELD_NUMBER = 30; - private com.google.cloud.vertexai.api.SpeculativeDecodingSpec speculativeDecodingSpec_; - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speculativeDecodingSpec field is set. - */ - @java.lang.Override - public boolean hasSpeculativeDecodingSpec() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speculativeDecodingSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec getSpeculativeDecodingSpec() { - return speculativeDecodingSpec_ == null - ? com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance() - : speculativeDecodingSpec_; - } - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder - getSpeculativeDecodingSpecOrBuilder() { - return speculativeDecodingSpec_ == null - ? com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance() - : speculativeDecodingSpec_; - } - - 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.GeneratedMessage.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getCreateTime()); - } - if (predictionResourcesCase_ == 7) { - output.writeMessage( - 7, (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_); - } - if (predictionResourcesCase_ == 8) { - output.writeMessage( - 8, (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(9, getExplanationSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccount_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, serviceAccount_); - } - if (enableAccessLogging_ != false) { - output.writeBool(13, enableAccessLogging_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(14, getPrivateEndpoints()); - } - if (disableContainerLogging_ != false) { - output.writeBool(15, disableContainerLogging_); - } - if (predictionResourcesCase_ == 17) { - com.google.protobuf.GeneratedMessage.writeString(output, 17, predictionResources_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 18, modelVersionId_); - } - if (disableExplanations_ != false) { - output.writeBool(19, disableExplanations_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(23, getFasterDeploymentConfig()); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(26, getStatus()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetSystemLabels(), SystemLabelsDefaultEntryHolder.defaultEntry, 28); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 29, checkpointId_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(30, getSpeculativeDecodingSpec()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); - } - if (predictionResourcesCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_); - } - if (predictionResourcesCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExplanationSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccount_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(11, serviceAccount_); - } - if (enableAccessLogging_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableAccessLogging_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getPrivateEndpoints()); - } - if (disableContainerLogging_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, disableContainerLogging_); - } - if (predictionResourcesCase_ == 17) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(17, predictionResources_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(18, modelVersionId_); - } - if (disableExplanations_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, disableExplanations_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(23, getFasterDeploymentConfig()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getStatus()); - } - for (java.util.Map.Entry entry : - internalGetSystemLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry systemLabels__ = - SystemLabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, systemLabels__); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(29, checkpointId_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 30, getSpeculativeDecodingSpec()); - } - 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.vertexai.api.DeployedModel)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DeployedModel other = - (com.google.cloud.vertexai.api.DeployedModel) obj; - - if (!getId().equals(other.getId())) return false; - if (!getModel().equals(other.getModel())) return false; - if (!getModelVersionId().equals(other.getModelVersionId())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasExplanationSpec() != other.hasExplanationSpec()) return false; - if (hasExplanationSpec()) { - if (!getExplanationSpec().equals(other.getExplanationSpec())) return false; - } - if (getDisableExplanations() != other.getDisableExplanations()) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (getDisableContainerLogging() != other.getDisableContainerLogging()) return false; - if (getEnableAccessLogging() != other.getEnableAccessLogging()) return false; - if (hasPrivateEndpoints() != other.hasPrivateEndpoints()) return false; - if (hasPrivateEndpoints()) { - if (!getPrivateEndpoints().equals(other.getPrivateEndpoints())) return false; - } - if (hasFasterDeploymentConfig() != other.hasFasterDeploymentConfig()) return false; - if (hasFasterDeploymentConfig()) { - if (!getFasterDeploymentConfig().equals(other.getFasterDeploymentConfig())) return false; - } - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } - if (!internalGetSystemLabels().equals(other.internalGetSystemLabels())) return false; - if (!getCheckpointId().equals(other.getCheckpointId())) return false; - if (hasSpeculativeDecodingSpec() != other.hasSpeculativeDecodingSpec()) return false; - if (hasSpeculativeDecodingSpec()) { - if (!getSpeculativeDecodingSpec().equals(other.getSpeculativeDecodingSpec())) return false; - } - if (!getPredictionResourcesCase().equals(other.getPredictionResourcesCase())) return false; - switch (predictionResourcesCase_) { - case 7: - if (!getDedicatedResources().equals(other.getDedicatedResources())) return false; - break; - case 8: - if (!getAutomaticResources().equals(other.getAutomaticResources())) return false; - break; - case 17: - if (!getSharedResources().equals(other.getSharedResources())) 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) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; - hash = (53 * hash) + getModelVersionId().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasExplanationSpec()) { - hash = (37 * hash) + EXPLANATION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getExplanationSpec().hashCode(); - } - hash = (37 * hash) + DISABLE_EXPLANATIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableExplanations()); - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - hash = (37 * hash) + DISABLE_CONTAINER_LOGGING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableContainerLogging()); - hash = (37 * hash) + ENABLE_ACCESS_LOGGING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAccessLogging()); - if (hasPrivateEndpoints()) { - hash = (37 * hash) + PRIVATE_ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + getPrivateEndpoints().hashCode(); - } - if (hasFasterDeploymentConfig()) { - hash = (37 * hash) + FASTER_DEPLOYMENT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getFasterDeploymentConfig().hashCode(); - } - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - if (!internalGetSystemLabels().getMap().isEmpty()) { - hash = (37 * hash) + SYSTEM_LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetSystemLabels().hashCode(); - } - hash = (37 * hash) + CHECKPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getCheckpointId().hashCode(); - if (hasSpeculativeDecodingSpec()) { - hash = (37 * hash) + SPECULATIVE_DECODING_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSpeculativeDecodingSpec().hashCode(); - } - switch (predictionResourcesCase_) { - case 7: - hash = (37 * hash) + DEDICATED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getDedicatedResources().hashCode(); - break; - case 8: - hash = (37 * hash) + AUTOMATIC_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getAutomaticResources().hashCode(); - break; - case 17: - hash = (37 * hash) + SHARED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getSharedResources().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel 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.vertexai.api.DeployedModel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel 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.vertexai.api.DeployedModel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DeployedModel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DeployedModel 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A deployment of a Model. Endpoints contain one or more DeployedModels.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DeployedModel} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DeployedModel) - com.google.cloud.vertexai.api.DeployedModelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 28: - return internalGetSystemLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 28: - return internalGetMutableSystemLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DeployedModel.class, - com.google.cloud.vertexai.api.DeployedModel.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DeployedModel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetExplanationSpecFieldBuilder(); - internalGetPrivateEndpointsFieldBuilder(); - internalGetFasterDeploymentConfigFieldBuilder(); - internalGetStatusFieldBuilder(); - internalGetSpeculativeDecodingSpecFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (dedicatedResourcesBuilder_ != null) { - dedicatedResourcesBuilder_.clear(); - } - if (automaticResourcesBuilder_ != null) { - automaticResourcesBuilder_.clear(); - } - id_ = ""; - model_ = ""; - modelVersionId_ = ""; - displayName_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - explanationSpec_ = null; - if (explanationSpecBuilder_ != null) { - explanationSpecBuilder_.dispose(); - explanationSpecBuilder_ = null; - } - disableExplanations_ = false; - serviceAccount_ = ""; - disableContainerLogging_ = false; - enableAccessLogging_ = false; - privateEndpoints_ = null; - if (privateEndpointsBuilder_ != null) { - privateEndpointsBuilder_.dispose(); - privateEndpointsBuilder_ = null; - } - fasterDeploymentConfig_ = null; - if (fasterDeploymentConfigBuilder_ != null) { - fasterDeploymentConfigBuilder_.dispose(); - fasterDeploymentConfigBuilder_ = null; - } - status_ = null; - if (statusBuilder_ != null) { - statusBuilder_.dispose(); - statusBuilder_ = null; - } - internalGetMutableSystemLabels().clear(); - checkpointId_ = ""; - speculativeDecodingSpec_ = null; - if (speculativeDecodingSpecBuilder_ != null) { - speculativeDecodingSpecBuilder_.dispose(); - speculativeDecodingSpecBuilder_ = null; - } - predictionResourcesCase_ = 0; - predictionResources_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel build() { - com.google.cloud.vertexai.api.DeployedModel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel buildPartial() { - com.google.cloud.vertexai.api.DeployedModel result = - new com.google.cloud.vertexai.api.DeployedModel(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DeployedModel result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.model_ = model_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.modelVersionId_ = modelVersionId_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.displayName_ = displayName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000080) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.explanationSpec_ = - explanationSpecBuilder_ == null ? explanationSpec_ : explanationSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.disableExplanations_ = disableExplanations_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.serviceAccount_ = serviceAccount_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.disableContainerLogging_ = disableContainerLogging_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.enableAccessLogging_ = enableAccessLogging_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.privateEndpoints_ = - privateEndpointsBuilder_ == null ? privateEndpoints_ : privateEndpointsBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.fasterDeploymentConfig_ = - fasterDeploymentConfigBuilder_ == null - ? fasterDeploymentConfig_ - : fasterDeploymentConfigBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.systemLabels_ = internalGetSystemLabels(); - result.systemLabels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.checkpointId_ = checkpointId_; - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.speculativeDecodingSpec_ = - speculativeDecodingSpecBuilder_ == null - ? speculativeDecodingSpec_ - : speculativeDecodingSpecBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.DeployedModel result) { - result.predictionResourcesCase_ = predictionResourcesCase_; - result.predictionResources_ = this.predictionResources_; - if (predictionResourcesCase_ == 7 && dedicatedResourcesBuilder_ != null) { - result.predictionResources_ = dedicatedResourcesBuilder_.build(); - } - if (predictionResourcesCase_ == 8 && automaticResourcesBuilder_ != null) { - result.predictionResources_ = automaticResourcesBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DeployedModel) { - return mergeFrom((com.google.cloud.vertexai.api.DeployedModel) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DeployedModel other) { - if (other == com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.getModelVersionId().isEmpty()) { - modelVersionId_ = other.modelVersionId_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasExplanationSpec()) { - mergeExplanationSpec(other.getExplanationSpec()); - } - if (other.getDisableExplanations() != false) { - setDisableExplanations(other.getDisableExplanations()); - } - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.getDisableContainerLogging() != false) { - setDisableContainerLogging(other.getDisableContainerLogging()); - } - if (other.getEnableAccessLogging() != false) { - setEnableAccessLogging(other.getEnableAccessLogging()); - } - if (other.hasPrivateEndpoints()) { - mergePrivateEndpoints(other.getPrivateEndpoints()); - } - if (other.hasFasterDeploymentConfig()) { - mergeFasterDeploymentConfig(other.getFasterDeploymentConfig()); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - internalGetMutableSystemLabels().mergeFrom(other.internalGetSystemLabels()); - bitField0_ |= 0x00010000; - if (!other.getCheckpointId().isEmpty()) { - checkpointId_ = other.checkpointId_; - bitField0_ |= 0x00020000; - onChanged(); - } - if (other.hasSpeculativeDecodingSpec()) { - mergeSpeculativeDecodingSpec(other.getSpeculativeDecodingSpec()); - } - switch (other.getPredictionResourcesCase()) { - case DEDICATED_RESOURCES: - { - mergeDedicatedResources(other.getDedicatedResources()); - break; - } - case AUTOMATIC_RESOURCES: - { - mergeAutomaticResources(other.getAutomaticResources()); - break; - } - case SHARED_RESOURCES: - { - predictionResourcesCase_ = 17; - predictionResources_ = other.predictionResources_; - onChanged(); - break; - } - case PREDICTIONRESOURCES_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: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 10 - case 18: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 18 - case 26: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 26 - case 50: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetDedicatedResourcesFieldBuilder().getBuilder(), extensionRegistry); - predictionResourcesCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetAutomaticResourcesFieldBuilder().getBuilder(), extensionRegistry); - predictionResourcesCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetExplanationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 90: - { - serviceAccount_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 90 - case 104: - { - enableAccessLogging_ = input.readBool(); - bitField0_ |= 0x00001000; - break; - } // case 104 - case 114: - { - input.readMessage( - internalGetPrivateEndpointsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 114 - case 120: - { - disableContainerLogging_ = input.readBool(); - bitField0_ |= 0x00000800; - break; - } // case 120 - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - predictionResourcesCase_ = 17; - predictionResources_ = s; - break; - } // case 138 - case 146: - { - modelVersionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 146 - case 152: - { - disableExplanations_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } // case 152 - case 186: - { - input.readMessage( - internalGetFasterDeploymentConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00004000; - break; - } // case 186 - case 210: - { - input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; - break; - } // case 210 - case 226: - { - com.google.protobuf.MapEntry systemLabels__ = - input.readMessage( - SystemLabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableSystemLabels() - .getMutableMap() - .put(systemLabels__.getKey(), systemLabels__.getValue()); - bitField0_ |= 0x00010000; - break; - } // case 226 - case 234: - { - checkpointId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - break; - } // case 234 - case 242: - { - input.readMessage( - internalGetSpeculativeDecodingSpecFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00040000; - break; - } // case 242 - 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 predictionResourcesCase_ = 0; - private java.lang.Object predictionResources_; - - public PredictionResourcesCase getPredictionResourcesCase() { - return PredictionResourcesCase.forNumber(predictionResourcesCase_); - } - - public Builder clearPredictionResources() { - predictionResourcesCase_ = 0; - predictionResources_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DedicatedResources, - com.google.cloud.vertexai.api.DedicatedResources.Builder, - com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder> - dedicatedResourcesBuilder_; - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return Whether the dedicatedResources field is set. - */ - @java.lang.Override - public boolean hasDedicatedResources() { - return predictionResourcesCase_ == 7; - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return The dedicatedResources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResources getDedicatedResources() { - if (dedicatedResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 7) { - return (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_; - } - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } else { - if (predictionResourcesCase_ == 7) { - return dedicatedResourcesBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - public Builder setDedicatedResources(com.google.cloud.vertexai.api.DedicatedResources value) { - if (dedicatedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predictionResources_ = value; - onChanged(); - } else { - dedicatedResourcesBuilder_.setMessage(value); - } - predictionResourcesCase_ = 7; - return this; - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - public Builder setDedicatedResources( - com.google.cloud.vertexai.api.DedicatedResources.Builder builderForValue) { - if (dedicatedResourcesBuilder_ == null) { - predictionResources_ = builderForValue.build(); - onChanged(); - } else { - dedicatedResourcesBuilder_.setMessage(builderForValue.build()); - } - predictionResourcesCase_ = 7; - return this; - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - public Builder mergeDedicatedResources(com.google.cloud.vertexai.api.DedicatedResources value) { - if (dedicatedResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 7 - && predictionResources_ - != com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance()) { - predictionResources_ = - com.google.cloud.vertexai.api.DedicatedResources.newBuilder( - (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_) - .mergeFrom(value) - .buildPartial(); - } else { - predictionResources_ = value; - } - onChanged(); - } else { - if (predictionResourcesCase_ == 7) { - dedicatedResourcesBuilder_.mergeFrom(value); - } else { - dedicatedResourcesBuilder_.setMessage(value); - } - } - predictionResourcesCase_ = 7; - return this; - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - public Builder clearDedicatedResources() { - if (dedicatedResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 7) { - predictionResourcesCase_ = 0; - predictionResources_ = null; - onChanged(); - } - } else { - if (predictionResourcesCase_ == 7) { - predictionResourcesCase_ = 0; - predictionResources_ = null; - } - dedicatedResourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - public com.google.cloud.vertexai.api.DedicatedResources.Builder getDedicatedResourcesBuilder() { - return internalGetDedicatedResourcesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder - getDedicatedResourcesOrBuilder() { - if ((predictionResourcesCase_ == 7) && (dedicatedResourcesBuilder_ != null)) { - return dedicatedResourcesBuilder_.getMessageOrBuilder(); - } else { - if (predictionResourcesCase_ == 7) { - return (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_; - } - return com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * A description of resources that are dedicated to the DeployedModel, and
-     * that need a higher degree of manual configuration.
-     * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DedicatedResources, - com.google.cloud.vertexai.api.DedicatedResources.Builder, - com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder> - internalGetDedicatedResourcesFieldBuilder() { - if (dedicatedResourcesBuilder_ == null) { - if (!(predictionResourcesCase_ == 7)) { - predictionResources_ = - com.google.cloud.vertexai.api.DedicatedResources.getDefaultInstance(); - } - dedicatedResourcesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DedicatedResources, - com.google.cloud.vertexai.api.DedicatedResources.Builder, - com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder>( - (com.google.cloud.vertexai.api.DedicatedResources) predictionResources_, - getParentForChildren(), - isClean()); - predictionResources_ = null; - } - predictionResourcesCase_ = 7; - onChanged(); - return dedicatedResourcesBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.AutomaticResources, - com.google.cloud.vertexai.api.AutomaticResources.Builder, - com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder> - automaticResourcesBuilder_; - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return Whether the automaticResources field is set. - */ - @java.lang.Override - public boolean hasAutomaticResources() { - return predictionResourcesCase_ == 8; - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return The automaticResources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResources getAutomaticResources() { - if (automaticResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 8) { - return (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_; - } - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } else { - if (predictionResourcesCase_ == 8) { - return automaticResourcesBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - public Builder setAutomaticResources(com.google.cloud.vertexai.api.AutomaticResources value) { - if (automaticResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predictionResources_ = value; - onChanged(); - } else { - automaticResourcesBuilder_.setMessage(value); - } - predictionResourcesCase_ = 8; - return this; - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - public Builder setAutomaticResources( - com.google.cloud.vertexai.api.AutomaticResources.Builder builderForValue) { - if (automaticResourcesBuilder_ == null) { - predictionResources_ = builderForValue.build(); - onChanged(); - } else { - automaticResourcesBuilder_.setMessage(builderForValue.build()); - } - predictionResourcesCase_ = 8; - return this; - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - public Builder mergeAutomaticResources(com.google.cloud.vertexai.api.AutomaticResources value) { - if (automaticResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 8 - && predictionResources_ - != com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance()) { - predictionResources_ = - com.google.cloud.vertexai.api.AutomaticResources.newBuilder( - (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_) - .mergeFrom(value) - .buildPartial(); - } else { - predictionResources_ = value; - } - onChanged(); - } else { - if (predictionResourcesCase_ == 8) { - automaticResourcesBuilder_.mergeFrom(value); - } else { - automaticResourcesBuilder_.setMessage(value); - } - } - predictionResourcesCase_ = 8; - return this; - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - public Builder clearAutomaticResources() { - if (automaticResourcesBuilder_ == null) { - if (predictionResourcesCase_ == 8) { - predictionResourcesCase_ = 0; - predictionResources_ = null; - onChanged(); - } - } else { - if (predictionResourcesCase_ == 8) { - predictionResourcesCase_ = 0; - predictionResources_ = null; - } - automaticResourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - public com.google.cloud.vertexai.api.AutomaticResources.Builder getAutomaticResourcesBuilder() { - return internalGetAutomaticResourcesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder - getAutomaticResourcesOrBuilder() { - if ((predictionResourcesCase_ == 8) && (automaticResourcesBuilder_ != null)) { - return automaticResourcesBuilder_.getMessageOrBuilder(); - } else { - if (predictionResourcesCase_ == 8) { - return (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_; - } - return com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * A description of resources that to large degree are decided by Vertex
-     * AI, and require only a modest additional configuration.
-     * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.AutomaticResources, - com.google.cloud.vertexai.api.AutomaticResources.Builder, - com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder> - internalGetAutomaticResourcesFieldBuilder() { - if (automaticResourcesBuilder_ == null) { - if (!(predictionResourcesCase_ == 8)) { - predictionResources_ = - com.google.cloud.vertexai.api.AutomaticResources.getDefaultInstance(); - } - automaticResourcesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.AutomaticResources, - com.google.cloud.vertexai.api.AutomaticResources.Builder, - com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder>( - (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_, - getParentForChildren(), - isClean()); - predictionResources_ = null; - } - predictionResourcesCase_ = 8; - onChanged(); - return automaticResourcesBuilder_; - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return Whether the sharedResources field is set. - */ - @java.lang.Override - public boolean hasSharedResources() { - return predictionResourcesCase_ == 17; - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The sharedResources. - */ - @java.lang.Override - public java.lang.String getSharedResources() { - java.lang.Object ref = ""; - if (predictionResourcesCase_ == 17) { - ref = predictionResources_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (predictionResourcesCase_ == 17) { - predictionResources_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for sharedResources. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSharedResourcesBytes() { - java.lang.Object ref = ""; - if (predictionResourcesCase_ == 17) { - ref = predictionResources_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (predictionResourcesCase_ == 17) { - predictionResources_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @param value The sharedResources to set. - * @return This builder for chaining. - */ - public Builder setSharedResources(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - predictionResourcesCase_ = 17; - predictionResources_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearSharedResources() { - if (predictionResourcesCase_ == 17) { - predictionResourcesCase_ = 0; - predictionResources_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The resource name of the shared DeploymentResourcePool to deploy on.
-     * Format:
-     * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-     * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for sharedResources to set. - * @return This builder for chaining. - */ - public Builder setSharedResourcesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - predictionResourcesCase_ = 17; - predictionResources_ = value; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - - /** - * - * - *
-     * Immutable. The ID of the DeployedModel. If not provided upon deployment,
-     * Vertex AI will generate a value for this ID.
-     *
-     * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-     * 
- * - * string id = 1 [(.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 ID of the DeployedModel. If not provided upon deployment,
-     * Vertex AI will generate a value for this ID.
-     *
-     * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-     * 
- * - * string id = 1 [(.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 ID of the DeployedModel. If not provided upon deployment,
-     * Vertex AI will generate a value for this ID.
-     *
-     * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-     * 
- * - * string id = 1 [(.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 ID of the DeployedModel. If not provided upon deployment,
-     * Vertex AI will generate a value for this ID.
-     *
-     * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The ID of the DeployedModel. If not provided upon deployment,
-     * Vertex AI will generate a value for this ID.
-     *
-     * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-     * 
- * - * string id = 1 [(.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 model_ = ""; - - /** - * - * - *
-     * The resource name of the Model that this is the deployment of. Note that
-     * the Model may be in a different location than the DeployedModel's Endpoint.
-     *
-     * The resource name may contain version id or version alias to specify the
-     * version.
-     * Example: `projects/{project}/locations/{location}/models/{model}@2`
-     * or
-     * `projects/{project}/locations/{location}/models/{model}@golden`
-     * if no version is specified, the default version will be deployed.
-     * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The resource name of the Model that this is the deployment of. Note that
-     * the Model may be in a different location than the DeployedModel's Endpoint.
-     *
-     * The resource name may contain version id or version alias to specify the
-     * version.
-     * Example: `projects/{project}/locations/{location}/models/{model}@2`
-     * or
-     * `projects/{project}/locations/{location}/models/{model}@golden`
-     * if no version is specified, the default version will be deployed.
-     * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The resource name of the Model that this is the deployment of. Note that
-     * the Model may be in a different location than the DeployedModel's Endpoint.
-     *
-     * The resource name may contain version id or version alias to specify the
-     * version.
-     * Example: `projects/{project}/locations/{location}/models/{model}@2`
-     * or
-     * `projects/{project}/locations/{location}/models/{model}@golden`
-     * if no version is specified, the default version will be deployed.
-     * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * The resource name of the Model that this is the deployment of. Note that
-     * the Model may be in a different location than the DeployedModel's Endpoint.
-     *
-     * The resource name may contain version id or version alias to specify the
-     * version.
-     * Example: `projects/{project}/locations/{location}/models/{model}@2`
-     * or
-     * `projects/{project}/locations/{location}/models/{model}@golden`
-     * if no version is specified, the default version will be deployed.
-     * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * The resource name of the Model that this is the deployment of. Note that
-     * the Model may be in a different location than the DeployedModel's Endpoint.
-     *
-     * The resource name may contain version id or version alias to specify the
-     * version.
-     * Example: `projects/{project}/locations/{location}/models/{model}@2`
-     * or
-     * `projects/{project}/locations/{location}/models/{model}@golden`
-     * if no version is specified, the default version will be deployed.
-     * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-     * Output only. The version ID of the model that is deployed.
-     * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelVersionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The version ID of the model that is deployed.
-     * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The version ID of the model that is deployed.
-     * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelVersionId_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The version ID of the model that is deployed.
-     * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearModelVersionId() { - modelVersionId_ = getDefaultInstance().getModelVersionId(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The version ID of the model that is deployed.
-     * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelVersionId_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - - /** - * - * - *
-     * The display name of the DeployedModel. If not provided upon creation,
-     * the Model's display_name is used.
-     * 
- * - * 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 DeployedModel. If not provided upon creation,
-     * the Model's display_name is used.
-     * 
- * - * 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 DeployedModel. If not provided upon creation,
-     * the Model's display_name is used.
-     * 
- * - * 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_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * The display name of the DeployedModel. If not provided upon creation,
-     * the Model's display_name is used.
-     * 
- * - * string display_name = 3; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - /** - * - * - *
-     * The display name of the DeployedModel. If not provided upon creation,
-     * the Model's display_name is used.
-     * 
- * - * 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_ |= 0x00000040; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000080); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when the DeployedModel was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.cloud.vertexai.api.ExplanationSpec explanationSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpec, - com.google.cloud.vertexai.api.ExplanationSpec.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOrBuilder> - explanationSpecBuilder_; - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return Whether the explanationSpec field is set. - */ - public boolean hasExplanationSpec() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return The explanationSpec. - */ - public com.google.cloud.vertexai.api.ExplanationSpec getExplanationSpec() { - if (explanationSpecBuilder_ == null) { - return explanationSpec_ == null - ? com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance() - : explanationSpec_; - } else { - return explanationSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public Builder setExplanationSpec(com.google.cloud.vertexai.api.ExplanationSpec value) { - if (explanationSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - explanationSpec_ = value; - } else { - explanationSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public Builder setExplanationSpec( - com.google.cloud.vertexai.api.ExplanationSpec.Builder builderForValue) { - if (explanationSpecBuilder_ == null) { - explanationSpec_ = builderForValue.build(); - } else { - explanationSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public Builder mergeExplanationSpec(com.google.cloud.vertexai.api.ExplanationSpec value) { - if (explanationSpecBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && explanationSpec_ != null - && explanationSpec_ - != com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance()) { - getExplanationSpecBuilder().mergeFrom(value); - } else { - explanationSpec_ = value; - } - } else { - explanationSpecBuilder_.mergeFrom(value); - } - if (explanationSpec_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public Builder clearExplanationSpec() { - bitField0_ = (bitField0_ & ~0x00000100); - explanationSpec_ = null; - if (explanationSpecBuilder_ != null) { - explanationSpecBuilder_.dispose(); - explanationSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public com.google.cloud.vertexai.api.ExplanationSpec.Builder getExplanationSpecBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetExplanationSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - public com.google.cloud.vertexai.api.ExplanationSpecOrBuilder getExplanationSpecOrBuilder() { - if (explanationSpecBuilder_ != null) { - return explanationSpecBuilder_.getMessageOrBuilder(); - } else { - return explanationSpec_ == null - ? com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance() - : explanationSpec_; - } - } - - /** - * - * - *
-     * Explanation configuration for this DeployedModel.
-     *
-     * When deploying a Model using
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-     * this value overrides the value of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-     * All fields of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * are optional in the request. If a field of
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * is not populated, the value of the same field of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is inherited. If the corresponding
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * is not populated, all fields of the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * will be used for the explanation configuration.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpec, - com.google.cloud.vertexai.api.ExplanationSpec.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOrBuilder> - internalGetExplanationSpecFieldBuilder() { - if (explanationSpecBuilder_ == null) { - explanationSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpec, - com.google.cloud.vertexai.api.ExplanationSpec.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOrBuilder>( - getExplanationSpec(), getParentForChildren(), isClean()); - explanationSpec_ = null; - } - return explanationSpecBuilder_; - } - - private boolean disableExplanations_; - - /** - * - * - *
-     * If true, deploy the model without explainable feature, regardless the
-     * existence of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * or
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
-     * 
- * - * bool disable_explanations = 19; - * - * @return The disableExplanations. - */ - @java.lang.Override - public boolean getDisableExplanations() { - return disableExplanations_; - } - - /** - * - * - *
-     * If true, deploy the model without explainable feature, regardless the
-     * existence of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * or
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
-     * 
- * - * bool disable_explanations = 19; - * - * @param value The disableExplanations to set. - * @return This builder for chaining. - */ - public Builder setDisableExplanations(boolean value) { - - disableExplanations_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, deploy the model without explainable feature, regardless the
-     * existence of
-     * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-     * or
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
-     * 
- * - * bool disable_explanations = 19; - * - * @return This builder for chaining. - */ - public Builder clearDisableExplanations() { - bitField0_ = (bitField0_ & ~0x00000200); - disableExplanations_ = false; - onChanged(); - return this; - } - - private java.lang.Object serviceAccount_ = ""; - - /** - * - * - *
-     * The service account that the DeployedModel's container runs as. Specify the
-     * email address of the service account. If this service account is not
-     * specified, the container runs as a service account that doesn't have access
-     * to the resource project.
-     *
-     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-     * permission on this service account.
-     * 
- * - * string service_account = 11; - * - * @return The serviceAccount. - */ - public java.lang.String getServiceAccount() { - java.lang.Object ref = serviceAccount_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccount_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The service account that the DeployedModel's container runs as. Specify the
-     * email address of the service account. If this service account is not
-     * specified, the container runs as a service account that doesn't have access
-     * to the resource project.
-     *
-     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-     * permission on this service account.
-     * 
- * - * string service_account = 11; - * - * @return The bytes for serviceAccount. - */ - public com.google.protobuf.ByteString getServiceAccountBytes() { - java.lang.Object ref = serviceAccount_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccount_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The service account that the DeployedModel's container runs as. Specify the
-     * email address of the service account. If this service account is not
-     * specified, the container runs as a service account that doesn't have access
-     * to the resource project.
-     *
-     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-     * permission on this service account.
-     * 
- * - * string service_account = 11; - * - * @param value The serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccount(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccount_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * The service account that the DeployedModel's container runs as. Specify the
-     * email address of the service account. If this service account is not
-     * specified, the container runs as a service account that doesn't have access
-     * to the resource project.
-     *
-     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-     * permission on this service account.
-     * 
- * - * string service_account = 11; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccount() { - serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - - /** - * - * - *
-     * The service account that the DeployedModel's container runs as. Specify the
-     * email address of the service account. If this service account is not
-     * specified, the container runs as a service account that doesn't have access
-     * to the resource project.
-     *
-     * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-     * permission on this service account.
-     * 
- * - * string service_account = 11; - * - * @param value The bytes for serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccount_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - private boolean disableContainerLogging_; - - /** - * - * - *
-     * For custom-trained Models and AutoML Tabular Models, the container of the
-     * DeployedModel instances will send `stderr` and `stdout` streams to
-     * Cloud Logging by default. Please note that the logs incur cost,
-     * which are subject to [Cloud Logging
-     * pricing](https://cloud.google.com/logging/pricing).
-     *
-     * User can disable container logging by setting this flag to true.
-     * 
- * - * bool disable_container_logging = 15; - * - * @return The disableContainerLogging. - */ - @java.lang.Override - public boolean getDisableContainerLogging() { - return disableContainerLogging_; - } - - /** - * - * - *
-     * For custom-trained Models and AutoML Tabular Models, the container of the
-     * DeployedModel instances will send `stderr` and `stdout` streams to
-     * Cloud Logging by default. Please note that the logs incur cost,
-     * which are subject to [Cloud Logging
-     * pricing](https://cloud.google.com/logging/pricing).
-     *
-     * User can disable container logging by setting this flag to true.
-     * 
- * - * bool disable_container_logging = 15; - * - * @param value The disableContainerLogging to set. - * @return This builder for chaining. - */ - public Builder setDisableContainerLogging(boolean value) { - - disableContainerLogging_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * For custom-trained Models and AutoML Tabular Models, the container of the
-     * DeployedModel instances will send `stderr` and `stdout` streams to
-     * Cloud Logging by default. Please note that the logs incur cost,
-     * which are subject to [Cloud Logging
-     * pricing](https://cloud.google.com/logging/pricing).
-     *
-     * User can disable container logging by setting this flag to true.
-     * 
- * - * bool disable_container_logging = 15; - * - * @return This builder for chaining. - */ - public Builder clearDisableContainerLogging() { - bitField0_ = (bitField0_ & ~0x00000800); - disableContainerLogging_ = false; - onChanged(); - return this; - } - - private boolean enableAccessLogging_; - - /** - * - * - *
-     * If true, online prediction access logs are sent to Cloud
-     * Logging.
-     * These logs are like standard server access logs, containing
-     * information like timestamp and latency for each prediction request.
-     *
-     * Note that logs may incur a cost, especially if your project
-     * receives prediction requests at a high queries per second rate (QPS).
-     * Estimate your costs before enabling this option.
-     * 
- * - * bool enable_access_logging = 13; - * - * @return The enableAccessLogging. - */ - @java.lang.Override - public boolean getEnableAccessLogging() { - return enableAccessLogging_; - } - - /** - * - * - *
-     * If true, online prediction access logs are sent to Cloud
-     * Logging.
-     * These logs are like standard server access logs, containing
-     * information like timestamp and latency for each prediction request.
-     *
-     * Note that logs may incur a cost, especially if your project
-     * receives prediction requests at a high queries per second rate (QPS).
-     * Estimate your costs before enabling this option.
-     * 
- * - * bool enable_access_logging = 13; - * - * @param value The enableAccessLogging to set. - * @return This builder for chaining. - */ - public Builder setEnableAccessLogging(boolean value) { - - enableAccessLogging_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, online prediction access logs are sent to Cloud
-     * Logging.
-     * These logs are like standard server access logs, containing
-     * information like timestamp and latency for each prediction request.
-     *
-     * Note that logs may incur a cost, especially if your project
-     * receives prediction requests at a high queries per second rate (QPS).
-     * Estimate your costs before enabling this option.
-     * 
- * - * bool enable_access_logging = 13; - * - * @return This builder for chaining. - */ - public Builder clearEnableAccessLogging() { - bitField0_ = (bitField0_ & ~0x00001000); - enableAccessLogging_ = false; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.PrivateEndpoints privateEndpoints_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateEndpoints, - com.google.cloud.vertexai.api.PrivateEndpoints.Builder, - com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder> - privateEndpointsBuilder_; - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the privateEndpoints field is set. - */ - public boolean hasPrivateEndpoints() { - return ((bitField0_ & 0x00002000) != 0); - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The privateEndpoints. - */ - public com.google.cloud.vertexai.api.PrivateEndpoints getPrivateEndpoints() { - if (privateEndpointsBuilder_ == null) { - return privateEndpoints_ == null - ? com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance() - : privateEndpoints_; - } else { - return privateEndpointsBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPrivateEndpoints(com.google.cloud.vertexai.api.PrivateEndpoints value) { - if (privateEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - privateEndpoints_ = value; - } else { - privateEndpointsBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPrivateEndpoints( - com.google.cloud.vertexai.api.PrivateEndpoints.Builder builderForValue) { - if (privateEndpointsBuilder_ == null) { - privateEndpoints_ = builderForValue.build(); - } else { - privateEndpointsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergePrivateEndpoints(com.google.cloud.vertexai.api.PrivateEndpoints value) { - if (privateEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && privateEndpoints_ != null - && privateEndpoints_ - != com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance()) { - getPrivateEndpointsBuilder().mergeFrom(value); - } else { - privateEndpoints_ = value; - } - } else { - privateEndpointsBuilder_.mergeFrom(value); - } - if (privateEndpoints_ != null) { - bitField0_ |= 0x00002000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPrivateEndpoints() { - bitField0_ = (bitField0_ & ~0x00002000); - privateEndpoints_ = null; - if (privateEndpointsBuilder_ != null) { - privateEndpointsBuilder_.dispose(); - privateEndpointsBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.PrivateEndpoints.Builder getPrivateEndpointsBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return internalGetPrivateEndpointsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder getPrivateEndpointsOrBuilder() { - if (privateEndpointsBuilder_ != null) { - return privateEndpointsBuilder_.getMessageOrBuilder(); - } else { - return privateEndpoints_ == null - ? com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance() - : privateEndpoints_; - } - } - - /** - * - * - *
-     * Output only. Provide paths for users to send predict/explain/health
-     * requests directly to the deployed model services running on Cloud via
-     * private services access. This field is populated if
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateEndpoints, - com.google.cloud.vertexai.api.PrivateEndpoints.Builder, - com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder> - internalGetPrivateEndpointsFieldBuilder() { - if (privateEndpointsBuilder_ == null) { - privateEndpointsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateEndpoints, - com.google.cloud.vertexai.api.PrivateEndpoints.Builder, - com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder>( - getPrivateEndpoints(), getParentForChildren(), isClean()); - privateEndpoints_ = null; - } - return privateEndpointsBuilder_; - } - - private com.google.cloud.vertexai.api.FasterDeploymentConfig fasterDeploymentConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FasterDeploymentConfig, - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder, - com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder> - fasterDeploymentConfigBuilder_; - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return Whether the fasterDeploymentConfig field is set. - */ - public boolean hasFasterDeploymentConfig() { - return ((bitField0_ & 0x00004000) != 0); - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return The fasterDeploymentConfig. - */ - public com.google.cloud.vertexai.api.FasterDeploymentConfig getFasterDeploymentConfig() { - if (fasterDeploymentConfigBuilder_ == null) { - return fasterDeploymentConfig_ == null - ? com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance() - : fasterDeploymentConfig_; - } else { - return fasterDeploymentConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public Builder setFasterDeploymentConfig( - com.google.cloud.vertexai.api.FasterDeploymentConfig value) { - if (fasterDeploymentConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fasterDeploymentConfig_ = value; - } else { - fasterDeploymentConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public Builder setFasterDeploymentConfig( - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder builderForValue) { - if (fasterDeploymentConfigBuilder_ == null) { - fasterDeploymentConfig_ = builderForValue.build(); - } else { - fasterDeploymentConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public Builder mergeFasterDeploymentConfig( - com.google.cloud.vertexai.api.FasterDeploymentConfig value) { - if (fasterDeploymentConfigBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) - && fasterDeploymentConfig_ != null - && fasterDeploymentConfig_ - != com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance()) { - getFasterDeploymentConfigBuilder().mergeFrom(value); - } else { - fasterDeploymentConfig_ = value; - } - } else { - fasterDeploymentConfigBuilder_.mergeFrom(value); - } - if (fasterDeploymentConfig_ != null) { - bitField0_ |= 0x00004000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public Builder clearFasterDeploymentConfig() { - bitField0_ = (bitField0_ & ~0x00004000); - fasterDeploymentConfig_ = null; - if (fasterDeploymentConfigBuilder_ != null) { - fasterDeploymentConfigBuilder_.dispose(); - fasterDeploymentConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder - getFasterDeploymentConfigBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return internalGetFasterDeploymentConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - public com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder - getFasterDeploymentConfigOrBuilder() { - if (fasterDeploymentConfigBuilder_ != null) { - return fasterDeploymentConfigBuilder_.getMessageOrBuilder(); - } else { - return fasterDeploymentConfig_ == null - ? com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance() - : fasterDeploymentConfig_; - } - } - - /** - * - * - *
-     * Configuration for faster model deployment.
-     * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FasterDeploymentConfig, - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder, - com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder> - internalGetFasterDeploymentConfigFieldBuilder() { - if (fasterDeploymentConfigBuilder_ == null) { - fasterDeploymentConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FasterDeploymentConfig, - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder, - com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder>( - getFasterDeploymentConfig(), getParentForChildren(), isClean()); - fasterDeploymentConfig_ = null; - } - return fasterDeploymentConfigBuilder_; - } - - private com.google.cloud.vertexai.api.DeployedModel.Status status_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel.Status, - com.google.cloud.vertexai.api.DeployedModel.Status.Builder, - com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder> - statusBuilder_; - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return ((bitField0_ & 0x00008000) != 0); - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.vertexai.api.DeployedModel.Status getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.vertexai.api.DeployedModel.Status value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - } else { - statusBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus( - com.google.cloud.vertexai.api.DeployedModel.Status.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.vertexai.api.DeployedModel.Status value) { - if (statusBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && status_ != null - && status_ != com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance()) { - getStatusBuilder().mergeFrom(value); - } else { - status_ = value; - } - } else { - statusBuilder_.mergeFrom(value); - } - if (status_ != null) { - bitField0_ |= 0x00008000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatus() { - bitField0_ = (bitField0_ & ~0x00008000); - status_ = null; - if (statusBuilder_ != null) { - statusBuilder_.dispose(); - statusBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Status.Builder getStatusBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return internalGetStatusFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.vertexai.api.DeployedModel.Status.getDefaultInstance() - : status_; - } - } - - /** - * - * - *
-     * Output only. Runtime status of the deployed model.
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel.Status, - com.google.cloud.vertexai.api.DeployedModel.Status.Builder, - com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder> - internalGetStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel.Status, - com.google.cloud.vertexai.api.DeployedModel.Status.Builder, - com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder>( - getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - private com.google.protobuf.MapField systemLabels_; - - private com.google.protobuf.MapField - internalGetSystemLabels() { - if (systemLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SystemLabelsDefaultEntryHolder.defaultEntry); - } - return systemLabels_; - } - - private com.google.protobuf.MapField - internalGetMutableSystemLabels() { - if (systemLabels_ == null) { - systemLabels_ = - com.google.protobuf.MapField.newMapField(SystemLabelsDefaultEntryHolder.defaultEntry); - } - if (!systemLabels_.isMutable()) { - systemLabels_ = systemLabels_.copy(); - } - bitField0_ |= 0x00010000; - onChanged(); - return systemLabels_; - } - - public int getSystemLabelsCount() { - return internalGetSystemLabels().getMap().size(); - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public boolean containsSystemLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetSystemLabels().getMap().containsKey(key); - } - - /** Use {@link #getSystemLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSystemLabels() { - return getSystemLabelsMap(); - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public java.util.Map getSystemLabelsMap() { - return internalGetSystemLabels().getMap(); - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public /* nullable */ java.lang.String getSystemLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetSystemLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - @java.lang.Override - public java.lang.String getSystemLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetSystemLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearSystemLabels() { - bitField0_ = (bitField0_ & ~0x00010000); - internalGetMutableSystemLabels().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - public Builder removeSystemLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableSystemLabels().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableSystemLabels() { - bitField0_ |= 0x00010000; - return internalGetMutableSystemLabels().getMutableMap(); - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - public Builder putSystemLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableSystemLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00010000; - return this; - } - - /** - * - * - *
-     * System labels to apply to Model Garden deployments.
-     * System labels are managed by Google for internal use only.
-     * 
- * - * map<string, string> system_labels = 28; - */ - public Builder putAllSystemLabels(java.util.Map values) { - internalGetMutableSystemLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00010000; - return this; - } - - private java.lang.Object checkpointId_ = ""; - - /** - * - * - *
-     * The checkpoint id of the model.
-     * 
- * - * string checkpoint_id = 29; - * - * @return The checkpointId. - */ - public java.lang.String getCheckpointId() { - java.lang.Object ref = checkpointId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - checkpointId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The checkpoint id of the model.
-     * 
- * - * string checkpoint_id = 29; - * - * @return The bytes for checkpointId. - */ - public com.google.protobuf.ByteString getCheckpointIdBytes() { - java.lang.Object ref = checkpointId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - checkpointId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The checkpoint id of the model.
-     * 
- * - * string checkpoint_id = 29; - * - * @param value The checkpointId to set. - * @return This builder for chaining. - */ - public Builder setCheckpointId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - checkpointId_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * The checkpoint id of the model.
-     * 
- * - * string checkpoint_id = 29; - * - * @return This builder for chaining. - */ - public Builder clearCheckpointId() { - checkpointId_ = getDefaultInstance().getCheckpointId(); - bitField0_ = (bitField0_ & ~0x00020000); - onChanged(); - return this; - } - - /** - * - * - *
-     * The checkpoint id of the model.
-     * 
- * - * string checkpoint_id = 29; - * - * @param value The bytes for checkpointId to set. - * @return This builder for chaining. - */ - public Builder setCheckpointIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - checkpointId_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.SpeculativeDecodingSpec speculativeDecodingSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder> - speculativeDecodingSpecBuilder_; - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speculativeDecodingSpec field is set. - */ - public boolean hasSpeculativeDecodingSpec() { - return ((bitField0_ & 0x00040000) != 0); - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speculativeDecodingSpec. - */ - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec getSpeculativeDecodingSpec() { - if (speculativeDecodingSpecBuilder_ == null) { - return speculativeDecodingSpec_ == null - ? com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance() - : speculativeDecodingSpec_; - } else { - return speculativeDecodingSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSpeculativeDecodingSpec( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec value) { - if (speculativeDecodingSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - speculativeDecodingSpec_ = value; - } else { - speculativeDecodingSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSpeculativeDecodingSpec( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder builderForValue) { - if (speculativeDecodingSpecBuilder_ == null) { - speculativeDecodingSpec_ = builderForValue.build(); - } else { - speculativeDecodingSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSpeculativeDecodingSpec( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec value) { - if (speculativeDecodingSpecBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) - && speculativeDecodingSpec_ != null - && speculativeDecodingSpec_ - != com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance()) { - getSpeculativeDecodingSpecBuilder().mergeFrom(value); - } else { - speculativeDecodingSpec_ = value; - } - } else { - speculativeDecodingSpecBuilder_.mergeFrom(value); - } - if (speculativeDecodingSpec_ != null) { - bitField0_ |= 0x00040000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSpeculativeDecodingSpec() { - bitField0_ = (bitField0_ & ~0x00040000); - speculativeDecodingSpec_ = null; - if (speculativeDecodingSpecBuilder_ != null) { - speculativeDecodingSpecBuilder_.dispose(); - speculativeDecodingSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder - getSpeculativeDecodingSpecBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return internalGetSpeculativeDecodingSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder - getSpeculativeDecodingSpecOrBuilder() { - if (speculativeDecodingSpecBuilder_ != null) { - return speculativeDecodingSpecBuilder_.getMessageOrBuilder(); - } else { - return speculativeDecodingSpec_ == null - ? com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance() - : speculativeDecodingSpec_; - } - } - - /** - * - * - *
-     * Optional. Spec for configuring speculative decoding.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder> - internalGetSpeculativeDecodingSpecFieldBuilder() { - if (speculativeDecodingSpecBuilder_ == null) { - speculativeDecodingSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder>( - getSpeculativeDecodingSpec(), getParentForChildren(), isClean()); - speculativeDecodingSpec_ = null; - } - return speculativeDecodingSpecBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DeployedModel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DeployedModel) - private static final com.google.cloud.vertexai.api.DeployedModel DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DeployedModel(); - } - - public static com.google.cloud.vertexai.api.DeployedModel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeployedModel 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.vertexai.api.DeployedModel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java deleted file mode 100644 index dec141dc773b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java +++ /dev/null @@ -1,773 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DeployedModelOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DeployedModel) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return Whether the dedicatedResources field is set. - */ - boolean hasDedicatedResources(); - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - * - * @return The dedicatedResources. - */ - com.google.cloud.vertexai.api.DedicatedResources getDedicatedResources(); - - /** - * - * - *
-   * A description of resources that are dedicated to the DeployedModel, and
-   * that need a higher degree of manual configuration.
-   * 
- * - * .google.cloud.vertexai.v1.DedicatedResources dedicated_resources = 7; - */ - com.google.cloud.vertexai.api.DedicatedResourcesOrBuilder getDedicatedResourcesOrBuilder(); - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return Whether the automaticResources field is set. - */ - boolean hasAutomaticResources(); - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - * - * @return The automaticResources. - */ - com.google.cloud.vertexai.api.AutomaticResources getAutomaticResources(); - - /** - * - * - *
-   * A description of resources that to large degree are decided by Vertex
-   * AI, and require only a modest additional configuration.
-   * 
- * - * .google.cloud.vertexai.v1.AutomaticResources automatic_resources = 8; - */ - com.google.cloud.vertexai.api.AutomaticResourcesOrBuilder getAutomaticResourcesOrBuilder(); - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return Whether the sharedResources field is set. - */ - boolean hasSharedResources(); - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The sharedResources. - */ - java.lang.String getSharedResources(); - - /** - * - * - *
-   * The resource name of the shared DeploymentResourcePool to deploy on.
-   * Format:
-   * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
-   * 
- * - * string shared_resources = 17 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for sharedResources. - */ - com.google.protobuf.ByteString getSharedResourcesBytes(); - - /** - * - * - *
-   * Immutable. The ID of the DeployedModel. If not provided upon deployment,
-   * Vertex AI will generate a value for this ID.
-   *
-   * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - java.lang.String getId(); - - /** - * - * - *
-   * Immutable. The ID of the DeployedModel. If not provided upon deployment,
-   * Vertex AI will generate a value for this ID.
-   *
-   * This value should be 1-10 characters, and valid characters are `/[0-9]/`.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * The resource name of the Model that this is the deployment of. Note that
-   * the Model may be in a different location than the DeployedModel's Endpoint.
-   *
-   * The resource name may contain version id or version alias to specify the
-   * version.
-   * Example: `projects/{project}/locations/{location}/models/{model}@2`
-   * or
-   * `projects/{project}/locations/{location}/models/{model}@golden`
-   * if no version is specified, the default version will be deployed.
-   * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * The resource name of the Model that this is the deployment of. Note that
-   * the Model may be in a different location than the DeployedModel's Endpoint.
-   *
-   * The resource name may contain version id or version alias to specify the
-   * version.
-   * Example: `projects/{project}/locations/{location}/models/{model}@2`
-   * or
-   * `projects/{project}/locations/{location}/models/{model}@golden`
-   * if no version is specified, the default version will be deployed.
-   * 
- * - * string model = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Output only. The version ID of the model that is deployed.
-   * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - java.lang.String getModelVersionId(); - - /** - * - * - *
-   * Output only. The version ID of the model that is deployed.
-   * 
- * - * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - com.google.protobuf.ByteString getModelVersionIdBytes(); - - /** - * - * - *
-   * The display name of the DeployedModel. If not provided upon creation,
-   * the Model's display_name is used.
-   * 
- * - * string display_name = 3; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * The display name of the DeployedModel. If not provided upon creation,
-   * the Model's display_name is used.
-   * 
- * - * string display_name = 3; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Output only. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when the DeployedModel was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return Whether the explanationSpec field is set. - */ - boolean hasExplanationSpec(); - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - * - * @return The explanationSpec. - */ - com.google.cloud.vertexai.api.ExplanationSpec getExplanationSpec(); - - /** - * - * - *
-   * Explanation configuration for this DeployedModel.
-   *
-   * When deploying a Model using
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
-   * this value overrides the value of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
-   * All fields of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * are optional in the request. If a field of
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * is not populated, the value of the same field of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is inherited. If the corresponding
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * is not populated, all fields of the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * will be used for the explanation configuration.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpec explanation_spec = 9; - */ - com.google.cloud.vertexai.api.ExplanationSpecOrBuilder getExplanationSpecOrBuilder(); - - /** - * - * - *
-   * If true, deploy the model without explainable feature, regardless the
-   * existence of
-   * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
-   * or
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
-   * 
- * - * bool disable_explanations = 19; - * - * @return The disableExplanations. - */ - boolean getDisableExplanations(); - - /** - * - * - *
-   * The service account that the DeployedModel's container runs as. Specify the
-   * email address of the service account. If this service account is not
-   * specified, the container runs as a service account that doesn't have access
-   * to the resource project.
-   *
-   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-   * permission on this service account.
-   * 
- * - * string service_account = 11; - * - * @return The serviceAccount. - */ - java.lang.String getServiceAccount(); - - /** - * - * - *
-   * The service account that the DeployedModel's container runs as. Specify the
-   * email address of the service account. If this service account is not
-   * specified, the container runs as a service account that doesn't have access
-   * to the resource project.
-   *
-   * Users deploying the Model must have the `iam.serviceAccounts.actAs`
-   * permission on this service account.
-   * 
- * - * string service_account = 11; - * - * @return The bytes for serviceAccount. - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * For custom-trained Models and AutoML Tabular Models, the container of the
-   * DeployedModel instances will send `stderr` and `stdout` streams to
-   * Cloud Logging by default. Please note that the logs incur cost,
-   * which are subject to [Cloud Logging
-   * pricing](https://cloud.google.com/logging/pricing).
-   *
-   * User can disable container logging by setting this flag to true.
-   * 
- * - * bool disable_container_logging = 15; - * - * @return The disableContainerLogging. - */ - boolean getDisableContainerLogging(); - - /** - * - * - *
-   * If true, online prediction access logs are sent to Cloud
-   * Logging.
-   * These logs are like standard server access logs, containing
-   * information like timestamp and latency for each prediction request.
-   *
-   * Note that logs may incur a cost, especially if your project
-   * receives prediction requests at a high queries per second rate (QPS).
-   * Estimate your costs before enabling this option.
-   * 
- * - * bool enable_access_logging = 13; - * - * @return The enableAccessLogging. - */ - boolean getEnableAccessLogging(); - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the privateEndpoints field is set. - */ - boolean hasPrivateEndpoints(); - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The privateEndpoints. - */ - com.google.cloud.vertexai.api.PrivateEndpoints getPrivateEndpoints(); - - /** - * - * - *
-   * Output only. Provide paths for users to send predict/explain/health
-   * requests directly to the deployed model services running on Cloud via
-   * private services access. This field is populated if
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateEndpoints private_endpoints = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder getPrivateEndpointsOrBuilder(); - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return Whether the fasterDeploymentConfig field is set. - */ - boolean hasFasterDeploymentConfig(); - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - * - * @return The fasterDeploymentConfig. - */ - com.google.cloud.vertexai.api.FasterDeploymentConfig getFasterDeploymentConfig(); - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * .google.cloud.vertexai.v1.FasterDeploymentConfig faster_deployment_config = 23; - */ - com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder - getFasterDeploymentConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.vertexai.api.DeployedModel.Status getStatus(); - - /** - * - * - *
-   * Output only. Runtime status of the deployed model.
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel.Status status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.DeployedModel.StatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - int getSystemLabelsCount(); - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - boolean containsSystemLabels(java.lang.String key); - - /** Use {@link #getSystemLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getSystemLabels(); - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - java.util.Map getSystemLabelsMap(); - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - /* nullable */ - java.lang.String getSystemLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - - /** - * - * - *
-   * System labels to apply to Model Garden deployments.
-   * System labels are managed by Google for internal use only.
-   * 
- * - * map<string, string> system_labels = 28; - */ - java.lang.String getSystemLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * The checkpoint id of the model.
-   * 
- * - * string checkpoint_id = 29; - * - * @return The checkpointId. - */ - java.lang.String getCheckpointId(); - - /** - * - * - *
-   * The checkpoint id of the model.
-   * 
- * - * string checkpoint_id = 29; - * - * @return The bytes for checkpointId. - */ - com.google.protobuf.ByteString getCheckpointIdBytes(); - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speculativeDecodingSpec field is set. - */ - boolean hasSpeculativeDecodingSpec(); - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speculativeDecodingSpec. - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpec getSpeculativeDecodingSpec(); - - /** - * - * - *
-   * Optional. Spec for configuring speculative decoding.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec speculative_decoding_spec = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder - getSpeculativeDecodingSpecOrBuilder(); - - com.google.cloud.vertexai.api.DeployedModel.PredictionResourcesCase getPredictionResourcesCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStage.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStage.java deleted file mode 100644 index 1b6b1c7cabd4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStage.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/deployment_stage.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Stage field indicating the current progress of a deployment.
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.DeploymentStage} - */ -@com.google.protobuf.Generated -public enum DeploymentStage implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Default value. This value is unused.
-   * 
- * - * DEPLOYMENT_STAGE_UNSPECIFIED = 0; - */ - DEPLOYMENT_STAGE_UNSPECIFIED(0), - /** - * - * - *
-   * The deployment is initializing and setting up the environment.
-   * 
- * - * STARTING_DEPLOYMENT = 5; - */ - STARTING_DEPLOYMENT(5), - /** - * - * - *
-   * The deployment is preparing the model assets.
-   * 
- * - * PREPARING_MODEL = 6; - */ - PREPARING_MODEL(6), - /** - * - * - *
-   * The deployment is creating the underlying serving cluster.
-   * 
- * - * CREATING_SERVING_CLUSTER = 7; - */ - CREATING_SERVING_CLUSTER(7), - /** - * - * - *
-   * The deployment is adding nodes to the serving cluster.
-   * 
- * - * ADDING_NODES_TO_CLUSTER = 8; - */ - ADDING_NODES_TO_CLUSTER(8), - /** - * - * - *
-   * The deployment is getting the container image for the model server.
-   * 
- * - * GETTING_CONTAINER_IMAGE = 9; - */ - GETTING_CONTAINER_IMAGE(9), - /** - * - * - *
-   * The deployment is starting the model server.
-   * 
- * - * STARTING_MODEL_SERVER = 3; - */ - STARTING_MODEL_SERVER(3), - /** - * - * - *
-   * The deployment is performing finalization steps.
-   * 
- * - * FINISHING_UP = 4; - */ - FINISHING_UP(4), - /** - * - * - *
-   * The deployment has terminated.
-   * 
- * - * DEPLOYMENT_TERMINATED = 10; - */ - DEPLOYMENT_TERMINATED(10), - /** - * - * - *
-   * The deployment has succeeded.
-   * 
- * - * SUCCESSFULLY_DEPLOYED = 11; - */ - SUCCESSFULLY_DEPLOYED(11), - /** - * - * - *
-   * The deployment has failed.
-   * 
- * - * FAILED_TO_DEPLOY = 12; - */ - FAILED_TO_DEPLOY(12), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeploymentStage"); - } - - /** - * - * - *
-   * Default value. This value is unused.
-   * 
- * - * DEPLOYMENT_STAGE_UNSPECIFIED = 0; - */ - public static final int DEPLOYMENT_STAGE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * The deployment is initializing and setting up the environment.
-   * 
- * - * STARTING_DEPLOYMENT = 5; - */ - public static final int STARTING_DEPLOYMENT_VALUE = 5; - - /** - * - * - *
-   * The deployment is preparing the model assets.
-   * 
- * - * PREPARING_MODEL = 6; - */ - public static final int PREPARING_MODEL_VALUE = 6; - - /** - * - * - *
-   * The deployment is creating the underlying serving cluster.
-   * 
- * - * CREATING_SERVING_CLUSTER = 7; - */ - public static final int CREATING_SERVING_CLUSTER_VALUE = 7; - - /** - * - * - *
-   * The deployment is adding nodes to the serving cluster.
-   * 
- * - * ADDING_NODES_TO_CLUSTER = 8; - */ - public static final int ADDING_NODES_TO_CLUSTER_VALUE = 8; - - /** - * - * - *
-   * The deployment is getting the container image for the model server.
-   * 
- * - * GETTING_CONTAINER_IMAGE = 9; - */ - public static final int GETTING_CONTAINER_IMAGE_VALUE = 9; - - /** - * - * - *
-   * The deployment is starting the model server.
-   * 
- * - * STARTING_MODEL_SERVER = 3; - */ - public static final int STARTING_MODEL_SERVER_VALUE = 3; - - /** - * - * - *
-   * The deployment is performing finalization steps.
-   * 
- * - * FINISHING_UP = 4; - */ - public static final int FINISHING_UP_VALUE = 4; - - /** - * - * - *
-   * The deployment has terminated.
-   * 
- * - * DEPLOYMENT_TERMINATED = 10; - */ - public static final int DEPLOYMENT_TERMINATED_VALUE = 10; - - /** - * - * - *
-   * The deployment has succeeded.
-   * 
- * - * SUCCESSFULLY_DEPLOYED = 11; - */ - public static final int SUCCESSFULLY_DEPLOYED_VALUE = 11; - - /** - * - * - *
-   * The deployment has failed.
-   * 
- * - * FAILED_TO_DEPLOY = 12; - */ - public static final int FAILED_TO_DEPLOY_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 DeploymentStage 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 DeploymentStage forNumber(int value) { - switch (value) { - case 0: - return DEPLOYMENT_STAGE_UNSPECIFIED; - case 5: - return STARTING_DEPLOYMENT; - case 6: - return PREPARING_MODEL; - case 7: - return CREATING_SERVING_CLUSTER; - case 8: - return ADDING_NODES_TO_CLUSTER; - case 9: - return GETTING_CONTAINER_IMAGE; - case 3: - return STARTING_MODEL_SERVER; - case 4: - return FINISHING_UP; - case 10: - return DEPLOYMENT_TERMINATED; - case 11: - return SUCCESSFULLY_DEPLOYED; - case 12: - return FAILED_TO_DEPLOY; - 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 DeploymentStage findValueByNumber(int number) { - return DeploymentStage.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.DeploymentStageProto.getDescriptor().getEnumTypes().get(0); - } - - private static final DeploymentStage[] VALUES = values(); - - public static DeploymentStage 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 DeploymentStage(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.DeploymentStage) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStageProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStageProto.java deleted file mode 100644 index b0af4fe42a76..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeploymentStageProto.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/deployment_stage.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class DeploymentStageProto extends com.google.protobuf.GeneratedFile { - private DeploymentStageProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DeploymentStageProto"); - } - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - 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/vertexai/v1/deployment_st" - + "age.proto\022\030google.cloud.vertexai.v1*\262\002\n\017" - + "DeploymentStage\022 \n\034DEPLOYMENT_STAGE_UNSP" - + "ECIFIED\020\000\022\027\n\023STARTING_DEPLOYMENT\020\005\022\023\n\017PR" - + "EPARING_MODEL\020\006\022\034\n\030CREATING_SERVING_CLUS" - + "TER\020\007\022\033\n\027ADDING_NODES_TO_CLUSTER\020\010\022\033\n\027GE" - + "TTING_CONTAINER_IMAGE\020\t\022\031\n\025STARTING_MODE" - + "L_SERVER\020\003\022\020\n\014FINISHING_UP\020\004\022\031\n\025DEPLOYME" - + "NT_TERMINATED\020\n\022\031\n\025SUCCESSFULLY_DEPLOYED" - + "\020\013\022\024\n\020FAILED_TO_DEPLOY\020\014B\321\001\n\035com.google." - + "cloud.vertexai.apiB\024DeploymentStageProto" - + "P\001Z>cloud.google.com/go/aiplatform/apiv1" - + "/aiplatformpb;aiplatformpb\252\002\032Google.Clou" - + "d.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfor" - + "m\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pr" - + "oto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - descriptor.resolveAllFeaturesImmutable(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java deleted file mode 100644 index 2b7e7ed6f66a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java +++ /dev/null @@ -1,1433 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectPredictRequest} - */ -@com.google.protobuf.Generated -public final class DirectPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DirectPredictRequest) - DirectPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DirectPredictRequest"); - } - - // Use DirectPredictRequest.newBuilder() to construct. - private DirectPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DirectPredictRequest() { - endpoint_ = ""; - inputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectPredictRequest.class, - com.google.cloud.vertexai.api.DirectPredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List inputs_; - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public java.util.List getInputsList() { - return inputs_; - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public java.util.List - getInputsOrBuilderList() { - return inputs_; - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public int getInputsCount() { - return inputs_.size(); - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - return inputs_.get(index); - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - return inputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - output.writeMessage(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); - } - 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.vertexai.api.DirectPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DirectPredictRequest other = - (com.google.cloud.vertexai.api.DirectPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInputsList().equals(other.getInputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInputsCount() > 0) { - hash = (37 * hash) + INPUTS_FIELD_NUMBER; - hash = (53 * hash) + getInputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest 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.vertexai.api.DirectPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest 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.vertexai.api.DirectPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DirectPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DirectPredictRequest) - com.google.cloud.vertexai.api.DirectPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectPredictRequest.class, - com.google.cloud.vertexai.api.DirectPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DirectPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - } else { - inputs_ = null; - inputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DirectPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictRequest build() { - com.google.cloud.vertexai.api.DirectPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictRequest buildPartial() { - com.google.cloud.vertexai.api.DirectPredictRequest result = - new com.google.cloud.vertexai.api.DirectPredictRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.DirectPredictRequest result) { - if (inputsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - inputs_ = java.util.Collections.unmodifiableList(inputs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inputs_ = inputs_; - } else { - result.inputs_ = inputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.DirectPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DirectPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.DirectPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DirectPredictRequest other) { - if (other == com.google.cloud.vertexai.api.DirectPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (inputsBuilder_ == null) { - if (!other.inputs_.isEmpty()) { - if (inputs_.isEmpty()) { - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInputsIsMutable(); - inputs_.addAll(other.inputs_); - } - onChanged(); - } - } else { - if (!other.inputs_.isEmpty()) { - if (inputsBuilder_.isEmpty()) { - inputsBuilder_.dispose(); - inputsBuilder_ = null; - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - inputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInputsFieldBuilder() - : null; - } else { - inputsBuilder_.addAllMessages(other.inputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(m); - } else { - inputsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetParametersFieldBuilder().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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List inputs_ = - java.util.Collections.emptyList(); - - private void ensureInputsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inputs_ = new java.util.ArrayList(inputs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - inputsBuilder_; - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List getInputsList() { - if (inputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputs_); - } else { - return inputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public int getInputsCount() { - if (inputsBuilder_ == null) { - return inputs_.size(); - } else { - return inputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder setInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.set(index, value); - onChanged(); - } else { - inputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder setInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.set(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(value); - onChanged(); - } else { - inputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(index, value); - onChanged(); - } else { - inputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addAllInputs( - java.lang.Iterable values) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_); - onChanged(); - } else { - inputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder clearInputs() { - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - inputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder removeInputs(int index) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.remove(index); - onChanged(); - } else { - inputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getInputsBuilder(int index) { - return internalGetInputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List - getInputsOrBuilderList() { - if (inputsBuilder_ != null) { - return inputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputs_); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder() { - return internalGetInputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder(int index) { - return internalGetInputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List getInputsBuilderList() { - return internalGetInputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetInputsFieldBuilder() { - if (inputsBuilder_ == null) { - inputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - inputs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - inputs_ = null; - } - return inputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DirectPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DirectPredictRequest) - private static final com.google.cloud.vertexai.api.DirectPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DirectPredictRequest(); - } - - public static com.google.cloud.vertexai.api.DirectPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DirectPredictRequest 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.vertexai.api.DirectPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java deleted file mode 100644 index b465afcfb567..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DirectPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DirectPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - java.util.List getInputsList(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - com.google.cloud.vertexai.api.Tensor getInputs(int index); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - int getInputsCount(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - java.util.List getInputsOrBuilderList(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java deleted file mode 100644 index 829963d8f737..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java +++ /dev/null @@ -1,1216 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectPredictResponse} - */ -@com.google.protobuf.Generated -public final class DirectPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DirectPredictResponse) - DirectPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DirectPredictResponse"); - } - - // Use DirectPredictResponse.newBuilder() to construct. - private DirectPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DirectPredictResponse() { - outputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectPredictResponse.class, - com.google.cloud.vertexai.api.DirectPredictResponse.Builder.class); - } - - private int bitField0_; - public static final int OUTPUTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List outputs_; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List getOutputsList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List - getOutputsOrBuilderList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public int getOutputsCount() { - return outputs_.size(); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - return outputs_.get(index); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - return outputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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 < outputs_.size(); i++) { - output.writeMessage(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < outputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); - } - 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.vertexai.api.DirectPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DirectPredictResponse other = - (com.google.cloud.vertexai.api.DirectPredictResponse) obj; - - if (!getOutputsList().equals(other.getOutputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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 (getOutputsCount() > 0) { - hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; - hash = (53 * hash) + getOutputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse 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.vertexai.api.DirectPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse 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.vertexai.api.DirectPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DirectPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DirectPredictResponse) - com.google.cloud.vertexai.api.DirectPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectPredictResponse.class, - com.google.cloud.vertexai.api.DirectPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DirectPredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetOutputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - } else { - outputs_ = null; - outputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DirectPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictResponse build() { - com.google.cloud.vertexai.api.DirectPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectPredictResponse buildPartial() { - com.google.cloud.vertexai.api.DirectPredictResponse result = - new com.google.cloud.vertexai.api.DirectPredictResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.DirectPredictResponse result) { - if (outputsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - outputs_ = java.util.Collections.unmodifiableList(outputs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.outputs_ = outputs_; - } else { - result.outputs_ = outputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.DirectPredictResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DirectPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.DirectPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DirectPredictResponse other) { - if (other == com.google.cloud.vertexai.api.DirectPredictResponse.getDefaultInstance()) - return this; - if (outputsBuilder_ == null) { - if (!other.outputs_.isEmpty()) { - if (outputs_.isEmpty()) { - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOutputsIsMutable(); - outputs_.addAll(other.outputs_); - } - onChanged(); - } - } else { - if (!other.outputs_.isEmpty()) { - if (outputsBuilder_.isEmpty()) { - outputsBuilder_.dispose(); - outputsBuilder_ = null; - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - outputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetOutputsFieldBuilder() - : null; - } else { - outputsBuilder_.addAllMessages(other.outputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(m); - } else { - outputsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetParametersFieldBuilder().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 outputs_ = - java.util.Collections.emptyList(); - - private void ensureOutputsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - outputs_ = new java.util.ArrayList(outputs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - outputsBuilder_; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsList() { - if (outputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputs_); - } else { - return outputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public int getOutputsCount() { - if (outputsBuilder_ == null) { - return outputs_.size(); - } else { - return outputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.set(index, value); - onChanged(); - } else { - outputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.set(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(value); - onChanged(); - } else { - outputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(index, value); - onChanged(); - } else { - outputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addAllOutputs( - java.lang.Iterable values) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputs_); - onChanged(); - } else { - outputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder clearOutputs() { - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - outputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder removeOutputs(int index) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.remove(index); - onChanged(); - } else { - outputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List - getOutputsOrBuilderList() { - if (outputsBuilder_ != null) { - return outputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(outputs_); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder() { - return internalGetOutputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsBuilderList() { - return internalGetOutputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetOutputsFieldBuilder() { - if (outputsBuilder_ == null) { - outputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - outputs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - outputs_ = null; - } - return outputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DirectPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DirectPredictResponse) - private static final com.google.cloud.vertexai.api.DirectPredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DirectPredictResponse(); - } - - public static com.google.cloud.vertexai.api.DirectPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DirectPredictResponse 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.vertexai.api.DirectPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java deleted file mode 100644 index f1733ba29377..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DirectPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DirectPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.Tensor getOutputs(int index); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - int getOutputsCount(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsOrBuilderList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java deleted file mode 100644 index fbe11c5e87fa..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java +++ /dev/null @@ -1,958 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectRawPredictRequest} - */ -@com.google.protobuf.Generated -public final class DirectRawPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DirectRawPredictRequest) - DirectRawPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DirectRawPredictRequest"); - } - - // Use DirectRawPredictRequest.newBuilder() to construct. - private DirectRawPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DirectRawPredictRequest() { - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectRawPredictRequest.class, - com.google.cloud.vertexai.api.DirectRawPredictRequest.Builder.class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METHOD_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object methodName_ = ""; - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - @java.lang.Override - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - 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(); - methodName_ = s; - return s; - } - } - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * bytes input = 3; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, methodName_); - } - if (!input_.isEmpty()) { - output.writeBytes(3, input_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, methodName_); - } - if (!input_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, input_); - } - 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.vertexai.api.DirectRawPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DirectRawPredictRequest other = - (com.google.cloud.vertexai.api.DirectRawPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getMethodName().equals(other.getMethodName())) return false; - if (!getInput().equals(other.getInput())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMethodName().hashCode(); - hash = (37 * hash) + INPUT_FIELD_NUMBER; - hash = (53 * hash) + getInput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest 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.vertexai.api.DirectRawPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest 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.vertexai.api.DirectRawPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DirectRawPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectRawPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DirectRawPredictRequest) - com.google.cloud.vertexai.api.DirectRawPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectRawPredictRequest.class, - com.google.cloud.vertexai.api.DirectRawPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DirectRawPredictRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DirectRawPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictRequest build() { - com.google.cloud.vertexai.api.DirectRawPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictRequest buildPartial() { - com.google.cloud.vertexai.api.DirectRawPredictRequest result = - new com.google.cloud.vertexai.api.DirectRawPredictRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DirectRawPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.methodName_ = methodName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.input_ = input_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DirectRawPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.DirectRawPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DirectRawPredictRequest other) { - if (other == com.google.cloud.vertexai.api.DirectRawPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMethodName().isEmpty()) { - methodName_ = other.methodName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getInput().isEmpty()) { - setInput(other.getInput()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - methodName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input_ = input.readBytes(); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object methodName_ = ""; - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - methodName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @param value The methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearMethodName() { - methodName_ = getDefaultInstance().getMethodName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @param value The bytes for methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @param value The input to set. - * @return This builder for chaining. - */ - public Builder setInput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - input_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @return This builder for chaining. - */ - public Builder clearInput() { - bitField0_ = (bitField0_ & ~0x00000004); - input_ = getDefaultInstance().getInput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DirectRawPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DirectRawPredictRequest) - private static final com.google.cloud.vertexai.api.DirectRawPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DirectRawPredictRequest(); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DirectRawPredictRequest 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.vertexai.api.DirectRawPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java deleted file mode 100644 index 8a2f92c879c7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DirectRawPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DirectRawPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - java.lang.String getMethodName(); - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - com.google.protobuf.ByteString getMethodNameBytes(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * bytes input = 3; - * - * @return The input. - */ - com.google.protobuf.ByteString getInput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java deleted file mode 100644 index d86f06a19222..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectRawPredictResponse} - */ -@com.google.protobuf.Generated -public final class DirectRawPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DirectRawPredictResponse) - DirectRawPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DirectRawPredictResponse"); - } - - // Use DirectRawPredictResponse.newBuilder() to construct. - private DirectRawPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DirectRawPredictResponse() { - output_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectRawPredictResponse.class, - com.google.cloud.vertexai.api.DirectRawPredictResponse.Builder.class); - } - - public static final int OUTPUT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - 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 (!output_.isEmpty()) { - output.writeBytes(1, output_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!output_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, output_); - } - 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.vertexai.api.DirectRawPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DirectRawPredictResponse other = - (com.google.cloud.vertexai.api.DirectRawPredictResponse) obj; - - if (!getOutput().equals(other.getOutput())) 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) + OUTPUT_FIELD_NUMBER; - hash = (53 * hash) + getOutput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse 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.vertexai.api.DirectRawPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse 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.vertexai.api.DirectRawPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DirectRawPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectRawPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DirectRawPredictResponse) - com.google.cloud.vertexai.api.DirectRawPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectRawPredictResponse.class, - com.google.cloud.vertexai.api.DirectRawPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DirectRawPredictResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - output_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DirectRawPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictResponse build() { - com.google.cloud.vertexai.api.DirectRawPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectRawPredictResponse buildPartial() { - com.google.cloud.vertexai.api.DirectRawPredictResponse result = - new com.google.cloud.vertexai.api.DirectRawPredictResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DirectRawPredictResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.output_ = output_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DirectRawPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.DirectRawPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DirectRawPredictResponse other) { - if (other == com.google.cloud.vertexai.api.DirectRawPredictResponse.getDefaultInstance()) - return this; - if (!other.getOutput().isEmpty()) { - setOutput(other.getOutput()); - } - 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: - { - output_ = input.readBytes(); - 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.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @param value The output to set. - * @return This builder for chaining. - */ - public Builder setOutput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - output_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - output_ = getDefaultInstance().getOutput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DirectRawPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DirectRawPredictResponse) - private static final com.google.cloud.vertexai.api.DirectRawPredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DirectRawPredictResponse(); - } - - public static com.google.cloud.vertexai.api.DirectRawPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DirectRawPredictResponse 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.vertexai.api.DirectRawPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java deleted file mode 100644 index e552f7cabadc..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DirectRawPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DirectRawPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - com.google.protobuf.ByteString getOutput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSource.java deleted file mode 100644 index 4895fe03d758..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSource.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The input content is encapsulated and uploaded in the request.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectUploadSource} - */ -@com.google.protobuf.Generated -public final class DirectUploadSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DirectUploadSource) - DirectUploadSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DirectUploadSource"); - } - - // Use DirectUploadSource.newBuilder() to construct. - private DirectUploadSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DirectUploadSource() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_DirectUploadSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectUploadSource.class, - com.google.cloud.vertexai.api.DirectUploadSource.Builder.class); - } - - 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.cloud.vertexai.api.DirectUploadSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DirectUploadSource other = - (com.google.cloud.vertexai.api.DirectUploadSource) 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.cloud.vertexai.api.DirectUploadSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource 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.vertexai.api.DirectUploadSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource 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.vertexai.api.DirectUploadSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DirectUploadSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The input content is encapsulated and uploaded in the request.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DirectUploadSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DirectUploadSource) - com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_DirectUploadSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DirectUploadSource.class, - com.google.cloud.vertexai.api.DirectUploadSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DirectUploadSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSource build() { - com.google.cloud.vertexai.api.DirectUploadSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSource buildPartial() { - com.google.cloud.vertexai.api.DirectUploadSource result = - new com.google.cloud.vertexai.api.DirectUploadSource(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DirectUploadSource) { - return mergeFrom((com.google.cloud.vertexai.api.DirectUploadSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DirectUploadSource other) { - if (other == com.google.cloud.vertexai.api.DirectUploadSource.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DirectUploadSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DirectUploadSource) - private static final com.google.cloud.vertexai.api.DirectUploadSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DirectUploadSource(); - } - - public static com.google.cloud.vertexai.api.DirectUploadSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DirectUploadSource 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.vertexai.api.DirectUploadSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSourceOrBuilder.java deleted file mode 100644 index 9139f5ba49d5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectUploadSourceOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DirectUploadSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DirectUploadSource) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java deleted file mode 100644 index d7538e5bdcbe..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java +++ /dev/null @@ -1,712 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents the spec of disk options.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DiskSpec} - */ -@com.google.protobuf.Generated -public final class DiskSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DiskSpec) - DiskSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DiskSpec"); - } - - // Use DiskSpec.newBuilder() to construct. - private DiskSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DiskSpec() { - bootDiskType_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DiskSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DiskSpec.class, - com.google.cloud.vertexai.api.DiskSpec.Builder.class); - } - - public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object bootDiskType_ = ""; - - /** - * - * - *
-   * Type of the boot disk. For non-A3U machines, the default value is
-   * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-   * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-   * 
- * - * string boot_disk_type = 1; - * - * @return The bootDiskType. - */ - @java.lang.Override - public java.lang.String getBootDiskType() { - java.lang.Object ref = bootDiskType_; - 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(); - bootDiskType_ = s; - return s; - } - } - - /** - * - * - *
-   * Type of the boot disk. For non-A3U machines, the default value is
-   * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-   * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-   * 
- * - * string boot_disk_type = 1; - * - * @return The bytes for bootDiskType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBootDiskTypeBytes() { - java.lang.Object ref = bootDiskType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bootDiskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 2; - private int bootDiskSizeGb_ = 0; - - /** - * - * - *
-   * Size in GB of the boot disk (default is 100GB).
-   * 
- * - * int32 boot_disk_size_gb = 2; - * - * @return The bootDiskSizeGb. - */ - @java.lang.Override - public int getBootDiskSizeGb() { - return bootDiskSizeGb_; - } - - 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.GeneratedMessage.isStringEmpty(bootDiskType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, bootDiskType_); - } - if (bootDiskSizeGb_ != 0) { - output.writeInt32(2, bootDiskSizeGb_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bootDiskType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, bootDiskType_); - } - if (bootDiskSizeGb_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, bootDiskSizeGb_); - } - 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.vertexai.api.DiskSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DiskSpec other = (com.google.cloud.vertexai.api.DiskSpec) obj; - - if (!getBootDiskType().equals(other.getBootDiskType())) return false; - if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) 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) + BOOT_DISK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBootDiskType().hashCode(); - hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; - hash = (53 * hash) + getBootDiskSizeGb(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DiskSpec 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.vertexai.api.DiskSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DiskSpec 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.vertexai.api.DiskSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DiskSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DiskSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents the spec of disk options.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DiskSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DiskSpec) - com.google.cloud.vertexai.api.DiskSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DiskSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DiskSpec.class, - com.google.cloud.vertexai.api.DiskSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DiskSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - bootDiskType_ = ""; - bootDiskSizeGb_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DiskSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DiskSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DiskSpec build() { - com.google.cloud.vertexai.api.DiskSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DiskSpec buildPartial() { - com.google.cloud.vertexai.api.DiskSpec result = - new com.google.cloud.vertexai.api.DiskSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DiskSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.bootDiskType_ = bootDiskType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.bootDiskSizeGb_ = bootDiskSizeGb_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DiskSpec) { - return mergeFrom((com.google.cloud.vertexai.api.DiskSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DiskSpec other) { - if (other == com.google.cloud.vertexai.api.DiskSpec.getDefaultInstance()) return this; - if (!other.getBootDiskType().isEmpty()) { - bootDiskType_ = other.bootDiskType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getBootDiskSizeGb() != 0) { - setBootDiskSizeGb(other.getBootDiskSizeGb()); - } - 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: - { - bootDiskType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - bootDiskSizeGb_ = 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 bootDiskType_ = ""; - - /** - * - * - *
-     * Type of the boot disk. For non-A3U machines, the default value is
-     * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-     * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-     * 
- * - * string boot_disk_type = 1; - * - * @return The bootDiskType. - */ - public java.lang.String getBootDiskType() { - java.lang.Object ref = bootDiskType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bootDiskType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Type of the boot disk. For non-A3U machines, the default value is
-     * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-     * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-     * 
- * - * string boot_disk_type = 1; - * - * @return The bytes for bootDiskType. - */ - public com.google.protobuf.ByteString getBootDiskTypeBytes() { - java.lang.Object ref = bootDiskType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bootDiskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Type of the boot disk. For non-A3U machines, the default value is
-     * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-     * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-     * 
- * - * string boot_disk_type = 1; - * - * @param value The bootDiskType to set. - * @return This builder for chaining. - */ - public Builder setBootDiskType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bootDiskType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Type of the boot disk. For non-A3U machines, the default value is
-     * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-     * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-     * 
- * - * string boot_disk_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearBootDiskType() { - bootDiskType_ = getDefaultInstance().getBootDiskType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Type of the boot disk. For non-A3U machines, the default value is
-     * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-     * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-     * 
- * - * string boot_disk_type = 1; - * - * @param value The bytes for bootDiskType to set. - * @return This builder for chaining. - */ - public Builder setBootDiskTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bootDiskType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int bootDiskSizeGb_; - - /** - * - * - *
-     * Size in GB of the boot disk (default is 100GB).
-     * 
- * - * int32 boot_disk_size_gb = 2; - * - * @return The bootDiskSizeGb. - */ - @java.lang.Override - public int getBootDiskSizeGb() { - return bootDiskSizeGb_; - } - - /** - * - * - *
-     * Size in GB of the boot disk (default is 100GB).
-     * 
- * - * int32 boot_disk_size_gb = 2; - * - * @param value The bootDiskSizeGb to set. - * @return This builder for chaining. - */ - public Builder setBootDiskSizeGb(int value) { - - bootDiskSizeGb_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Size in GB of the boot disk (default is 100GB).
-     * 
- * - * int32 boot_disk_size_gb = 2; - * - * @return This builder for chaining. - */ - public Builder clearBootDiskSizeGb() { - bitField0_ = (bitField0_ & ~0x00000002); - bootDiskSizeGb_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DiskSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DiskSpec) - private static final com.google.cloud.vertexai.api.DiskSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DiskSpec(); - } - - public static com.google.cloud.vertexai.api.DiskSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiskSpec 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.vertexai.api.DiskSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java deleted file mode 100644 index 056cc85432f7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DiskSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DiskSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Type of the boot disk. For non-A3U machines, the default value is
-   * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-   * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-   * 
- * - * string boot_disk_type = 1; - * - * @return The bootDiskType. - */ - java.lang.String getBootDiskType(); - - /** - * - * - *
-   * Type of the boot disk. For non-A3U machines, the default value is
-   * "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced".
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive),
-   * "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced".
-   * 
- * - * string boot_disk_type = 1; - * - * @return The bytes for bootDiskType. - */ - com.google.protobuf.ByteString getBootDiskTypeBytes(); - - /** - * - * - *
-   * Size in GB of the boot disk (default is 100GB).
-   * 
- * - * int32 boot_disk_size_gb = 2; - * - * @return The bootDiskSizeGb. - */ - int getBootDiskSizeGb(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfig.java deleted file mode 100644 index 077ff386b081..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfig.java +++ /dev/null @@ -1,1014 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * DNS peering configuration. These configurations are used to create
- * DNS peering zones in the Vertex tenant project VPC, enabling resolution
- * of records within the specified domain hosted in the target network's
- * Cloud DNS.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DnsPeeringConfig} - */ -@com.google.protobuf.Generated -public final class DnsPeeringConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DnsPeeringConfig) - DnsPeeringConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DnsPeeringConfig"); - } - - // Use DnsPeeringConfig.newBuilder() to construct. - private DnsPeeringConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DnsPeeringConfig() { - domain_ = ""; - targetProject_ = ""; - targetNetwork_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DnsPeeringConfig.class, - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder.class); - } - - public static final int DOMAIN_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object domain_ = ""; - - /** - * - * - *
-   * Required. The DNS name suffix of the zone being peered to, e.g.,
-   * "my-internal-domain.corp.". Must end with a dot.
-   * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The domain. - */ - @java.lang.Override - public java.lang.String getDomain() { - java.lang.Object ref = domain_; - 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(); - domain_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The DNS name suffix of the zone being peered to, e.g.,
-   * "my-internal-domain.corp.". Must end with a dot.
-   * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for domain. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDomainBytes() { - java.lang.Object ref = domain_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - domain_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_PROJECT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object targetProject_ = ""; - - /** - * - * - *
-   * Required. The project ID hosting the Cloud DNS managed zone that
-   * contains the 'domain'. The Vertex AI Service Agent requires the
-   * dns.peer role on this project.
-   * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetProject. - */ - @java.lang.Override - public java.lang.String getTargetProject() { - java.lang.Object ref = targetProject_; - 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(); - targetProject_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The project ID hosting the Cloud DNS managed zone that
-   * contains the 'domain'. The Vertex AI Service Agent requires the
-   * dns.peer role on this project.
-   * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetProject. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetProjectBytes() { - java.lang.Object ref = targetProject_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_NETWORK_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object targetNetwork_ = ""; - - /** - * - * - *
-   * Required. The VPC network name
-   * in the target_project where the DNS zone specified by 'domain' is
-   * visible.
-   * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetNetwork. - */ - @java.lang.Override - public java.lang.String getTargetNetwork() { - java.lang.Object ref = targetNetwork_; - 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(); - targetNetwork_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The VPC network name
-   * in the target_project where the DNS zone specified by 'domain' is
-   * visible.
-   * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetNetwork. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetNetworkBytes() { - java.lang.Object ref = targetNetwork_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetNetwork_ = 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.GeneratedMessage.isStringEmpty(domain_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, domain_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetProject_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, targetProject_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetNetwork_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, targetNetwork_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(domain_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, domain_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetProject_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, targetProject_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetNetwork_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetNetwork_); - } - 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.vertexai.api.DnsPeeringConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DnsPeeringConfig other = - (com.google.cloud.vertexai.api.DnsPeeringConfig) obj; - - if (!getDomain().equals(other.getDomain())) return false; - if (!getTargetProject().equals(other.getTargetProject())) return false; - if (!getTargetNetwork().equals(other.getTargetNetwork())) 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) + DOMAIN_FIELD_NUMBER; - hash = (53 * hash) + getDomain().hashCode(); - hash = (37 * hash) + TARGET_PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getTargetProject().hashCode(); - hash = (37 * hash) + TARGET_NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getTargetNetwork().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig 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.vertexai.api.DnsPeeringConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig 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.vertexai.api.DnsPeeringConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DnsPeeringConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * DNS peering configuration. These configurations are used to create
-   * DNS peering zones in the Vertex tenant project VPC, enabling resolution
-   * of records within the specified domain hosted in the target network's
-   * Cloud DNS.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DnsPeeringConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DnsPeeringConfig) - com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DnsPeeringConfig.class, - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DnsPeeringConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - domain_ = ""; - targetProject_ = ""; - targetNetwork_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DnsPeeringConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DnsPeeringConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DnsPeeringConfig build() { - com.google.cloud.vertexai.api.DnsPeeringConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DnsPeeringConfig buildPartial() { - com.google.cloud.vertexai.api.DnsPeeringConfig result = - new com.google.cloud.vertexai.api.DnsPeeringConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DnsPeeringConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.domain_ = domain_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.targetProject_ = targetProject_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.targetNetwork_ = targetNetwork_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DnsPeeringConfig) { - return mergeFrom((com.google.cloud.vertexai.api.DnsPeeringConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DnsPeeringConfig other) { - if (other == com.google.cloud.vertexai.api.DnsPeeringConfig.getDefaultInstance()) return this; - if (!other.getDomain().isEmpty()) { - domain_ = other.domain_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTargetProject().isEmpty()) { - targetProject_ = other.targetProject_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTargetNetwork().isEmpty()) { - targetNetwork_ = other.targetNetwork_; - 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: - { - domain_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - targetProject_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - targetNetwork_ = 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 domain_ = ""; - - /** - * - * - *
-     * Required. The DNS name suffix of the zone being peered to, e.g.,
-     * "my-internal-domain.corp.". Must end with a dot.
-     * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The domain. - */ - public java.lang.String getDomain() { - java.lang.Object ref = domain_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - domain_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The DNS name suffix of the zone being peered to, e.g.,
-     * "my-internal-domain.corp.". Must end with a dot.
-     * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for domain. - */ - public com.google.protobuf.ByteString getDomainBytes() { - java.lang.Object ref = domain_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - domain_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The DNS name suffix of the zone being peered to, e.g.,
-     * "my-internal-domain.corp.". Must end with a dot.
-     * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The domain to set. - * @return This builder for chaining. - */ - public Builder setDomain(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - domain_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DNS name suffix of the zone being peered to, e.g.,
-     * "my-internal-domain.corp.". Must end with a dot.
-     * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDomain() { - domain_ = getDefaultInstance().getDomain(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DNS name suffix of the zone being peered to, e.g.,
-     * "my-internal-domain.corp.". Must end with a dot.
-     * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for domain to set. - * @return This builder for chaining. - */ - public Builder setDomainBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - domain_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object targetProject_ = ""; - - /** - * - * - *
-     * Required. The project ID hosting the Cloud DNS managed zone that
-     * contains the 'domain'. The Vertex AI Service Agent requires the
-     * dns.peer role on this project.
-     * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetProject. - */ - public java.lang.String getTargetProject() { - java.lang.Object ref = targetProject_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetProject_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The project ID hosting the Cloud DNS managed zone that
-     * contains the 'domain'. The Vertex AI Service Agent requires the
-     * dns.peer role on this project.
-     * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetProject. - */ - public com.google.protobuf.ByteString getTargetProjectBytes() { - java.lang.Object ref = targetProject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The project ID hosting the Cloud DNS managed zone that
-     * contains the 'domain'. The Vertex AI Service Agent requires the
-     * dns.peer role on this project.
-     * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The targetProject to set. - * @return This builder for chaining. - */ - public Builder setTargetProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - targetProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The project ID hosting the Cloud DNS managed zone that
-     * contains the 'domain'. The Vertex AI Service Agent requires the
-     * dns.peer role on this project.
-     * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTargetProject() { - targetProject_ = getDefaultInstance().getTargetProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The project ID hosting the Cloud DNS managed zone that
-     * contains the 'domain'. The Vertex AI Service Agent requires the
-     * dns.peer role on this project.
-     * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for targetProject to set. - * @return This builder for chaining. - */ - public Builder setTargetProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - targetProject_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object targetNetwork_ = ""; - - /** - * - * - *
-     * Required. The VPC network name
-     * in the target_project where the DNS zone specified by 'domain' is
-     * visible.
-     * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetNetwork. - */ - public java.lang.String getTargetNetwork() { - java.lang.Object ref = targetNetwork_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetNetwork_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The VPC network name
-     * in the target_project where the DNS zone specified by 'domain' is
-     * visible.
-     * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetNetwork. - */ - public com.google.protobuf.ByteString getTargetNetworkBytes() { - java.lang.Object ref = targetNetwork_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetNetwork_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The VPC network name
-     * in the target_project where the DNS zone specified by 'domain' is
-     * visible.
-     * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The targetNetwork to set. - * @return This builder for chaining. - */ - public Builder setTargetNetwork(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - targetNetwork_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The VPC network name
-     * in the target_project where the DNS zone specified by 'domain' is
-     * visible.
-     * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTargetNetwork() { - targetNetwork_ = getDefaultInstance().getTargetNetwork(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The VPC network name
-     * in the target_project where the DNS zone specified by 'domain' is
-     * visible.
-     * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for targetNetwork to set. - * @return This builder for chaining. - */ - public Builder setTargetNetworkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - targetNetwork_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DnsPeeringConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DnsPeeringConfig) - private static final com.google.cloud.vertexai.api.DnsPeeringConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DnsPeeringConfig(); - } - - public static com.google.cloud.vertexai.api.DnsPeeringConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DnsPeeringConfig 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.vertexai.api.DnsPeeringConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfigOrBuilder.java deleted file mode 100644 index 5670ffa1ea5f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DnsPeeringConfigOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DnsPeeringConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DnsPeeringConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The DNS name suffix of the zone being peered to, e.g.,
-   * "my-internal-domain.corp.". Must end with a dot.
-   * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The domain. - */ - java.lang.String getDomain(); - - /** - * - * - *
-   * Required. The DNS name suffix of the zone being peered to, e.g.,
-   * "my-internal-domain.corp.". Must end with a dot.
-   * 
- * - * string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for domain. - */ - com.google.protobuf.ByteString getDomainBytes(); - - /** - * - * - *
-   * Required. The project ID hosting the Cloud DNS managed zone that
-   * contains the 'domain'. The Vertex AI Service Agent requires the
-   * dns.peer role on this project.
-   * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetProject. - */ - java.lang.String getTargetProject(); - - /** - * - * - *
-   * Required. The project ID hosting the Cloud DNS managed zone that
-   * contains the 'domain'. The Vertex AI Service Agent requires the
-   * dns.peer role on this project.
-   * 
- * - * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetProject. - */ - com.google.protobuf.ByteString getTargetProjectBytes(); - - /** - * - * - *
-   * Required. The VPC network name
-   * in the target_project where the DNS zone specified by 'domain' is
-   * visible.
-   * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetNetwork. - */ - java.lang.String getTargetNetwork(); - - /** - * - * - *
-   * Required. The VPC network name
-   * in the target_project where the DNS zone specified by 'domain' is
-   * visible.
-   * 
- * - * string target_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetNetwork. - */ - com.google.protobuf.ByteString getTargetNetworkBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java deleted file mode 100644 index 243beffd23f2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A list of double values.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DoubleArray} - */ -@com.google.protobuf.Generated -public final class DoubleArray extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DoubleArray) - DoubleArrayOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DoubleArray"); - } - - // Use DoubleArray.newBuilder() to construct. - private DoubleArray(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DoubleArray() { - values_ = emptyDoubleList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_DoubleArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DoubleArray.class, - com.google.cloud.vertexai.api.DoubleArray.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); - - /** - * - * - *
-   * A list of double values.
-   * 
- * - * repeated double values = 1; - * - * @return A list containing the values. - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - - /** - * - * - *
-   * A list of double values.
-   * 
- * - * repeated double values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-   * A list of 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.vertexai.api.DoubleArray)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DoubleArray other = - (com.google.cloud.vertexai.api.DoubleArray) 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.vertexai.api.DoubleArray parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DoubleArray 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.vertexai.api.DoubleArray parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DoubleArray 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.vertexai.api.DoubleArray parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DoubleArray parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DoubleArray 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A list of double values.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DoubleArray} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DoubleArray) - com.google.cloud.vertexai.api.DoubleArrayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_DoubleArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DoubleArray.class, - com.google.cloud.vertexai.api.DoubleArray.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DoubleArray.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DoubleArray getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DoubleArray.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DoubleArray build() { - com.google.cloud.vertexai.api.DoubleArray result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DoubleArray buildPartial() { - com.google.cloud.vertexai.api.DoubleArray result = - new com.google.cloud.vertexai.api.DoubleArray(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DoubleArray result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DoubleArray) { - return mergeFrom((com.google.cloud.vertexai.api.DoubleArray) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DoubleArray other) { - if (other == com.google.cloud.vertexai.api.DoubleArray.getDefaultInstance()) return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - values_.makeImmutable(); - 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); - int alloc = length > 4096 ? 4096 : length; - ensureValuesIsMutable(alloc / 8); - 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 (!values_.isModifiable()) { - values_ = makeMutableCopy(values_); - } - bitField0_ |= 0x00000001; - } - - private void ensureValuesIsMutable(int capacity) { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_, capacity); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * A list of double values.
-     * 
- * - * repeated double values = 1; - * - * @return A list containing the values. - */ - public java.util.List getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-     * A list of double values.
-     * 
- * - * repeated double values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * A list of 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); - } - - /** - * - * - *
-     * A list of 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); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of 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); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of 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_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of double values.
-     * 
- * - * repeated double values = 1; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DoubleArray) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DoubleArray) - private static final com.google.cloud.vertexai.api.DoubleArray DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DoubleArray(); - } - - public static com.google.cloud.vertexai.api.DoubleArray getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleArray 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.vertexai.api.DoubleArray getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java deleted file mode 100644 index 667e03fd5f4e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DoubleArrayOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DoubleArray) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of double values.
-   * 
- * - * repeated double values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-   * A list of double values.
-   * 
- * - * repeated double values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-   * A list of 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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfig.java deleted file mode 100644 index 28addcf82217..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfig.java +++ /dev/null @@ -1,861 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Describes the options to customize dynamic retrieval.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DynamicRetrievalConfig} - */ -@com.google.protobuf.Generated -public final class DynamicRetrievalConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.DynamicRetrievalConfig) - DynamicRetrievalConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DynamicRetrievalConfig"); - } - - // Use DynamicRetrievalConfig.newBuilder() to construct. - private DynamicRetrievalConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DynamicRetrievalConfig() { - mode_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DynamicRetrievalConfig.class, - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder.class); - } - - /** - * - * - *
-   * The mode of the predictor to be used in dynamic retrieval.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode} - */ - public enum Mode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Always trigger retrieval.
-     * 
- * - * MODE_UNSPECIFIED = 0; - */ - MODE_UNSPECIFIED(0), - /** - * - * - *
-     * Run retrieval only when system decides it is necessary.
-     * 
- * - * MODE_DYNAMIC = 1; - */ - MODE_DYNAMIC(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Mode"); - } - - /** - * - * - *
-     * Always trigger retrieval.
-     * 
- * - * MODE_UNSPECIFIED = 0; - */ - public static final int MODE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Run retrieval only when system decides it is necessary.
-     * 
- * - * MODE_DYNAMIC = 1; - */ - public static final int MODE_DYNAMIC_VALUE = 1; - - 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 MODE_DYNAMIC; - 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.DynamicRetrievalConfig.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.vertexai.v1.DynamicRetrievalConfig.Mode) - } - - private int bitField0_; - public static final int MODE_FIELD_NUMBER = 1; - private int mode_ = 0; - - /** - * - * - *
-   * The mode of the predictor to be used in dynamic retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The enum numeric value on the wire for mode. - */ - @java.lang.Override - public int getModeValue() { - return mode_; - } - - /** - * - * - *
-   * The mode of the predictor to be used in dynamic retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The mode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode getMode() { - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode result = - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode.forNumber(mode_); - return result == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode.UNRECOGNIZED - : result; - } - - public static final int DYNAMIC_THRESHOLD_FIELD_NUMBER = 2; - private float dynamicThreshold_ = 0F; - - /** - * - * - *
-   * Optional. The threshold to be used in dynamic retrieval.
-   * If not set, a system default value is used.
-   * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the dynamicThreshold field is set. - */ - @java.lang.Override - public boolean hasDynamicThreshold() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The threshold to be used in dynamic retrieval.
-   * If not set, a system default value is used.
-   * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dynamicThreshold. - */ - @java.lang.Override - public float getDynamicThreshold() { - return dynamicThreshold_; - } - - 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.vertexai.api.DynamicRetrievalConfig.Mode.MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, mode_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(2, dynamicThreshold_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (mode_ - != com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode.MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, dynamicThreshold_); - } - 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.vertexai.api.DynamicRetrievalConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.DynamicRetrievalConfig other = - (com.google.cloud.vertexai.api.DynamicRetrievalConfig) obj; - - if (mode_ != other.mode_) return false; - if (hasDynamicThreshold() != other.hasDynamicThreshold()) return false; - if (hasDynamicThreshold()) { - if (java.lang.Float.floatToIntBits(getDynamicThreshold()) - != java.lang.Float.floatToIntBits(other.getDynamicThreshold())) 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_; - if (hasDynamicThreshold()) { - hash = (37 * hash) + DYNAMIC_THRESHOLD_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getDynamicThreshold()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig 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.vertexai.api.DynamicRetrievalConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig 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.vertexai.api.DynamicRetrievalConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.DynamicRetrievalConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Describes the options to customize dynamic retrieval.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.DynamicRetrievalConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.DynamicRetrievalConfig) - com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.DynamicRetrievalConfig.class, - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.DynamicRetrievalConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mode_ = 0; - dynamicThreshold_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig build() { - com.google.cloud.vertexai.api.DynamicRetrievalConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig buildPartial() { - com.google.cloud.vertexai.api.DynamicRetrievalConfig result = - new com.google.cloud.vertexai.api.DynamicRetrievalConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.DynamicRetrievalConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mode_ = mode_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dynamicThreshold_ = dynamicThreshold_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.DynamicRetrievalConfig) { - return mergeFrom((com.google.cloud.vertexai.api.DynamicRetrievalConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.DynamicRetrievalConfig other) { - if (other == com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance()) - return this; - if (other.mode_ != 0) { - setModeValue(other.getModeValue()); - } - if (other.hasDynamicThreshold()) { - setDynamicThreshold(other.getDynamicThreshold()); - } - 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 - case 21: - { - dynamicThreshold_ = 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 int mode_ = 0; - - /** - * - * - *
-     * The mode of the predictor to be used in dynamic retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The enum numeric value on the wire for mode. - */ - @java.lang.Override - public int getModeValue() { - return mode_; - } - - /** - * - * - *
-     * The mode of the predictor to be used in dynamic retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.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 of the predictor to be used in dynamic retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The mode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode getMode() { - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode result = - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode.forNumber(mode_); - return result == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * The mode of the predictor to be used in dynamic retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @param value The mode to set. - * @return This builder for chaining. - */ - public Builder setMode(com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - mode_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * The mode of the predictor to be used in dynamic retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return This builder for chaining. - */ - public Builder clearMode() { - bitField0_ = (bitField0_ & ~0x00000001); - mode_ = 0; - onChanged(); - return this; - } - - private float dynamicThreshold_; - - /** - * - * - *
-     * Optional. The threshold to be used in dynamic retrieval.
-     * If not set, a system default value is used.
-     * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the dynamicThreshold field is set. - */ - @java.lang.Override - public boolean hasDynamicThreshold() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. The threshold to be used in dynamic retrieval.
-     * If not set, a system default value is used.
-     * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dynamicThreshold. - */ - @java.lang.Override - public float getDynamicThreshold() { - return dynamicThreshold_; - } - - /** - * - * - *
-     * Optional. The threshold to be used in dynamic retrieval.
-     * If not set, a system default value is used.
-     * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The dynamicThreshold to set. - * @return This builder for chaining. - */ - public Builder setDynamicThreshold(float value) { - - dynamicThreshold_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The threshold to be used in dynamic retrieval.
-     * If not set, a system default value is used.
-     * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDynamicThreshold() { - bitField0_ = (bitField0_ & ~0x00000002); - dynamicThreshold_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.DynamicRetrievalConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.DynamicRetrievalConfig) - private static final com.google.cloud.vertexai.api.DynamicRetrievalConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.DynamicRetrievalConfig(); - } - - public static com.google.cloud.vertexai.api.DynamicRetrievalConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DynamicRetrievalConfig 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.vertexai.api.DynamicRetrievalConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfigOrBuilder.java deleted file mode 100644 index 7d6983b3776e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DynamicRetrievalConfigOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface DynamicRetrievalConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.DynamicRetrievalConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The mode of the predictor to be used in dynamic retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The enum numeric value on the wire for mode. - */ - int getModeValue(); - - /** - * - * - *
-   * The mode of the predictor to be used in dynamic retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig.Mode mode = 1; - * - * @return The mode. - */ - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Mode getMode(); - - /** - * - * - *
-   * Optional. The threshold to be used in dynamic retrieval.
-   * If not set, a system default value is used.
-   * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the dynamicThreshold field is set. - */ - boolean hasDynamicThreshold(); - - /** - * - * - *
-   * Optional. The threshold to be used in dynamic retrieval.
-   * If not set, a system default value is used.
-   * 
- * - * optional float dynamic_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dynamicThreshold. - */ - float getDynamicThreshold(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequest.java deleted file mode 100644 index a8942e3da622..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequest.java +++ /dev/null @@ -1,1982 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentRequest} - */ -@com.google.protobuf.Generated -public final class EmbedContentRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.EmbedContentRequest) - EmbedContentRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EmbedContentRequest"); - } - - // Use EmbedContentRequest.newBuilder() to construct. - private EmbedContentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private EmbedContentRequest() { - model_ = ""; - title_ = ""; - taskType_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentRequest.class, - com.google.cloud.vertexai.api.EmbedContentRequest.Builder.class); - } - - /** - * - * - *
-   * Represents a downstream task the embeddings will be used for.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType} - */ - public enum EmbeddingTaskType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unset value, which will default to one of the other enum values.
-     * 
- * - * UNSPECIFIED = 0; - */ - UNSPECIFIED(0), - /** - * - * - *
-     * Specifies the given text is a query in a search/retrieval setting.
-     * 
- * - * RETRIEVAL_QUERY = 2; - */ - RETRIEVAL_QUERY(2), - /** - * - * - *
-     * Specifies the given text is a document from the corpus being searched.
-     * 
- * - * RETRIEVAL_DOCUMENT = 3; - */ - RETRIEVAL_DOCUMENT(3), - /** - * - * - *
-     * Specifies the given text will be used for STS.
-     * 
- * - * SEMANTIC_SIMILARITY = 4; - */ - SEMANTIC_SIMILARITY(4), - /** - * - * - *
-     * Specifies that the given text will be classified.
-     * 
- * - * CLASSIFICATION = 5; - */ - CLASSIFICATION(5), - /** - * - * - *
-     * Specifies that the embeddings will be used for clustering.
-     * 
- * - * CLUSTERING = 6; - */ - CLUSTERING(6), - /** - * - * - *
-     * Specifies that the embeddings will be used for question answering.
-     * 
- * - * QUESTION_ANSWERING = 7; - */ - QUESTION_ANSWERING(7), - /** - * - * - *
-     * Specifies that the embeddings will be used for fact verification.
-     * 
- * - * FACT_VERIFICATION = 8; - */ - FACT_VERIFICATION(8), - /** - * - * - *
-     * Specifies that the embeddings will be used for code retrieval.
-     * 
- * - * CODE_RETRIEVAL_QUERY = 9; - */ - CODE_RETRIEVAL_QUERY(9), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EmbeddingTaskType"); - } - - /** - * - * - *
-     * Unset value, which will default to one of the other enum values.
-     * 
- * - * UNSPECIFIED = 0; - */ - public static final int UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Specifies the given text is a query in a search/retrieval setting.
-     * 
- * - * RETRIEVAL_QUERY = 2; - */ - public static final int RETRIEVAL_QUERY_VALUE = 2; - - /** - * - * - *
-     * Specifies the given text is a document from the corpus being searched.
-     * 
- * - * RETRIEVAL_DOCUMENT = 3; - */ - public static final int RETRIEVAL_DOCUMENT_VALUE = 3; - - /** - * - * - *
-     * Specifies the given text will be used for STS.
-     * 
- * - * SEMANTIC_SIMILARITY = 4; - */ - public static final int SEMANTIC_SIMILARITY_VALUE = 4; - - /** - * - * - *
-     * Specifies that the given text will be classified.
-     * 
- * - * CLASSIFICATION = 5; - */ - public static final int CLASSIFICATION_VALUE = 5; - - /** - * - * - *
-     * Specifies that the embeddings will be used for clustering.
-     * 
- * - * CLUSTERING = 6; - */ - public static final int CLUSTERING_VALUE = 6; - - /** - * - * - *
-     * Specifies that the embeddings will be used for question answering.
-     * 
- * - * QUESTION_ANSWERING = 7; - */ - public static final int QUESTION_ANSWERING_VALUE = 7; - - /** - * - * - *
-     * Specifies that the embeddings will be used for fact verification.
-     * 
- * - * FACT_VERIFICATION = 8; - */ - public static final int FACT_VERIFICATION_VALUE = 8; - - /** - * - * - *
-     * Specifies that the embeddings will be used for code retrieval.
-     * 
- * - * CODE_RETRIEVAL_QUERY = 9; - */ - public static final int CODE_RETRIEVAL_QUERY_VALUE = 9; - - 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 EmbeddingTaskType 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 EmbeddingTaskType forNumber(int value) { - switch (value) { - case 0: - return UNSPECIFIED; - case 2: - return RETRIEVAL_QUERY; - case 3: - return RETRIEVAL_DOCUMENT; - case 4: - return SEMANTIC_SIMILARITY; - case 5: - return CLASSIFICATION; - case 6: - return CLUSTERING; - case 7: - return QUESTION_ANSWERING; - case 8: - return FACT_VERIFICATION; - case 9: - return CODE_RETRIEVAL_QUERY; - 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 EmbeddingTaskType findValueByNumber(int number) { - return EmbeddingTaskType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.EmbedContentRequest.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EmbeddingTaskType[] VALUES = values(); - - public static EmbeddingTaskType 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 EmbeddingTaskType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType) - } - - private int bitField0_; - public static final int MODEL_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return Whether the model field is set. - */ - @java.lang.Override - public boolean hasModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENT_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Content content_; - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return Whether the content field is set. - */ - @java.lang.Override - public boolean hasContent() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return The content. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContent() { - return content_ == null ? com.google.cloud.vertexai.api.Content.getDefaultInstance() : content_; - } - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder() { - return content_ == null ? com.google.cloud.vertexai.api.Content.getDefaultInstance() : content_; - } - - public static final int TITLE_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the title field is set. - */ - @java.lang.Override - public boolean hasTitle() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TASK_TYPE_FIELD_NUMBER = 5; - private int taskType_ = 0; - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the taskType field is set. - */ - @java.lang.Override - public boolean hasTaskType() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for taskType. - */ - @java.lang.Override - public int getTaskTypeValue() { - return taskType_; - } - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The taskType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType getTaskType() { - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType result = - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType.forNumber(taskType_); - return result == null - ? com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType.UNRECOGNIZED - : result; - } - - public static final int OUTPUT_DIMENSIONALITY_FIELD_NUMBER = 6; - private int outputDimensionality_ = 0; - - /** - * - * - *
-   * Optional. Optional reduced dimension for the output embedding. If set,
-   * excessive values in the output embedding are truncated from the end.
-   * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the outputDimensionality field is set. - */ - @java.lang.Override - public boolean hasOutputDimensionality() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Optional. Optional reduced dimension for the output embedding. If set,
-   * excessive values in the output embedding are truncated from the end.
-   * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The outputDimensionality. - */ - @java.lang.Override - public int getOutputDimensionality() { - return outputDimensionality_; - } - - public static final int AUTO_TRUNCATE_FIELD_NUMBER = 7; - private boolean autoTruncate_ = false; - - /** - * - * - *
-   * Optional. Whether to silently truncate the input content if it's longer
-   * than the maximum sequence length.
-   * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the autoTruncate field is set. - */ - @java.lang.Override - public boolean hasAutoTruncate() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Optional. Whether to silently truncate the input content if it's longer
-   * than the maximum sequence length.
-   * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The autoTruncate. - */ - @java.lang.Override - public boolean getAutoTruncate() { - return autoTruncate_; - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, model_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getContent()); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, title_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeEnum(5, taskType_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt32(6, outputDimensionality_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeBool(7, autoTruncate_); - } - 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.GeneratedMessage.computeStringSize(1, model_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, title_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, taskType_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, outputDimensionality_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, autoTruncate_); - } - 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.vertexai.api.EmbedContentRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.EmbedContentRequest other = - (com.google.cloud.vertexai.api.EmbedContentRequest) obj; - - if (hasModel() != other.hasModel()) return false; - if (hasModel()) { - if (!getModel().equals(other.getModel())) return false; - } - if (hasContent() != other.hasContent()) return false; - if (hasContent()) { - if (!getContent().equals(other.getContent())) return false; - } - if (hasTitle() != other.hasTitle()) return false; - if (hasTitle()) { - if (!getTitle().equals(other.getTitle())) return false; - } - if (hasTaskType() != other.hasTaskType()) return false; - if (hasTaskType()) { - if (taskType_ != other.taskType_) return false; - } - if (hasOutputDimensionality() != other.hasOutputDimensionality()) return false; - if (hasOutputDimensionality()) { - if (getOutputDimensionality() != other.getOutputDimensionality()) return false; - } - if (hasAutoTruncate() != other.hasAutoTruncate()) return false; - if (hasAutoTruncate()) { - if (getAutoTruncate() != other.getAutoTruncate()) 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 (hasModel()) { - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - } - if (hasContent()) { - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - } - if (hasTitle()) { - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - } - if (hasTaskType()) { - hash = (37 * hash) + TASK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + taskType_; - } - if (hasOutputDimensionality()) { - hash = (37 * hash) + OUTPUT_DIMENSIONALITY_FIELD_NUMBER; - hash = (53 * hash) + getOutputDimensionality(); - } - if (hasAutoTruncate()) { - hash = (37 * hash) + AUTO_TRUNCATE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoTruncate()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest 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.vertexai.api.EmbedContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest 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.vertexai.api.EmbedContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.EmbedContentRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.EmbedContentRequest) - com.google.cloud.vertexai.api.EmbedContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentRequest.class, - com.google.cloud.vertexai.api.EmbedContentRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.EmbedContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetContentFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - model_ = ""; - content_ = null; - if (contentBuilder_ != null) { - contentBuilder_.dispose(); - contentBuilder_ = null; - } - title_ = ""; - taskType_ = 0; - outputDimensionality_ = 0; - autoTruncate_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.EmbedContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentRequest build() { - com.google.cloud.vertexai.api.EmbedContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentRequest buildPartial() { - com.google.cloud.vertexai.api.EmbedContentRequest result = - new com.google.cloud.vertexai.api.EmbedContentRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.EmbedContentRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.model_ = model_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.taskType_ = taskType_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.outputDimensionality_ = outputDimensionality_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.autoTruncate_ = autoTruncate_; - to_bitField0_ |= 0x00000020; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.EmbedContentRequest) { - return mergeFrom((com.google.cloud.vertexai.api.EmbedContentRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.EmbedContentRequest other) { - if (other == com.google.cloud.vertexai.api.EmbedContentRequest.getDefaultInstance()) - return this; - if (other.hasModel()) { - model_ = other.model_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasContent()) { - mergeContent(other.getContent()); - } - if (other.hasTitle()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasTaskType()) { - setTaskTypeValue(other.getTaskTypeValue()); - } - if (other.hasOutputDimensionality()) { - setOutputDimensionality(other.getOutputDimensionality()); - } - if (other.hasAutoTruncate()) { - setAutoTruncate(other.getAutoTruncate()); - } - 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: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(internalGetContentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 34 - case 40: - { - taskType_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 40 - case 48: - { - outputDimensionality_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 48 - case 56: - { - autoTruncate_ = input.readBool(); - bitField0_ |= 0x00000020; - 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 java.lang.Object model_ = ""; - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return Whether the model field is set. - */ - public boolean hasModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the publisher model requested to serve the
-     * prediction. Format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.Content content_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentBuilder_; - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return Whether the content field is set. - */ - public boolean hasContent() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return The content. - */ - public com.google.cloud.vertexai.api.Content getContent() { - if (contentBuilder_ == null) { - return content_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : content_; - } else { - return contentBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public Builder setContent(com.google.cloud.vertexai.api.Content value) { - if (contentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - } else { - contentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public Builder setContent(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentBuilder_ == null) { - content_ = builderForValue.build(); - } else { - contentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public Builder mergeContent(com.google.cloud.vertexai.api.Content value) { - if (contentBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && content_ != null - && content_ != com.google.cloud.vertexai.api.Content.getDefaultInstance()) { - getContentBuilder().mergeFrom(value); - } else { - content_ = value; - } - } else { - contentBuilder_.mergeFrom(value); - } - if (content_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public Builder clearContent() { - bitField0_ = (bitField0_ & ~0x00000002); - content_ = null; - if (contentBuilder_ != null) { - contentBuilder_.dispose(); - contentBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public com.google.cloud.vertexai.api.Content.Builder getContentBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetContentFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder() { - if (contentBuilder_ != null) { - return contentBuilder_.getMessageOrBuilder(); - } else { - return content_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : content_; - } - } - - /** - * - * - *
-     * Required. Input content to be embedded. Required.
-     * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentFieldBuilder() { - if (contentBuilder_ == null) { - contentBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - getContent(), getParentForChildren(), isClean()); - content_ = null; - } - return contentBuilder_; - } - - private java.lang.Object title_ = ""; - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the title field is set. - */ - public boolean hasTitle() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. An optional title for the text.
-     * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private int taskType_ = 0; - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the taskType field is set. - */ - @java.lang.Override - public boolean hasTaskType() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for taskType. - */ - @java.lang.Override - public int getTaskTypeValue() { - return taskType_; - } - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for taskType to set. - * @return This builder for chaining. - */ - public Builder setTaskTypeValue(int value) { - taskType_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The taskType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType getTaskType() { - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType result = - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType.forNumber(taskType_); - return result == null - ? com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The taskType to set. - * @return This builder for chaining. - */ - public Builder setTaskType( - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - taskType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The task type of the embedding.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearTaskType() { - bitField0_ = (bitField0_ & ~0x00000008); - taskType_ = 0; - onChanged(); - return this; - } - - private int outputDimensionality_; - - /** - * - * - *
-     * Optional. Optional reduced dimension for the output embedding. If set,
-     * excessive values in the output embedding are truncated from the end.
-     * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the outputDimensionality field is set. - */ - @java.lang.Override - public boolean hasOutputDimensionality() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. Optional reduced dimension for the output embedding. If set,
-     * excessive values in the output embedding are truncated from the end.
-     * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The outputDimensionality. - */ - @java.lang.Override - public int getOutputDimensionality() { - return outputDimensionality_; - } - - /** - * - * - *
-     * Optional. Optional reduced dimension for the output embedding. If set,
-     * excessive values in the output embedding are truncated from the end.
-     * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The outputDimensionality to set. - * @return This builder for chaining. - */ - public Builder setOutputDimensionality(int value) { - - outputDimensionality_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Optional reduced dimension for the output embedding. If set,
-     * excessive values in the output embedding are truncated from the end.
-     * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearOutputDimensionality() { - bitField0_ = (bitField0_ & ~0x00000010); - outputDimensionality_ = 0; - onChanged(); - return this; - } - - private boolean autoTruncate_; - - /** - * - * - *
-     * Optional. Whether to silently truncate the input content if it's longer
-     * than the maximum sequence length.
-     * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the autoTruncate field is set. - */ - @java.lang.Override - public boolean hasAutoTruncate() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Whether to silently truncate the input content if it's longer
-     * than the maximum sequence length.
-     * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The autoTruncate. - */ - @java.lang.Override - public boolean getAutoTruncate() { - return autoTruncate_; - } - - /** - * - * - *
-     * Optional. Whether to silently truncate the input content if it's longer
-     * than the maximum sequence length.
-     * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The autoTruncate to set. - * @return This builder for chaining. - */ - public Builder setAutoTruncate(boolean value) { - - autoTruncate_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Whether to silently truncate the input content if it's longer
-     * than the maximum sequence length.
-     * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearAutoTruncate() { - bitField0_ = (bitField0_ & ~0x00000020); - autoTruncate_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.EmbedContentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.EmbedContentRequest) - private static final com.google.cloud.vertexai.api.EmbedContentRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.EmbedContentRequest(); - } - - public static com.google.cloud.vertexai.api.EmbedContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EmbedContentRequest 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.vertexai.api.EmbedContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequestOrBuilder.java deleted file mode 100644 index d791ef9b2c66..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentRequestOrBuilder.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface EmbedContentRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.EmbedContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return Whether the model field is set. - */ - boolean hasModel(); - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Required. The name of the publisher model requested to serve the
-   * prediction. Format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   * 
- * - * optional string model = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return Whether the content field is set. - */ - boolean hasContent(); - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - * - * @return The content. - */ - com.google.cloud.vertexai.api.Content getContent(); - - /** - * - * - *
-   * Required. Input content to be embedded. Required.
-   * 
- * - * optional .google.cloud.vertexai.v1.Content content = 2; - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentOrBuilder(); - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the title field is set. - */ - boolean hasTitle(); - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-   * Optional. An optional title for the text.
-   * 
- * - * optional string title = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the taskType field is set. - */ - boolean hasTaskType(); - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for taskType. - */ - int getTaskTypeValue(); - - /** - * - * - *
-   * Optional. The task type of the embedding.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The taskType. - */ - com.google.cloud.vertexai.api.EmbedContentRequest.EmbeddingTaskType getTaskType(); - - /** - * - * - *
-   * Optional. Optional reduced dimension for the output embedding. If set,
-   * excessive values in the output embedding are truncated from the end.
-   * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the outputDimensionality field is set. - */ - boolean hasOutputDimensionality(); - - /** - * - * - *
-   * Optional. Optional reduced dimension for the output embedding. If set,
-   * excessive values in the output embedding are truncated from the end.
-   * 
- * - * optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The outputDimensionality. - */ - int getOutputDimensionality(); - - /** - * - * - *
-   * Optional. Whether to silently truncate the input content if it's longer
-   * than the maximum sequence length.
-   * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the autoTruncate field is set. - */ - boolean hasAutoTruncate(); - - /** - * - * - *
-   * Optional. Whether to silently truncate the input content if it's longer
-   * than the maximum sequence length.
-   * 
- * - * optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The autoTruncate. - */ - boolean getAutoTruncate(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponse.java deleted file mode 100644 index 82662b3b51ba..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponse.java +++ /dev/null @@ -1,1784 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentResponse} - */ -@com.google.protobuf.Generated -public final class EmbedContentResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.EmbedContentResponse) - EmbedContentResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EmbedContentResponse"); - } - - // Use EmbedContentResponse.newBuilder() to construct. - private EmbedContentResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private EmbedContentResponse() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentResponse.class, - com.google.cloud.vertexai.api.EmbedContentResponse.Builder.class); - } - - public interface EmbeddingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.EmbedContentResponse.Embedding) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - float getValues(int index); - } - - /** - * - * - *
-   * A list of floats representing an embedding.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentResponse.Embedding} - */ - public static final class Embedding extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.EmbedContentResponse.Embedding) - EmbeddingOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Embedding"); - } - - // Use Embedding.newBuilder() to construct. - private Embedding(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Embedding() { - values_ = emptyFloatList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.class, - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList values_ = emptyFloatList(); - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @return A list containing the values. - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * Embedding vector values.
-     * 
- * - * repeated float values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public float getValues(int index) { - return values_.getFloat(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.writeFloatNoTag(values_.getFloat(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * 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.vertexai.api.EmbedContentResponse.Embedding)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding other = - (com.google.cloud.vertexai.api.EmbedContentResponse.Embedding) 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.vertexai.api.EmbedContentResponse.Embedding parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding 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.vertexai.api.EmbedContentResponse.Embedding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding 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.vertexai.api.EmbedContentResponse.Embedding parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.EmbedContentResponse.Embedding 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * A list of floats representing an embedding.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentResponse.Embedding} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.EmbedContentResponse.Embedding) - com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.class, - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - values_ = emptyFloatList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding build() { - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding buildPartial() { - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding result = - new com.google.cloud.vertexai.api.EmbedContentResponse.Embedding(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.EmbedContentResponse.Embedding) { - return mergeFrom((com.google.cloud.vertexai.api.EmbedContentResponse.Embedding) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.EmbedContentResponse.Embedding other) { - if (other - == com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance()) - return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - values_.makeImmutable(); - 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 13: - { - float v = input.readFloat(); - ensureValuesIsMutable(); - values_.addFloat(v); - break; - } // case 13 - case 10: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureValuesIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - values_.addFloat(input.readFloat()); - } - 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.FloatList values_ = emptyFloatList(); - - private void ensureValuesIsMutable() { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_); - } - bitField0_ |= 0x00000001; - } - - private void ensureValuesIsMutable(int capacity) { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_, capacity); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float values = 1; - * - * @return A list containing the values. - */ - public java.util.List getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public float getValues(int index) { - return values_.getFloat(index); - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float 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, float value) { - - ensureValuesIsMutable(); - values_.setFloat(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float values = 1; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(float value) { - - ensureValuesIsMutable(); - values_.addFloat(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float 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_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Embedding vector values.
-       * 
- * - * repeated float values = 1; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.EmbedContentResponse.Embedding) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.EmbedContentResponse.Embedding) - private static final com.google.cloud.vertexai.api.EmbedContentResponse.Embedding - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.EmbedContentResponse.Embedding(); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse.Embedding - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Embedding 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.vertexai.api.EmbedContentResponse.Embedding - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int EMBEDDING_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.EmbedContentResponse.Embedding embedding_; - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return Whether the embedding field is set. - */ - @java.lang.Override - public boolean hasEmbedding() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return The embedding. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding getEmbedding() { - return embedding_ == null - ? com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance() - : embedding_; - } - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder - getEmbeddingOrBuilder() { - return embedding_ == null - ? com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance() - : embedding_; - } - - public static final int USAGE_METADATA_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.UsageMetadata usageMetadata_; - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return Whether the usageMetadata field is set. - */ - @java.lang.Override - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return The usageMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata getUsageMetadata() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadataOrBuilder getUsageMetadataOrBuilder() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - public static final int TRUNCATED_FIELD_NUMBER = 4; - private boolean truncated_ = false; - - /** - * - * - *
-   * Whether the input content was truncated before generating the embedding.
-   * 
- * - * bool truncated = 4; - * - * @return The truncated. - */ - @java.lang.Override - public boolean getTruncated() { - return truncated_; - } - - 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.writeMessage(1, getEmbedding()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getUsageMetadata()); - } - if (truncated_ != false) { - output.writeBool(4, truncated_); - } - 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.computeMessageSize(1, getEmbedding()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUsageMetadata()); - } - if (truncated_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, truncated_); - } - 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.vertexai.api.EmbedContentResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.EmbedContentResponse other = - (com.google.cloud.vertexai.api.EmbedContentResponse) obj; - - if (hasEmbedding() != other.hasEmbedding()) return false; - if (hasEmbedding()) { - if (!getEmbedding().equals(other.getEmbedding())) return false; - } - if (hasUsageMetadata() != other.hasUsageMetadata()) return false; - if (hasUsageMetadata()) { - if (!getUsageMetadata().equals(other.getUsageMetadata())) return false; - } - if (getTruncated() != other.getTruncated()) 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 (hasEmbedding()) { - hash = (37 * hash) + EMBEDDING_FIELD_NUMBER; - hash = (53 * hash) + getEmbedding().hashCode(); - } - if (hasUsageMetadata()) { - hash = (37 * hash) + USAGE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUsageMetadata().hashCode(); - } - hash = (37 * hash) + TRUNCATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTruncated()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse 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.vertexai.api.EmbedContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse 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.vertexai.api.EmbedContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.EmbedContentResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EmbedContentResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.EmbedContentResponse) - com.google.cloud.vertexai.api.EmbedContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EmbedContentResponse.class, - com.google.cloud.vertexai.api.EmbedContentResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.EmbedContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetEmbeddingFieldBuilder(); - internalGetUsageMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - embedding_ = null; - if (embeddingBuilder_ != null) { - embeddingBuilder_.dispose(); - embeddingBuilder_ = null; - } - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - truncated_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.EmbedContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse build() { - com.google.cloud.vertexai.api.EmbedContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EmbedContentResponse buildPartial() { - com.google.cloud.vertexai.api.EmbedContentResponse result = - new com.google.cloud.vertexai.api.EmbedContentResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.EmbedContentResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.embedding_ = embeddingBuilder_ == null ? embedding_ : embeddingBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.usageMetadata_ = - usageMetadataBuilder_ == null ? usageMetadata_ : usageMetadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.truncated_ = truncated_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.EmbedContentResponse) { - return mergeFrom((com.google.cloud.vertexai.api.EmbedContentResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.EmbedContentResponse other) { - if (other == com.google.cloud.vertexai.api.EmbedContentResponse.getDefaultInstance()) - return this; - if (other.hasEmbedding()) { - mergeEmbedding(other.getEmbedding()); - } - if (other.hasUsageMetadata()) { - mergeUsageMetadata(other.getUsageMetadata()); - } - if (other.getTruncated() != false) { - setTruncated(other.getTruncated()); - } - 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( - internalGetEmbeddingFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetUsageMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 32: - { - truncated_ = input.readBool(); - bitField0_ |= 0x00000004; - 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.vertexai.api.EmbedContentResponse.Embedding embedding_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding, - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder, - com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder> - embeddingBuilder_; - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return Whether the embedding field is set. - */ - public boolean hasEmbedding() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return The embedding. - */ - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding getEmbedding() { - if (embeddingBuilder_ == null) { - return embedding_ == null - ? com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance() - : embedding_; - } else { - return embeddingBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public Builder setEmbedding( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding value) { - if (embeddingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - embedding_ = value; - } else { - embeddingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public Builder setEmbedding( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder builderForValue) { - if (embeddingBuilder_ == null) { - embedding_ = builderForValue.build(); - } else { - embeddingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public Builder mergeEmbedding( - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding value) { - if (embeddingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && embedding_ != null - && embedding_ - != com.google.cloud.vertexai.api.EmbedContentResponse.Embedding - .getDefaultInstance()) { - getEmbeddingBuilder().mergeFrom(value); - } else { - embedding_ = value; - } - } else { - embeddingBuilder_.mergeFrom(value); - } - if (embedding_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public Builder clearEmbedding() { - bitField0_ = (bitField0_ & ~0x00000001); - embedding_ = null; - if (embeddingBuilder_ != null) { - embeddingBuilder_.dispose(); - embeddingBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder - getEmbeddingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetEmbeddingFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - public com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder - getEmbeddingOrBuilder() { - if (embeddingBuilder_ != null) { - return embeddingBuilder_.getMessageOrBuilder(); - } else { - return embedding_ == null - ? com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.getDefaultInstance() - : embedding_; - } - } - - /** - * - * - *
-     * The embedding generated from the input content.
-     * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding, - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder, - com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder> - internalGetEmbeddingFieldBuilder() { - if (embeddingBuilder_ == null) { - embeddingBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding, - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding.Builder, - com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder>( - getEmbedding(), getParentForChildren(), isClean()); - embedding_ = null; - } - return embeddingBuilder_; - } - - private com.google.cloud.vertexai.api.UsageMetadata usageMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UsageMetadata, - com.google.cloud.vertexai.api.UsageMetadata.Builder, - com.google.cloud.vertexai.api.UsageMetadataOrBuilder> - usageMetadataBuilder_; - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return Whether the usageMetadata field is set. - */ - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return The usageMetadata. - */ - public com.google.cloud.vertexai.api.UsageMetadata getUsageMetadata() { - if (usageMetadataBuilder_ == null) { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } else { - return usageMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public Builder setUsageMetadata(com.google.cloud.vertexai.api.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - usageMetadata_ = value; - } else { - usageMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public Builder setUsageMetadata( - com.google.cloud.vertexai.api.UsageMetadata.Builder builderForValue) { - if (usageMetadataBuilder_ == null) { - usageMetadata_ = builderForValue.build(); - } else { - usageMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public Builder mergeUsageMetadata(com.google.cloud.vertexai.api.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && usageMetadata_ != null - && usageMetadata_ != com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance()) { - getUsageMetadataBuilder().mergeFrom(value); - } else { - usageMetadata_ = value; - } - } else { - usageMetadataBuilder_.mergeFrom(value); - } - if (usageMetadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public Builder clearUsageMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public com.google.cloud.vertexai.api.UsageMetadata.Builder getUsageMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetUsageMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - public com.google.cloud.vertexai.api.UsageMetadataOrBuilder getUsageMetadataOrBuilder() { - if (usageMetadataBuilder_ != null) { - return usageMetadataBuilder_.getMessageOrBuilder(); - } else { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - } - - /** - * - * - *
-     * Metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UsageMetadata, - com.google.cloud.vertexai.api.UsageMetadata.Builder, - com.google.cloud.vertexai.api.UsageMetadataOrBuilder> - internalGetUsageMetadataFieldBuilder() { - if (usageMetadataBuilder_ == null) { - usageMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UsageMetadata, - com.google.cloud.vertexai.api.UsageMetadata.Builder, - com.google.cloud.vertexai.api.UsageMetadataOrBuilder>( - getUsageMetadata(), getParentForChildren(), isClean()); - usageMetadata_ = null; - } - return usageMetadataBuilder_; - } - - private boolean truncated_; - - /** - * - * - *
-     * Whether the input content was truncated before generating the embedding.
-     * 
- * - * bool truncated = 4; - * - * @return The truncated. - */ - @java.lang.Override - public boolean getTruncated() { - return truncated_; - } - - /** - * - * - *
-     * Whether the input content was truncated before generating the embedding.
-     * 
- * - * bool truncated = 4; - * - * @param value The truncated to set. - * @return This builder for chaining. - */ - public Builder setTruncated(boolean value) { - - truncated_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Whether the input content was truncated before generating the embedding.
-     * 
- * - * bool truncated = 4; - * - * @return This builder for chaining. - */ - public Builder clearTruncated() { - bitField0_ = (bitField0_ & ~0x00000004); - truncated_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.EmbedContentResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.EmbedContentResponse) - private static final com.google.cloud.vertexai.api.EmbedContentResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.EmbedContentResponse(); - } - - public static com.google.cloud.vertexai.api.EmbedContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EmbedContentResponse 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.vertexai.api.EmbedContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponseOrBuilder.java deleted file mode 100644 index 761b9852e5c9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EmbedContentResponseOrBuilder.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface EmbedContentResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.EmbedContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return Whether the embedding field is set. - */ - boolean hasEmbedding(); - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - * - * @return The embedding. - */ - com.google.cloud.vertexai.api.EmbedContentResponse.Embedding getEmbedding(); - - /** - * - * - *
-   * The embedding generated from the input content.
-   * 
- * - * .google.cloud.vertexai.v1.EmbedContentResponse.Embedding embedding = 1; - */ - com.google.cloud.vertexai.api.EmbedContentResponse.EmbeddingOrBuilder getEmbeddingOrBuilder(); - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return Whether the usageMetadata field is set. - */ - boolean hasUsageMetadata(); - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - * - * @return The usageMetadata. - */ - com.google.cloud.vertexai.api.UsageMetadata getUsageMetadata(); - - /** - * - * - *
-   * Metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.UsageMetadata usage_metadata = 2; - */ - com.google.cloud.vertexai.api.UsageMetadataOrBuilder getUsageMetadataOrBuilder(); - - /** - * - * - *
-   * Whether the input content was truncated before generating the embedding.
-   * 
- * - * bool truncated = 4; - * - * @return The truncated. - */ - boolean getTruncated(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java deleted file mode 100644 index 148b873b8333..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/encryption_spec.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents a customer-managed encryption key spec that can be applied to
- * a top-level resource.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EncryptionSpec} - */ -@com.google.protobuf.Generated -public final class EncryptionSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.EncryptionSpec) - EncryptionSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EncryptionSpec"); - } - - // Use EncryptionSpec.newBuilder() to construct. - private EncryptionSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private EncryptionSpec() { - kmsKeyName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EncryptionSpecProto - .internal_static_google_cloud_vertexai_v1_EncryptionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EncryptionSpecProto - .internal_static_google_cloud_vertexai_v1_EncryptionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EncryptionSpec.class, - com.google.cloud.vertexai.api.EncryptionSpec.Builder.class); - } - - public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object kmsKeyName_ = ""; - - /** - * - * - *
-   * Required. The Cloud KMS resource identifier of the customer managed
-   * encryption key used to protect a resource. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * The key needs to be in the same region as where the compute resource is
-   * created.
-   * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The kmsKeyName. - */ - @java.lang.Override - public java.lang.String getKmsKeyName() { - java.lang.Object ref = kmsKeyName_; - 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(); - kmsKeyName_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The Cloud KMS resource identifier of the customer managed
-   * encryption key used to protect a resource. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * The key needs to be in the same region as where the compute resource is
-   * created.
-   * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for kmsKeyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyNameBytes() { - java.lang.Object ref = kmsKeyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyName_ = 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.GeneratedMessage.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, kmsKeyName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kmsKeyName_); - } - 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.vertexai.api.EncryptionSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.EncryptionSpec other = - (com.google.cloud.vertexai.api.EncryptionSpec) obj; - - if (!getKmsKeyName().equals(other.getKmsKeyName())) 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) + KMS_KEY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getKmsKeyName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec 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.vertexai.api.EncryptionSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec 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.vertexai.api.EncryptionSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.EncryptionSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents a customer-managed encryption key spec that can be applied to
-   * a top-level resource.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EncryptionSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.EncryptionSpec) - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EncryptionSpecProto - .internal_static_google_cloud_vertexai_v1_EncryptionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EncryptionSpecProto - .internal_static_google_cloud_vertexai_v1_EncryptionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EncryptionSpec.class, - com.google.cloud.vertexai.api.EncryptionSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.EncryptionSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - kmsKeyName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EncryptionSpecProto - .internal_static_google_cloud_vertexai_v1_EncryptionSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec build() { - com.google.cloud.vertexai.api.EncryptionSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec buildPartial() { - com.google.cloud.vertexai.api.EncryptionSpec result = - new com.google.cloud.vertexai.api.EncryptionSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.EncryptionSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.kmsKeyName_ = kmsKeyName_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.EncryptionSpec) { - return mergeFrom((com.google.cloud.vertexai.api.EncryptionSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.EncryptionSpec other) { - if (other == com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance()) return this; - if (!other.getKmsKeyName().isEmpty()) { - kmsKeyName_ = other.kmsKeyName_; - 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: - { - kmsKeyName_ = 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 kmsKeyName_ = ""; - - /** - * - * - *
-     * Required. The Cloud KMS resource identifier of the customer managed
-     * encryption key used to protect a resource. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * The key needs to be in the same region as where the compute resource is
-     * created.
-     * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The kmsKeyName. - */ - public java.lang.String getKmsKeyName() { - java.lang.Object ref = kmsKeyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKeyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The Cloud KMS resource identifier of the customer managed
-     * encryption key used to protect a resource. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * The key needs to be in the same region as where the compute resource is
-     * created.
-     * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for kmsKeyName. - */ - public com.google.protobuf.ByteString getKmsKeyNameBytes() { - java.lang.Object ref = kmsKeyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The Cloud KMS resource identifier of the customer managed
-     * encryption key used to protect a resource. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * The key needs to be in the same region as where the compute resource is
-     * created.
-     * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The kmsKeyName to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - kmsKeyName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Cloud KMS resource identifier of the customer managed
-     * encryption key used to protect a resource. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * The key needs to be in the same region as where the compute resource is
-     * created.
-     * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearKmsKeyName() { - kmsKeyName_ = getDefaultInstance().getKmsKeyName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Cloud KMS resource identifier of the customer managed
-     * encryption key used to protect a resource. Has the form:
-     * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-     * The key needs to be in the same region as where the compute resource is
-     * created.
-     * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for kmsKeyName to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - kmsKeyName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.EncryptionSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.EncryptionSpec) - private static final com.google.cloud.vertexai.api.EncryptionSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.EncryptionSpec(); - } - - public static com.google.cloud.vertexai.api.EncryptionSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EncryptionSpec 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.vertexai.api.EncryptionSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java deleted file mode 100644 index 15145a5cd499..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/encryption_spec.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface EncryptionSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.EncryptionSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Cloud KMS resource identifier of the customer managed
-   * encryption key used to protect a resource. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * The key needs to be in the same region as where the compute resource is
-   * created.
-   * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The kmsKeyName. - */ - java.lang.String getKmsKeyName(); - - /** - * - * - *
-   * Required. The Cloud KMS resource identifier of the customer managed
-   * encryption key used to protect a resource. Has the form:
-   * `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
-   * The key needs to be in the same region as where the compute resource is
-   * created.
-   * 
- * - * string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for kmsKeyName. - */ - com.google.protobuf.ByteString getKmsKeyNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java deleted file mode 100644 index d2d7535b09dc..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/encryption_spec.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class EncryptionSpecProto extends com.google.protobuf.GeneratedFile { - private EncryptionSpecProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EncryptionSpecProto"); - } - - 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_vertexai_v1_EncryptionSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_EncryptionSpec_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/vertexai/v1/encryption_sp" - + "ec.proto\022\030google.cloud.vertexai.v1\032\037goog" - + "le/api/field_behavior.proto\"+\n\016Encryptio" - + "nSpec\022\031\n\014kms_key_name\030\001 \001(\tB\003\340A\002B\320\001\n\035com" - + ".google.cloud.vertexai.apiB\023EncryptionSp" - + "ecProtoP\001Z>cloud.google.com/go/aiplatfor" - + "m/apiv1/aiplatformpb;aiplatformpb\252\002\032Goog" - + "le.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AI" - + "Platform\\V1\352\002\035Google::Cloud::AIPlatform:" - + ":V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_EncryptionSpec_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_EncryptionSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_EncryptionSpec_descriptor, - new java.lang.String[] { - "KmsKeyName", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java deleted file mode 100644 index aca002c859b9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java +++ /dev/null @@ -1,6224 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Models are deployed into it, and afterwards Endpoint is called to obtain
- * predictions and explanations.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Endpoint} - */ -@com.google.protobuf.Generated -public final class Endpoint extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Endpoint) - EndpointOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Endpoint"); - } - - // Use Endpoint.newBuilder() to construct. - private Endpoint(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Endpoint() { - name_ = ""; - displayName_ = ""; - description_ = ""; - deployedModels_ = java.util.Collections.emptyList(); - etag_ = ""; - network_ = ""; - modelDeploymentMonitoringJob_ = ""; - dedicatedEndpointDns_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 5: - return internalGetTrafficSplit(); - case 7: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Endpoint.class, - com.google.cloud.vertexai.api.Endpoint.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Output only. The resource name of the Endpoint.
-   * 
- * - * 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. The resource name of the Endpoint.
-   * 
- * - * 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 DISPLAY_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - - /** - * - * - *
-   * Required. The display name of the Endpoint.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The display name of the Endpoint.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 DESCRIPTION_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - - /** - * - * - *
-   * The description of the Endpoint.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - - /** - * - * - *
-   * The description of the Endpoint.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOYED_MODELS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List deployedModels_; - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getDeployedModelsList() { - return deployedModels_; - } - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getDeployedModelsOrBuilderList() { - return deployedModels_; - } - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getDeployedModelsCount() { - return deployedModels_.size(); - } - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDeployedModels(int index) { - return deployedModels_.get(index); - } - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelsOrBuilder( - int index) { - return deployedModels_.get(index); - } - - public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 5; - - private static final class TrafficSplitDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ETAG_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - 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(); - etag_ = s; - return s; - } - } - - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 7; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.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 UPDATE_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp updateTime_; - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 10; - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return Whether the encryptionSpec field is set. - */ - @java.lang.Override - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return The encryptionSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - public static final int NETWORK_FIELD_NUMBER = 13; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - - /** - * - * - *
-   * Optional. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-   * to which the Endpoint should be peered.
-   *
-   * Private services access must already be configured for the network. If left
-   * unspecified, the Endpoint is not peered with any network.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   *
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-   * `projects/{project}/global/networks/{network}`.
-   * Where `{project}` is a project number, as in `12345`, and `{network}` is
-   * network name.
-   * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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; - } - } - - /** - * - * - *
-   * Optional. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-   * to which the Endpoint should be peered.
-   *
-   * Private services access must already be configured for the network. If left
-   * unspecified, the Endpoint is not peered with any network.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   *
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-   * `projects/{project}/global/networks/{network}`.
-   * Where `{project}` is a project number, as in `12345`, and `{network}` is
-   * network name.
-   * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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; - } - } - - public static final int ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER = 17; - private boolean enablePrivateServiceConnect_ = false; - - /** - * - * - *
-   * Deprecated: If true, expose the Endpoint via private service connect.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   * 
- * - * bool enable_private_service_connect = 17 [deprecated = true]; - * - * @deprecated google.cloud.vertexai.v1.Endpoint.enable_private_service_connect is deprecated. See - * google/cloud/vertexai/v1/endpoint.proto;l=128 - * @return The enablePrivateServiceConnect. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean getEnablePrivateServiceConnect() { - return enablePrivateServiceConnect_; - } - - public static final int PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER = 21; - private com.google.cloud.vertexai.api.PrivateServiceConnectConfig privateServiceConnectConfig_; - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the privateServiceConnectConfig field is set. - */ - @java.lang.Override - public boolean hasPrivateServiceConnectConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateServiceConnectConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig - getPrivateServiceConnectConfig() { - return privateServiceConnectConfig_ == null - ? com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance() - : privateServiceConnectConfig_; - } - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder - getPrivateServiceConnectConfigOrBuilder() { - return privateServiceConnectConfig_ == null - ? com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance() - : privateServiceConnectConfig_; - } - - public static final int MODEL_DEPLOYMENT_MONITORING_JOB_FIELD_NUMBER = 14; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelDeploymentMonitoringJob_ = ""; - - /** - * - * - *
-   * Output only. Resource name of the Model Monitoring job associated with this
-   * Endpoint if monitoring is enabled by
-   * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-   * Format:
-   * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-   * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The modelDeploymentMonitoringJob. - */ - @java.lang.Override - public java.lang.String getModelDeploymentMonitoringJob() { - java.lang.Object ref = modelDeploymentMonitoringJob_; - 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(); - modelDeploymentMonitoringJob_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Resource name of the Model Monitoring job associated with this
-   * Endpoint if monitoring is enabled by
-   * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-   * Format:
-   * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-   * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for modelDeploymentMonitoringJob. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelDeploymentMonitoringJobBytes() { - java.lang.Object ref = modelDeploymentMonitoringJob_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelDeploymentMonitoringJob_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREDICT_REQUEST_RESPONSE_LOGGING_CONFIG_FIELD_NUMBER = 18; - private com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - predictRequestResponseLoggingConfig_; - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return Whether the predictRequestResponseLoggingConfig field is set. - */ - @java.lang.Override - public boolean hasPredictRequestResponseLoggingConfig() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return The predictRequestResponseLoggingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - getPredictRequestResponseLoggingConfig() { - return predictRequestResponseLoggingConfig_ == null - ? com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance() - : predictRequestResponseLoggingConfig_; - } - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder - getPredictRequestResponseLoggingConfigOrBuilder() { - return predictRequestResponseLoggingConfig_ == null - ? com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance() - : predictRequestResponseLoggingConfig_; - } - - public static final int DEDICATED_ENDPOINT_ENABLED_FIELD_NUMBER = 24; - private boolean dedicatedEndpointEnabled_ = false; - - /** - * - * - *
-   * If true, the endpoint will be exposed through a dedicated
-   * DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
-   * will be isolated from other users' traffic and will have better performance
-   * and reliability.
-   * Note: Once you enabled dedicated endpoint, you won't be able to send
-   * request to the shared DNS {region}-aiplatform.googleapis.com. The
-   * limitation will be removed soon.
-   * 
- * - * bool dedicated_endpoint_enabled = 24; - * - * @return The dedicatedEndpointEnabled. - */ - @java.lang.Override - public boolean getDedicatedEndpointEnabled() { - return dedicatedEndpointEnabled_; - } - - public static final int DEDICATED_ENDPOINT_DNS_FIELD_NUMBER = 25; - - @SuppressWarnings("serial") - private volatile java.lang.Object dedicatedEndpointDns_ = ""; - - /** - * - * - *
-   * Output only. DNS of the dedicated endpoint. Will only be populated if
-   * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-   * might be a random number or a string. For example, if fast_tryout is
-   * enabled, uid will be fasttryout. Format:
-   * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-   * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The dedicatedEndpointDns. - */ - @java.lang.Override - public java.lang.String getDedicatedEndpointDns() { - java.lang.Object ref = dedicatedEndpointDns_; - 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(); - dedicatedEndpointDns_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. DNS of the dedicated endpoint. Will only be populated if
-   * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-   * might be a random number or a string. For example, if fast_tryout is
-   * enabled, uid will be fasttryout. Format:
-   * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-   * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for dedicatedEndpointDns. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDedicatedEndpointDnsBytes() { - java.lang.Object ref = dedicatedEndpointDns_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dedicatedEndpointDns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLIENT_CONNECTION_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.vertexai.api.ClientConnectionConfig clientConnectionConfig_; - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return Whether the clientConnectionConfig field is set. - */ - @java.lang.Override - public boolean hasClientConnectionConfig() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return The clientConnectionConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ClientConnectionConfig getClientConnectionConfig() { - return clientConnectionConfig_ == null - ? com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; - } - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder() { - return clientConnectionConfig_ == null - ? com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; - } - - public static final int SATISFIES_PZS_FIELD_NUMBER = 27; - private boolean satisfiesPzs_ = false; - - /** - * - * - *
-   * Output only. Reserved for future use.
-   * 
- * - * bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzs. - */ - @java.lang.Override - public boolean getSatisfiesPzs() { - return satisfiesPzs_; - } - - public static final int SATISFIES_PZI_FIELD_NUMBER = 28; - private boolean satisfiesPzi_ = false; - - /** - * - * - *
-   * Output only. Reserved for future use.
-   * 
- * - * bool satisfies_pzi = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzi. - */ - @java.lang.Override - public boolean getSatisfiesPzi() { - return satisfiesPzi_; - } - - public static final int GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER = 29; - private com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig genAiAdvancedFeaturesConfig_; - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the genAiAdvancedFeaturesConfig field is set. - */ - @java.lang.Override - public boolean hasGenAiAdvancedFeaturesConfig() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The genAiAdvancedFeaturesConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig - getGenAiAdvancedFeaturesConfig() { - return genAiAdvancedFeaturesConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance() - : genAiAdvancedFeaturesConfig_; - } - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder - getGenAiAdvancedFeaturesConfigOrBuilder() { - return genAiAdvancedFeaturesConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance() - : genAiAdvancedFeaturesConfig_; - } - - public static final int PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER = 30; - private boolean privateModelServerEnabled_ = false; - - /** - * - * - *
-   * If true, the model server will be isolated from the external internet.
-   * 
- * - * bool private_model_server_enabled = 30; - * - * @return The privateModelServerEnabled. - */ - @java.lang.Override - public boolean getPrivateModelServerEnabled() { - return privateModelServerEnabled_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - for (int i = 0; i < deployedModels_.size(); i++) { - output.writeMessage(4, deployedModels_.get(i)); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.defaultEntry, 5); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, etag_); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(8, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(9, getUpdateTime()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(10, getEncryptionSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 13, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelDeploymentMonitoringJob_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 14, modelDeploymentMonitoringJob_); - } - if (enablePrivateServiceConnect_ != false) { - output.writeBool(17, enablePrivateServiceConnect_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(18, getPredictRequestResponseLoggingConfig()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(21, getPrivateServiceConnectConfig()); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(23, getClientConnectionConfig()); - } - if (dedicatedEndpointEnabled_ != false) { - output.writeBool(24, dedicatedEndpointEnabled_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dedicatedEndpointDns_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 25, dedicatedEndpointDns_); - } - if (satisfiesPzs_ != false) { - output.writeBool(27, satisfiesPzs_); - } - if (satisfiesPzi_ != false) { - output.writeBool(28, satisfiesPzi_); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(29, getGenAiAdvancedFeaturesConfig()); - } - if (privateModelServerEnabled_ != false) { - output.writeBool(30, privateModelServerEnabled_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - for (int i = 0; i < deployedModels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, deployedModels_.get(i)); - } - for (java.util.Map.Entry entry : - internalGetTrafficSplit().getMap().entrySet()) { - com.google.protobuf.MapEntry trafficSplit__ = - TrafficSplitDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, trafficSplit__); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, etag_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getEncryptionSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(13, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelDeploymentMonitoringJob_)) { - size += - com.google.protobuf.GeneratedMessage.computeStringSize(14, modelDeploymentMonitoringJob_); - } - if (enablePrivateServiceConnect_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(17, enablePrivateServiceConnect_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 18, getPredictRequestResponseLoggingConfig()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 21, getPrivateServiceConnectConfig()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(23, getClientConnectionConfig()); - } - if (dedicatedEndpointEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, dedicatedEndpointEnabled_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dedicatedEndpointDns_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(25, dedicatedEndpointDns_); - } - if (satisfiesPzs_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, satisfiesPzs_); - } - if (satisfiesPzi_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(28, satisfiesPzi_); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 29, getGenAiAdvancedFeaturesConfig()); - } - if (privateModelServerEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, privateModelServerEnabled_); - } - 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.vertexai.api.Endpoint)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Endpoint other = (com.google.cloud.vertexai.api.Endpoint) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getDeployedModelsList().equals(other.getDeployedModelsList())) return false; - if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - 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 (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; - if (hasEncryptionSpec()) { - if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; - } - if (!getNetwork().equals(other.getNetwork())) return false; - if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; - if (hasPrivateServiceConnectConfig() != other.hasPrivateServiceConnectConfig()) return false; - if (hasPrivateServiceConnectConfig()) { - if (!getPrivateServiceConnectConfig().equals(other.getPrivateServiceConnectConfig())) - return false; - } - if (!getModelDeploymentMonitoringJob().equals(other.getModelDeploymentMonitoringJob())) - return false; - if (hasPredictRequestResponseLoggingConfig() != other.hasPredictRequestResponseLoggingConfig()) - return false; - if (hasPredictRequestResponseLoggingConfig()) { - if (!getPredictRequestResponseLoggingConfig() - .equals(other.getPredictRequestResponseLoggingConfig())) return false; - } - if (getDedicatedEndpointEnabled() != other.getDedicatedEndpointEnabled()) return false; - if (!getDedicatedEndpointDns().equals(other.getDedicatedEndpointDns())) return false; - if (hasClientConnectionConfig() != other.hasClientConnectionConfig()) return false; - if (hasClientConnectionConfig()) { - if (!getClientConnectionConfig().equals(other.getClientConnectionConfig())) return false; - } - if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; - if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; - if (hasGenAiAdvancedFeaturesConfig() != other.hasGenAiAdvancedFeaturesConfig()) return false; - if (hasGenAiAdvancedFeaturesConfig()) { - if (!getGenAiAdvancedFeaturesConfig().equals(other.getGenAiAdvancedFeaturesConfig())) - return false; - } - if (getPrivateModelServerEnabled() != other.getPrivateModelServerEnabled()) 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) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getDeployedModelsCount() > 0) { - hash = (37 * hash) + DEPLOYED_MODELS_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModelsList().hashCode(); - } - if (!internalGetTrafficSplit().getMap().isEmpty()) { - hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; - hash = (53 * hash) + internalGetTrafficSplit().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().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 (hasEncryptionSpec()) { - hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionSpec().hashCode(); - } - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); - if (hasPrivateServiceConnectConfig()) { - hash = (37 * hash) + PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getPrivateServiceConnectConfig().hashCode(); - } - hash = (37 * hash) + MODEL_DEPLOYMENT_MONITORING_JOB_FIELD_NUMBER; - hash = (53 * hash) + getModelDeploymentMonitoringJob().hashCode(); - if (hasPredictRequestResponseLoggingConfig()) { - hash = (37 * hash) + PREDICT_REQUEST_RESPONSE_LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getPredictRequestResponseLoggingConfig().hashCode(); - } - hash = (37 * hash) + DEDICATED_ENDPOINT_ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDedicatedEndpointEnabled()); - hash = (37 * hash) + DEDICATED_ENDPOINT_DNS_FIELD_NUMBER; - hash = (53 * hash) + getDedicatedEndpointDns().hashCode(); - if (hasClientConnectionConfig()) { - hash = (37 * hash) + CLIENT_CONNECTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getClientConnectionConfig().hashCode(); - } - hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); - hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); - if (hasGenAiAdvancedFeaturesConfig()) { - hash = (37 * hash) + GEN_AI_ADVANCED_FEATURES_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGenAiAdvancedFeaturesConfig().hashCode(); - } - hash = (37 * hash) + PRIVATE_MODEL_SERVER_ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateModelServerEnabled()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Endpoint 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.vertexai.api.Endpoint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Endpoint 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.vertexai.api.Endpoint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Endpoint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Endpoint parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Endpoint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Endpoint 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Models are deployed into it, and afterwards Endpoint is called to obtain
-   * predictions and explanations.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Endpoint} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Endpoint) - com.google.cloud.vertexai.api.EndpointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 5: - return internalGetTrafficSplit(); - case 7: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 5: - return internalGetMutableTrafficSplit(); - case 7: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Endpoint.class, - com.google.cloud.vertexai.api.Endpoint.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Endpoint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDeployedModelsFieldBuilder(); - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - internalGetEncryptionSpecFieldBuilder(); - internalGetPrivateServiceConnectConfigFieldBuilder(); - internalGetPredictRequestResponseLoggingConfigFieldBuilder(); - internalGetClientConnectionConfigFieldBuilder(); - internalGetGenAiAdvancedFeaturesConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - displayName_ = ""; - description_ = ""; - if (deployedModelsBuilder_ == null) { - deployedModels_ = java.util.Collections.emptyList(); - } else { - deployedModels_ = null; - deployedModelsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableTrafficSplit().clear(); - etag_ = ""; - internalGetMutableLabels().clear(); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - network_ = ""; - enablePrivateServiceConnect_ = false; - privateServiceConnectConfig_ = null; - if (privateServiceConnectConfigBuilder_ != null) { - privateServiceConnectConfigBuilder_.dispose(); - privateServiceConnectConfigBuilder_ = null; - } - modelDeploymentMonitoringJob_ = ""; - predictRequestResponseLoggingConfig_ = null; - if (predictRequestResponseLoggingConfigBuilder_ != null) { - predictRequestResponseLoggingConfigBuilder_.dispose(); - predictRequestResponseLoggingConfigBuilder_ = null; - } - dedicatedEndpointEnabled_ = false; - dedicatedEndpointDns_ = ""; - clientConnectionConfig_ = null; - if (clientConnectionConfigBuilder_ != null) { - clientConnectionConfigBuilder_.dispose(); - clientConnectionConfigBuilder_ = null; - } - satisfiesPzs_ = false; - satisfiesPzi_ = false; - genAiAdvancedFeaturesConfig_ = null; - if (genAiAdvancedFeaturesConfigBuilder_ != null) { - genAiAdvancedFeaturesConfigBuilder_.dispose(); - genAiAdvancedFeaturesConfigBuilder_ = null; - } - privateModelServerEnabled_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_Endpoint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Endpoint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint build() { - com.google.cloud.vertexai.api.Endpoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint buildPartial() { - com.google.cloud.vertexai.api.Endpoint result = - new com.google.cloud.vertexai.api.Endpoint(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Endpoint result) { - if (deployedModelsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.deployedModels_ = deployedModels_; - } else { - result.deployedModels_ = deployedModelsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Endpoint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.trafficSplit_ = internalGetTrafficSplit(); - result.trafficSplit_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.etag_ = etag_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000080) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.encryptionSpec_ = - encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.privateServiceConnectConfig_ = - privateServiceConnectConfigBuilder_ == null - ? privateServiceConnectConfig_ - : privateServiceConnectConfigBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.modelDeploymentMonitoringJob_ = modelDeploymentMonitoringJob_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.predictRequestResponseLoggingConfig_ = - predictRequestResponseLoggingConfigBuilder_ == null - ? predictRequestResponseLoggingConfig_ - : predictRequestResponseLoggingConfigBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.dedicatedEndpointEnabled_ = dedicatedEndpointEnabled_; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.dedicatedEndpointDns_ = dedicatedEndpointDns_; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.clientConnectionConfig_ = - clientConnectionConfigBuilder_ == null - ? clientConnectionConfig_ - : clientConnectionConfigBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.satisfiesPzs_ = satisfiesPzs_; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.satisfiesPzi_ = satisfiesPzi_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.genAiAdvancedFeaturesConfig_ = - genAiAdvancedFeaturesConfigBuilder_ == null - ? genAiAdvancedFeaturesConfig_ - : genAiAdvancedFeaturesConfigBuilder_.build(); - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00200000) != 0)) { - result.privateModelServerEnabled_ = privateModelServerEnabled_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Endpoint) { - return mergeFrom((com.google.cloud.vertexai.api.Endpoint) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Endpoint other) { - if (other == com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (deployedModelsBuilder_ == null) { - if (!other.deployedModels_.isEmpty()) { - if (deployedModels_.isEmpty()) { - deployedModels_ = other.deployedModels_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureDeployedModelsIsMutable(); - deployedModels_.addAll(other.deployedModels_); - } - onChanged(); - } - } else { - if (!other.deployedModels_.isEmpty()) { - if (deployedModelsBuilder_.isEmpty()) { - deployedModelsBuilder_.dispose(); - deployedModelsBuilder_ = null; - deployedModels_ = other.deployedModels_; - bitField0_ = (bitField0_ & ~0x00000008); - deployedModelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDeployedModelsFieldBuilder() - : null; - } else { - deployedModelsBuilder_.addAllMessages(other.deployedModels_); - } - } - } - internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); - bitField0_ |= 0x00000010; - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00000020; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000040; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasEncryptionSpec()) { - mergeEncryptionSpec(other.getEncryptionSpec()); - } - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (other.getEnablePrivateServiceConnect() != false) { - setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); - } - if (other.hasPrivateServiceConnectConfig()) { - mergePrivateServiceConnectConfig(other.getPrivateServiceConnectConfig()); - } - if (!other.getModelDeploymentMonitoringJob().isEmpty()) { - modelDeploymentMonitoringJob_ = other.modelDeploymentMonitoringJob_; - bitField0_ |= 0x00002000; - onChanged(); - } - if (other.hasPredictRequestResponseLoggingConfig()) { - mergePredictRequestResponseLoggingConfig(other.getPredictRequestResponseLoggingConfig()); - } - if (other.getDedicatedEndpointEnabled() != false) { - setDedicatedEndpointEnabled(other.getDedicatedEndpointEnabled()); - } - if (!other.getDedicatedEndpointDns().isEmpty()) { - dedicatedEndpointDns_ = other.dedicatedEndpointDns_; - bitField0_ |= 0x00010000; - onChanged(); - } - if (other.hasClientConnectionConfig()) { - mergeClientConnectionConfig(other.getClientConnectionConfig()); - } - if (other.getSatisfiesPzs() != false) { - setSatisfiesPzs(other.getSatisfiesPzs()); - } - if (other.getSatisfiesPzi() != false) { - setSatisfiesPzi(other.getSatisfiesPzi()); - } - if (other.hasGenAiAdvancedFeaturesConfig()) { - mergeGenAiAdvancedFeaturesConfig(other.getGenAiAdvancedFeaturesConfig()); - } - if (other.getPrivateModelServerEnabled() != false) { - setPrivateModelServerEnabled(other.getPrivateModelServerEnabled()); - } - 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: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.vertexai.api.DeployedModel m = - input.readMessage( - com.google.cloud.vertexai.api.DeployedModel.parser(), extensionRegistry); - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - deployedModels_.add(m); - } else { - deployedModelsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.protobuf.MapEntry trafficSplit__ = - input.readMessage( - TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableTrafficSplit() - .getMutableMap() - .put(trafficSplit__.getKey(), trafficSplit__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: - { - input.readMessage( - internalGetEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 106: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 106 - case 114: - { - modelDeploymentMonitoringJob_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 114 - case 136: - { - enablePrivateServiceConnect_ = input.readBool(); - bitField0_ |= 0x00000800; - break; - } // case 136 - case 146: - { - input.readMessage( - internalGetPredictRequestResponseLoggingConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00004000; - break; - } // case 146 - case 170: - { - input.readMessage( - internalGetPrivateServiceConnectConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 170 - case 186: - { - input.readMessage( - internalGetClientConnectionConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 186 - case 192: - { - dedicatedEndpointEnabled_ = input.readBool(); - bitField0_ |= 0x00008000; - break; - } // case 192 - case 202: - { - dedicatedEndpointDns_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - break; - } // case 202 - case 216: - { - satisfiesPzs_ = input.readBool(); - bitField0_ |= 0x00040000; - break; - } // case 216 - case 224: - { - satisfiesPzi_ = input.readBool(); - bitField0_ |= 0x00080000; - break; - } // case 224 - case 234: - { - input.readMessage( - internalGetGenAiAdvancedFeaturesConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00100000; - break; - } // case 234 - case 240: - { - privateModelServerEnabled_ = input.readBool(); - bitField0_ |= 0x00200000; - break; - } // case 240 - 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. The resource name of the Endpoint.
-     * 
- * - * 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. The resource name of the Endpoint.
-     * 
- * - * 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. The resource name of the Endpoint.
-     * 
- * - * 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. The resource name of the Endpoint.
-     * 
- * - * 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. The resource name of the Endpoint.
-     * 
- * - * 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 displayName_ = ""; - - /** - * - * - *
-     * Required. The display name of the Endpoint.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the Endpoint.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the Endpoint.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - - /** - * - * - *
-     * Required. The display name of the Endpoint.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The display name of the Endpoint.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 java.lang.Object description_ = ""; - - /** - * - * - *
-     * The description of the Endpoint.
-     * 
- * - * string description = 3; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The description of the Endpoint.
-     * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The description of the Endpoint.
-     * 
- * - * string description = 3; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The description of the Endpoint.
-     * 
- * - * string description = 3; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * The description of the Endpoint.
-     * 
- * - * string description = 3; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List deployedModels_ = - java.util.Collections.emptyList(); - - private void ensureDeployedModelsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - deployedModels_ = - new java.util.ArrayList(deployedModels_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - deployedModelsBuilder_; - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getDeployedModelsList() { - if (deployedModelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deployedModels_); - } else { - return deployedModelsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getDeployedModelsCount() { - if (deployedModelsBuilder_ == null) { - return deployedModels_.size(); - } else { - return deployedModelsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel getDeployedModels(int index) { - if (deployedModelsBuilder_ == null) { - return deployedModels_.get(index); - } else { - return deployedModelsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeployedModels(int index, com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeployedModelsIsMutable(); - deployedModels_.set(index, value); - onChanged(); - } else { - deployedModelsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeployedModels( - int index, com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - deployedModels_.set(index, builderForValue.build()); - onChanged(); - } else { - deployedModelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addDeployedModels(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeployedModelsIsMutable(); - deployedModels_.add(value); - onChanged(); - } else { - deployedModelsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addDeployedModels(int index, com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeployedModelsIsMutable(); - deployedModels_.add(index, value); - onChanged(); - } else { - deployedModelsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addDeployedModels( - com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - deployedModels_.add(builderForValue.build()); - onChanged(); - } else { - deployedModelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addDeployedModels( - int index, com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - deployedModels_.add(index, builderForValue.build()); - onChanged(); - } else { - deployedModelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllDeployedModels( - java.lang.Iterable values) { - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedModels_); - onChanged(); - } else { - deployedModelsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDeployedModels() { - if (deployedModelsBuilder_ == null) { - deployedModels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - deployedModelsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeDeployedModels(int index) { - if (deployedModelsBuilder_ == null) { - ensureDeployedModelsIsMutable(); - deployedModels_.remove(index); - onChanged(); - } else { - deployedModelsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder getDeployedModelsBuilder(int index) { - return internalGetDeployedModelsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelsOrBuilder( - int index) { - if (deployedModelsBuilder_ == null) { - return deployedModels_.get(index); - } else { - return deployedModelsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getDeployedModelsOrBuilderList() { - if (deployedModelsBuilder_ != null) { - return deployedModelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deployedModels_); - } - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder addDeployedModelsBuilder() { - return internalGetDeployedModelsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder addDeployedModelsBuilder(int index) { - return internalGetDeployedModelsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. The models deployed in this Endpoint.
-     * To add or remove DeployedModels use
-     * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-     * and
-     * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-     * respectively.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getDeployedModelsBuilderList() { - return internalGetDeployedModelsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - internalGetDeployedModelsFieldBuilder() { - if (deployedModelsBuilder_ == null) { - deployedModelsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder>( - deployedModels_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - deployedModels_ = null; - } - return deployedModelsBuilder_; - } - - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - private com.google.protobuf.MapField - internalGetMutableTrafficSplit() { - if (trafficSplit_ == null) { - trafficSplit_ = - com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); - } - if (!trafficSplit_.isMutable()) { - trafficSplit_ = trafficSplit_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearTrafficSplit() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableTrafficSplit().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - public Builder removeTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableTrafficSplit().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableTrafficSplit() { - bitField0_ |= 0x00000010; - return internalGetMutableTrafficSplit().getMutableMap(); - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - public Builder putTrafficSplit(java.lang.String key, int value) { - if (key == null) { - throw new NullPointerException("map key"); - } - - internalGetMutableTrafficSplit().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - - /** - * - * - *
-     * A map from a DeployedModel's ID to the percentage of this Endpoint's
-     * traffic that should be forwarded to that DeployedModel.
-     *
-     * If a DeployedModel's ID is not listed in this map, then it receives no
-     * traffic.
-     *
-     * The traffic percentage values must add up to 100, or map must be empty if
-     * the Endpoint is to not accept any traffic at a moment.
-     * 
- * - * map<string, int32> traffic_split = 5; - */ - public Builder putAllTrafficSplit(java.util.Map values) { - internalGetMutableTrafficSplit().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object etag_ = ""; - - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 6; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 6; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - etag_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 6; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 6; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - etag_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000040; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000040; - return internalGetMutableLabels().getMutableMap(); - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000040; - return this; - } - - /** - * - * - *
-     * The labels with user-defined metadata to organize your Endpoints.
-     *
-     * Label keys and values can be no longer than 64 characters
-     * (Unicode codepoints), can only contain lowercase letters, numeric
-     * characters, underscores and dashes. International characters are allowed.
-     *
-     * See https://goo.gl/xmQnxf for more information and examples of labels.
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000040; - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.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_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.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_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000080); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when this Endpoint was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000100); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - - /** - * - * - *
-     * Output only. Timestamp when this Endpoint was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - encryptionSpecBuilder_; - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return Whether the encryptionSpec field is set. - */ - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return The encryptionSpec. - */ - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - if (encryptionSpecBuilder_ == null) { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } else { - return encryptionSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public Builder setEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionSpec_ = value; - } else { - encryptionSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public Builder setEncryptionSpec( - com.google.cloud.vertexai.api.EncryptionSpec.Builder builderForValue) { - if (encryptionSpecBuilder_ == null) { - encryptionSpec_ = builderForValue.build(); - } else { - encryptionSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public Builder mergeEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && encryptionSpec_ != null - && encryptionSpec_ - != com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance()) { - getEncryptionSpecBuilder().mergeFrom(value); - } else { - encryptionSpec_ = value; - } - } else { - encryptionSpecBuilder_.mergeFrom(value); - } - if (encryptionSpec_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public Builder clearEncryptionSpec() { - bitField0_ = (bitField0_ & ~0x00000200); - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public com.google.cloud.vertexai.api.EncryptionSpec.Builder getEncryptionSpecBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetEncryptionSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - if (encryptionSpecBuilder_ != null) { - return encryptionSpecBuilder_.getMessageOrBuilder(); - } else { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - } - - /** - * - * - *
-     * Customer-managed encryption key spec for an Endpoint. If set, this
-     * Endpoint and all sub-resources of this Endpoint will be secured by
-     * this key.
-     * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - internalGetEncryptionSpecFieldBuilder() { - if (encryptionSpecBuilder_ == null) { - encryptionSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder>( - getEncryptionSpec(), getParentForChildren(), isClean()); - encryptionSpec_ = null; - } - return encryptionSpecBuilder_; - } - - private java.lang.Object network_ = ""; - - /** - * - * - *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-     * to which the Endpoint should be peered.
-     *
-     * Private services access must already be configured for the network. If left
-     * unspecified, the Endpoint is not peered with any network.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     *
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-     * `projects/{project}/global/networks/{network}`.
-     * Where `{project}` is a project number, as in `12345`, and `{network}` is
-     * network name.
-     * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-     * to which the Endpoint should be peered.
-     *
-     * Private services access must already be configured for the network. If left
-     * unspecified, the Endpoint is not peered with any network.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     *
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-     * `projects/{project}/global/networks/{network}`.
-     * Where `{project}` is a project number, as in `12345`, and `{network}` is
-     * network name.
-     * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-     * to which the Endpoint should be peered.
-     *
-     * Private services access must already be configured for the network. If left
-     * unspecified, the Endpoint is not peered with any network.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     *
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-     * `projects/{project}/global/networks/{network}`.
-     * Where `{project}` is a project number, as in `12345`, and `{network}` is
-     * network name.
-     * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-     * to which the Endpoint should be peered.
-     *
-     * Private services access must already be configured for the network. If left
-     * unspecified, the Endpoint is not peered with any network.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     *
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-     * `projects/{project}/global/networks/{network}`.
-     * Where `{project}` is a project number, as in `12345`, and `{network}` is
-     * network name.
-     * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-     * to which the Endpoint should be peered.
-     *
-     * Private services access must already be configured for the network. If left
-     * unspecified, the Endpoint is not peered with any network.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     *
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-     * `projects/{project}/global/networks/{network}`.
-     * Where `{project}` is a project number, as in `12345`, and `{network}` is
-     * network name.
-     * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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_ |= 0x00000400; - onChanged(); - return this; - } - - private boolean enablePrivateServiceConnect_; - - /** - * - * - *
-     * Deprecated: If true, expose the Endpoint via private service connect.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     * 
- * - * bool enable_private_service_connect = 17 [deprecated = true]; - * - * @deprecated google.cloud.vertexai.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/vertexai/v1/endpoint.proto;l=128 - * @return The enablePrivateServiceConnect. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean getEnablePrivateServiceConnect() { - return enablePrivateServiceConnect_; - } - - /** - * - * - *
-     * Deprecated: If true, expose the Endpoint via private service connect.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     * 
- * - * bool enable_private_service_connect = 17 [deprecated = true]; - * - * @deprecated google.cloud.vertexai.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/vertexai/v1/endpoint.proto;l=128 - * @param value The enablePrivateServiceConnect to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setEnablePrivateServiceConnect(boolean value) { - - enablePrivateServiceConnect_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Deprecated: If true, expose the Endpoint via private service connect.
-     *
-     * Only one of the fields,
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-     * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-     * can be set.
-     * 
- * - * bool enable_private_service_connect = 17 [deprecated = true]; - * - * @deprecated google.cloud.vertexai.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/vertexai/v1/endpoint.proto;l=128 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearEnablePrivateServiceConnect() { - bitField0_ = (bitField0_ & ~0x00000800); - enablePrivateServiceConnect_ = false; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.PrivateServiceConnectConfig privateServiceConnectConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateServiceConnectConfig, - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder, - com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder> - privateServiceConnectConfigBuilder_; - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the privateServiceConnectConfig field is set. - */ - public boolean hasPrivateServiceConnectConfig() { - return ((bitField0_ & 0x00001000) != 0); - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateServiceConnectConfig. - */ - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig - getPrivateServiceConnectConfig() { - if (privateServiceConnectConfigBuilder_ == null) { - return privateServiceConnectConfig_ == null - ? com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance() - : privateServiceConnectConfig_; - } else { - return privateServiceConnectConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrivateServiceConnectConfig( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig value) { - if (privateServiceConnectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - privateServiceConnectConfig_ = value; - } else { - privateServiceConnectConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrivateServiceConnectConfig( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder builderForValue) { - if (privateServiceConnectConfigBuilder_ == null) { - privateServiceConnectConfig_ = builderForValue.build(); - } else { - privateServiceConnectConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePrivateServiceConnectConfig( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig value) { - if (privateServiceConnectConfigBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && privateServiceConnectConfig_ != null - && privateServiceConnectConfig_ - != com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance()) { - getPrivateServiceConnectConfigBuilder().mergeFrom(value); - } else { - privateServiceConnectConfig_ = value; - } - } else { - privateServiceConnectConfigBuilder_.mergeFrom(value); - } - if (privateServiceConnectConfig_ != null) { - bitField0_ |= 0x00001000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPrivateServiceConnectConfig() { - bitField0_ = (bitField0_ & ~0x00001000); - privateServiceConnectConfig_ = null; - if (privateServiceConnectConfigBuilder_ != null) { - privateServiceConnectConfigBuilder_.dispose(); - privateServiceConnectConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder - getPrivateServiceConnectConfigBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return internalGetPrivateServiceConnectConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder - getPrivateServiceConnectConfigOrBuilder() { - if (privateServiceConnectConfigBuilder_ != null) { - return privateServiceConnectConfigBuilder_.getMessageOrBuilder(); - } else { - return privateServiceConnectConfig_ == null - ? com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance() - : privateServiceConnectConfig_; - } - } - - /** - * - * - *
-     * Optional. Configuration for private service connect.
-     *
-     * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-     * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-     * are mutually exclusive.
-     * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateServiceConnectConfig, - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder, - com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder> - internalGetPrivateServiceConnectConfigFieldBuilder() { - if (privateServiceConnectConfigBuilder_ == null) { - privateServiceConnectConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrivateServiceConnectConfig, - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder, - com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder>( - getPrivateServiceConnectConfig(), getParentForChildren(), isClean()); - privateServiceConnectConfig_ = null; - } - return privateServiceConnectConfigBuilder_; - } - - private java.lang.Object modelDeploymentMonitoringJob_ = ""; - - /** - * - * - *
-     * Output only. Resource name of the Model Monitoring job associated with this
-     * Endpoint if monitoring is enabled by
-     * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-     * Format:
-     * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-     * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The modelDeploymentMonitoringJob. - */ - public java.lang.String getModelDeploymentMonitoringJob() { - java.lang.Object ref = modelDeploymentMonitoringJob_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelDeploymentMonitoringJob_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Resource name of the Model Monitoring job associated with this
-     * Endpoint if monitoring is enabled by
-     * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-     * Format:
-     * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-     * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for modelDeploymentMonitoringJob. - */ - public com.google.protobuf.ByteString getModelDeploymentMonitoringJobBytes() { - java.lang.Object ref = modelDeploymentMonitoringJob_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelDeploymentMonitoringJob_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Resource name of the Model Monitoring job associated with this
-     * Endpoint if monitoring is enabled by
-     * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-     * Format:
-     * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-     * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The modelDeploymentMonitoringJob to set. - * @return This builder for chaining. - */ - public Builder setModelDeploymentMonitoringJob(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelDeploymentMonitoringJob_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Resource name of the Model Monitoring job associated with this
-     * Endpoint if monitoring is enabled by
-     * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-     * Format:
-     * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-     * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearModelDeploymentMonitoringJob() { - modelDeploymentMonitoringJob_ = getDefaultInstance().getModelDeploymentMonitoringJob(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Resource name of the Model Monitoring job associated with this
-     * Endpoint if monitoring is enabled by
-     * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-     * Format:
-     * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-     * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for modelDeploymentMonitoringJob to set. - * @return This builder for chaining. - */ - public Builder setModelDeploymentMonitoringJobBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelDeploymentMonitoringJob_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - predictRequestResponseLoggingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder> - predictRequestResponseLoggingConfigBuilder_; - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return Whether the predictRequestResponseLoggingConfig field is set. - */ - public boolean hasPredictRequestResponseLoggingConfig() { - return ((bitField0_ & 0x00004000) != 0); - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return The predictRequestResponseLoggingConfig. - */ - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - getPredictRequestResponseLoggingConfig() { - if (predictRequestResponseLoggingConfigBuilder_ == null) { - return predictRequestResponseLoggingConfig_ == null - ? com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance() - : predictRequestResponseLoggingConfig_; - } else { - return predictRequestResponseLoggingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public Builder setPredictRequestResponseLoggingConfig( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig value) { - if (predictRequestResponseLoggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predictRequestResponseLoggingConfig_ = value; - } else { - predictRequestResponseLoggingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public Builder setPredictRequestResponseLoggingConfig( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder builderForValue) { - if (predictRequestResponseLoggingConfigBuilder_ == null) { - predictRequestResponseLoggingConfig_ = builderForValue.build(); - } else { - predictRequestResponseLoggingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public Builder mergePredictRequestResponseLoggingConfig( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig value) { - if (predictRequestResponseLoggingConfigBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) - && predictRequestResponseLoggingConfig_ != null - && predictRequestResponseLoggingConfig_ - != com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - .getDefaultInstance()) { - getPredictRequestResponseLoggingConfigBuilder().mergeFrom(value); - } else { - predictRequestResponseLoggingConfig_ = value; - } - } else { - predictRequestResponseLoggingConfigBuilder_.mergeFrom(value); - } - if (predictRequestResponseLoggingConfig_ != null) { - bitField0_ |= 0x00004000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public Builder clearPredictRequestResponseLoggingConfig() { - bitField0_ = (bitField0_ & ~0x00004000); - predictRequestResponseLoggingConfig_ = null; - if (predictRequestResponseLoggingConfigBuilder_ != null) { - predictRequestResponseLoggingConfigBuilder_.dispose(); - predictRequestResponseLoggingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder - getPredictRequestResponseLoggingConfigBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return internalGetPredictRequestResponseLoggingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder - getPredictRequestResponseLoggingConfigOrBuilder() { - if (predictRequestResponseLoggingConfigBuilder_ != null) { - return predictRequestResponseLoggingConfigBuilder_.getMessageOrBuilder(); - } else { - return predictRequestResponseLoggingConfig_ == null - ? com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance() - : predictRequestResponseLoggingConfig_; - } - } - - /** - * - * - *
-     * Configures the request-response logging for online prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder> - internalGetPredictRequestResponseLoggingConfigFieldBuilder() { - if (predictRequestResponseLoggingConfigBuilder_ == null) { - predictRequestResponseLoggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder>( - getPredictRequestResponseLoggingConfig(), getParentForChildren(), isClean()); - predictRequestResponseLoggingConfig_ = null; - } - return predictRequestResponseLoggingConfigBuilder_; - } - - private boolean dedicatedEndpointEnabled_; - - /** - * - * - *
-     * If true, the endpoint will be exposed through a dedicated
-     * DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
-     * will be isolated from other users' traffic and will have better performance
-     * and reliability.
-     * Note: Once you enabled dedicated endpoint, you won't be able to send
-     * request to the shared DNS {region}-aiplatform.googleapis.com. The
-     * limitation will be removed soon.
-     * 
- * - * bool dedicated_endpoint_enabled = 24; - * - * @return The dedicatedEndpointEnabled. - */ - @java.lang.Override - public boolean getDedicatedEndpointEnabled() { - return dedicatedEndpointEnabled_; - } - - /** - * - * - *
-     * If true, the endpoint will be exposed through a dedicated
-     * DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
-     * will be isolated from other users' traffic and will have better performance
-     * and reliability.
-     * Note: Once you enabled dedicated endpoint, you won't be able to send
-     * request to the shared DNS {region}-aiplatform.googleapis.com. The
-     * limitation will be removed soon.
-     * 
- * - * bool dedicated_endpoint_enabled = 24; - * - * @param value The dedicatedEndpointEnabled to set. - * @return This builder for chaining. - */ - public Builder setDedicatedEndpointEnabled(boolean value) { - - dedicatedEndpointEnabled_ = value; - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, the endpoint will be exposed through a dedicated
-     * DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
-     * will be isolated from other users' traffic and will have better performance
-     * and reliability.
-     * Note: Once you enabled dedicated endpoint, you won't be able to send
-     * request to the shared DNS {region}-aiplatform.googleapis.com. The
-     * limitation will be removed soon.
-     * 
- * - * bool dedicated_endpoint_enabled = 24; - * - * @return This builder for chaining. - */ - public Builder clearDedicatedEndpointEnabled() { - bitField0_ = (bitField0_ & ~0x00008000); - dedicatedEndpointEnabled_ = false; - onChanged(); - return this; - } - - private java.lang.Object dedicatedEndpointDns_ = ""; - - /** - * - * - *
-     * Output only. DNS of the dedicated endpoint. Will only be populated if
-     * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-     * might be a random number or a string. For example, if fast_tryout is
-     * enabled, uid will be fasttryout. Format:
-     * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-     * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The dedicatedEndpointDns. - */ - public java.lang.String getDedicatedEndpointDns() { - java.lang.Object ref = dedicatedEndpointDns_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dedicatedEndpointDns_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. DNS of the dedicated endpoint. Will only be populated if
-     * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-     * might be a random number or a string. For example, if fast_tryout is
-     * enabled, uid will be fasttryout. Format:
-     * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-     * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for dedicatedEndpointDns. - */ - public com.google.protobuf.ByteString getDedicatedEndpointDnsBytes() { - java.lang.Object ref = dedicatedEndpointDns_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dedicatedEndpointDns_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. DNS of the dedicated endpoint. Will only be populated if
-     * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-     * might be a random number or a string. For example, if fast_tryout is
-     * enabled, uid will be fasttryout. Format:
-     * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-     * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The dedicatedEndpointDns to set. - * @return This builder for chaining. - */ - public Builder setDedicatedEndpointDns(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dedicatedEndpointDns_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. DNS of the dedicated endpoint. Will only be populated if
-     * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-     * might be a random number or a string. For example, if fast_tryout is
-     * enabled, uid will be fasttryout. Format:
-     * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-     * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDedicatedEndpointDns() { - dedicatedEndpointDns_ = getDefaultInstance().getDedicatedEndpointDns(); - bitField0_ = (bitField0_ & ~0x00010000); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. DNS of the dedicated endpoint. Will only be populated if
-     * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-     * might be a random number or a string. For example, if fast_tryout is
-     * enabled, uid will be fasttryout. Format:
-     * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-     * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for dedicatedEndpointDns to set. - * @return This builder for chaining. - */ - public Builder setDedicatedEndpointDnsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dedicatedEndpointDns_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.ClientConnectionConfig clientConnectionConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ClientConnectionConfig, - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder, - com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder> - clientConnectionConfigBuilder_; - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return Whether the clientConnectionConfig field is set. - */ - public boolean hasClientConnectionConfig() { - return ((bitField0_ & 0x00020000) != 0); - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return The clientConnectionConfig. - */ - public com.google.cloud.vertexai.api.ClientConnectionConfig getClientConnectionConfig() { - if (clientConnectionConfigBuilder_ == null) { - return clientConnectionConfig_ == null - ? com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; - } else { - return clientConnectionConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public Builder setClientConnectionConfig( - com.google.cloud.vertexai.api.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - clientConnectionConfig_ = value; - } else { - clientConnectionConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public Builder setClientConnectionConfig( - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder builderForValue) { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfig_ = builderForValue.build(); - } else { - clientConnectionConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public Builder mergeClientConnectionConfig( - com.google.cloud.vertexai.api.ClientConnectionConfig value) { - if (clientConnectionConfigBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) - && clientConnectionConfig_ != null - && clientConnectionConfig_ - != com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance()) { - getClientConnectionConfigBuilder().mergeFrom(value); - } else { - clientConnectionConfig_ = value; - } - } else { - clientConnectionConfigBuilder_.mergeFrom(value); - } - if (clientConnectionConfig_ != null) { - bitField0_ |= 0x00020000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public Builder clearClientConnectionConfig() { - bitField0_ = (bitField0_ & ~0x00020000); - clientConnectionConfig_ = null; - if (clientConnectionConfigBuilder_ != null) { - clientConnectionConfigBuilder_.dispose(); - clientConnectionConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public com.google.cloud.vertexai.api.ClientConnectionConfig.Builder - getClientConnectionConfigBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return internalGetClientConnectionConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - public com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder() { - if (clientConnectionConfigBuilder_ != null) { - return clientConnectionConfigBuilder_.getMessageOrBuilder(); - } else { - return clientConnectionConfig_ == null - ? com.google.cloud.vertexai.api.ClientConnectionConfig.getDefaultInstance() - : clientConnectionConfig_; - } - } - - /** - * - * - *
-     * Configurations that are applied to the endpoint for online prediction.
-     * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ClientConnectionConfig, - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder, - com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder> - internalGetClientConnectionConfigFieldBuilder() { - if (clientConnectionConfigBuilder_ == null) { - clientConnectionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ClientConnectionConfig, - com.google.cloud.vertexai.api.ClientConnectionConfig.Builder, - com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder>( - getClientConnectionConfig(), getParentForChildren(), isClean()); - clientConnectionConfig_ = null; - } - return clientConnectionConfigBuilder_; - } - - private boolean satisfiesPzs_; - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzs. - */ - @java.lang.Override - public boolean getSatisfiesPzs() { - return satisfiesPzs_; - } - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The satisfiesPzs to set. - * @return This builder for chaining. - */ - public Builder setSatisfiesPzs(boolean value) { - - satisfiesPzs_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearSatisfiesPzs() { - bitField0_ = (bitField0_ & ~0x00040000); - satisfiesPzs_ = false; - onChanged(); - return this; - } - - private boolean satisfiesPzi_; - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzi = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzi. - */ - @java.lang.Override - public boolean getSatisfiesPzi() { - return satisfiesPzi_; - } - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzi = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The satisfiesPzi to set. - * @return This builder for chaining. - */ - public Builder setSatisfiesPzi(boolean value) { - - satisfiesPzi_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Reserved for future use.
-     * 
- * - * bool satisfies_pzi = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearSatisfiesPzi() { - bitField0_ = (bitField0_ & ~0x00080000); - satisfiesPzi_ = false; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig genAiAdvancedFeaturesConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder> - genAiAdvancedFeaturesConfigBuilder_; - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the genAiAdvancedFeaturesConfig field is set. - */ - public boolean hasGenAiAdvancedFeaturesConfig() { - return ((bitField0_ & 0x00100000) != 0); - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The genAiAdvancedFeaturesConfig. - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig - getGenAiAdvancedFeaturesConfig() { - if (genAiAdvancedFeaturesConfigBuilder_ == null) { - return genAiAdvancedFeaturesConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance() - : genAiAdvancedFeaturesConfig_; - } else { - return genAiAdvancedFeaturesConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenAiAdvancedFeaturesConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig value) { - if (genAiAdvancedFeaturesConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genAiAdvancedFeaturesConfig_ = value; - } else { - genAiAdvancedFeaturesConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenAiAdvancedFeaturesConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder builderForValue) { - if (genAiAdvancedFeaturesConfigBuilder_ == null) { - genAiAdvancedFeaturesConfig_ = builderForValue.build(); - } else { - genAiAdvancedFeaturesConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGenAiAdvancedFeaturesConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig value) { - if (genAiAdvancedFeaturesConfigBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) - && genAiAdvancedFeaturesConfig_ != null - && genAiAdvancedFeaturesConfig_ - != com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance()) { - getGenAiAdvancedFeaturesConfigBuilder().mergeFrom(value); - } else { - genAiAdvancedFeaturesConfig_ = value; - } - } else { - genAiAdvancedFeaturesConfigBuilder_.mergeFrom(value); - } - if (genAiAdvancedFeaturesConfig_ != null) { - bitField0_ |= 0x00100000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGenAiAdvancedFeaturesConfig() { - bitField0_ = (bitField0_ & ~0x00100000); - genAiAdvancedFeaturesConfig_ = null; - if (genAiAdvancedFeaturesConfigBuilder_ != null) { - genAiAdvancedFeaturesConfigBuilder_.dispose(); - genAiAdvancedFeaturesConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder - getGenAiAdvancedFeaturesConfigBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return internalGetGenAiAdvancedFeaturesConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder - getGenAiAdvancedFeaturesConfigOrBuilder() { - if (genAiAdvancedFeaturesConfigBuilder_ != null) { - return genAiAdvancedFeaturesConfigBuilder_.getMessageOrBuilder(); - } else { - return genAiAdvancedFeaturesConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance() - : genAiAdvancedFeaturesConfig_; - } - } - - /** - * - * - *
-     * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-     * serving GenAI models, advanced features like native RAG integration can be
-     * configured. Currently, only Model Garden models are supported.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder> - internalGetGenAiAdvancedFeaturesConfigFieldBuilder() { - if (genAiAdvancedFeaturesConfigBuilder_ == null) { - genAiAdvancedFeaturesConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder>( - getGenAiAdvancedFeaturesConfig(), getParentForChildren(), isClean()); - genAiAdvancedFeaturesConfig_ = null; - } - return genAiAdvancedFeaturesConfigBuilder_; - } - - private boolean privateModelServerEnabled_; - - /** - * - * - *
-     * If true, the model server will be isolated from the external internet.
-     * 
- * - * bool private_model_server_enabled = 30; - * - * @return The privateModelServerEnabled. - */ - @java.lang.Override - public boolean getPrivateModelServerEnabled() { - return privateModelServerEnabled_; - } - - /** - * - * - *
-     * If true, the model server will be isolated from the external internet.
-     * 
- * - * bool private_model_server_enabled = 30; - * - * @param value The privateModelServerEnabled to set. - * @return This builder for chaining. - */ - public Builder setPrivateModelServerEnabled(boolean value) { - - privateModelServerEnabled_ = value; - bitField0_ |= 0x00200000; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, the model server will be isolated from the external internet.
-     * 
- * - * bool private_model_server_enabled = 30; - * - * @return This builder for chaining. - */ - public Builder clearPrivateModelServerEnabled() { - bitField0_ = (bitField0_ & ~0x00200000); - privateModelServerEnabled_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Endpoint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Endpoint) - private static final com.google.cloud.vertexai.api.Endpoint DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Endpoint(); - } - - public static com.google.cloud.vertexai.api.Endpoint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Endpoint 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.vertexai.api.Endpoint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java deleted file mode 100644 index a9223f73e2f7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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 EndpointName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_ENDPOINT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/endpoints/{endpoint}"); - private static final PathTemplate PROJECT_LOCATION_PUBLISHER_MODEL = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - private final String endpoint; - private final String publisher; - private final String model; - - @Deprecated - protected EndpointName() { - project = null; - location = null; - endpoint = null; - publisher = null; - model = null; - } - - private EndpointName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - endpoint = Preconditions.checkNotNull(builder.getEndpoint()); - publisher = null; - model = null; - pathTemplate = PROJECT_LOCATION_ENDPOINT; - } - - private EndpointName(ProjectLocationPublisherModelBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - publisher = Preconditions.checkNotNull(builder.getPublisher()); - model = Preconditions.checkNotNull(builder.getModel()); - endpoint = null; - pathTemplate = PROJECT_LOCATION_PUBLISHER_MODEL; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getEndpoint() { - return endpoint; - } - - public String getPublisher() { - return publisher; - } - - public String getModel() { - return model; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public static Builder newProjectLocationEndpointBuilder() { - return new Builder(); - } - - public static ProjectLocationPublisherModelBuilder newProjectLocationPublisherModelBuilder() { - return new ProjectLocationPublisherModelBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static EndpointName of(String project, String location, String endpoint) { - return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); - } - - public static EndpointName ofProjectLocationEndpointName( - String project, String location, String endpoint) { - return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); - } - - public static EndpointName ofProjectLocationPublisherModelName( - String project, String location, String publisher, String model) { - return newProjectLocationPublisherModelBuilder() - .setProject(project) - .setLocation(location) - .setPublisher(publisher) - .setModel(model) - .build(); - } - - public static String format(String project, String location, String endpoint) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setEndpoint(endpoint) - .build() - .toString(); - } - - public static String formatProjectLocationEndpointName( - String project, String location, String endpoint) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setEndpoint(endpoint) - .build() - .toString(); - } - - public static String formatProjectLocationPublisherModelName( - String project, String location, String publisher, String model) { - return newProjectLocationPublisherModelBuilder() - .setProject(project) - .setLocation(location) - .setPublisher(publisher) - .setModel(model) - .build() - .toString(); - } - - public static EndpointName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_LOCATION_ENDPOINT.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_ENDPOINT.match(formattedString); - return ofProjectLocationEndpointName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("endpoint")); - } else if (PROJECT_LOCATION_PUBLISHER_MODEL.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_PUBLISHER_MODEL.match(formattedString); - return ofProjectLocationPublisherModelName( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("publisher"), - matchMap.get("model")); - } - throw new ValidationException("EndpointName.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 (EndpointName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_ENDPOINT.matches(formattedString) - || PROJECT_LOCATION_PUBLISHER_MODEL.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 (endpoint != null) { - fieldMapBuilder.put("endpoint", endpoint); - } - if (publisher != null) { - fieldMapBuilder.put("publisher", publisher); - } - if (model != null) { - fieldMapBuilder.put("model", model); - } - 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()) { - EndpointName that = ((EndpointName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.endpoint, that.endpoint) - && Objects.equals(this.publisher, that.publisher) - && Objects.equals(this.model, that.model); - } - 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(endpoint); - h *= 1000003; - h ^= Objects.hashCode(publisher); - h *= 1000003; - h ^= Objects.hashCode(model); - return h; - } - - /** Builder for projects/{project}/locations/{location}/endpoints/{endpoint}. */ - public static class Builder { - private String project; - private String location; - private String endpoint; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getEndpoint() { - return endpoint; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - private Builder(EndpointName endpointName) { - Preconditions.checkArgument( - Objects.equals(endpointName.pathTemplate, PROJECT_LOCATION_ENDPOINT), - "toBuilder is only supported when EndpointName has the pattern of" - + " projects/{project}/locations/{location}/endpoints/{endpoint}"); - this.project = endpointName.project; - this.location = endpointName.location; - this.endpoint = endpointName.endpoint; - } - - public EndpointName build() { - return new EndpointName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/publishers/{publisher}/models/{model}. */ - public static class ProjectLocationPublisherModelBuilder { - private String project; - private String location; - private String publisher; - private String model; - - protected ProjectLocationPublisherModelBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getPublisher() { - return publisher; - } - - public String getModel() { - return model; - } - - public ProjectLocationPublisherModelBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationPublisherModelBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationPublisherModelBuilder setPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - public ProjectLocationPublisherModelBuilder setModel(String model) { - this.model = model; - return this; - } - - public EndpointName build() { - return new EndpointName(this); - } - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java deleted file mode 100644 index a9b2eca0be14..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java +++ /dev/null @@ -1,939 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface EndpointOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Endpoint) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the Endpoint.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Output only. The resource name of the Endpoint.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The display name of the Endpoint.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Required. The display name of the Endpoint.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * The description of the Endpoint.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - java.lang.String getDescription(); - - /** - * - * - *
-   * The description of the Endpoint.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getDeployedModelsList(); - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.DeployedModel getDeployedModels(int index); - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getDeployedModelsCount(); - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getDeployedModelsOrBuilderList(); - - /** - * - * - *
-   * Output only. The models deployed in this Endpoint.
-   * To add or remove DeployedModels use
-   * [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
-   * and
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
-   * respectively.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DeployedModel deployed_models = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelsOrBuilder(int index); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - int getTrafficSplitCount(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - boolean containsTrafficSplit(java.lang.String key); - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Deprecated - java.util.Map getTrafficSplit(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - java.util.Map getTrafficSplitMap(); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); - - /** - * - * - *
-   * A map from a DeployedModel's ID to the percentage of this Endpoint's
-   * traffic that should be forwarded to that DeployedModel.
-   *
-   * If a DeployedModel's ID is not listed in this map, then it receives no
-   * traffic.
-   *
-   * The traffic percentage values must add up to 100, or map must be empty if
-   * the Endpoint is to not accept any traffic at a moment.
-   * 
- * - * map<string, int32> traffic_split = 5; - */ - int getTrafficSplitOrThrow(java.lang.String key); - - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 6; - * - * @return The etag. - */ - java.lang.String getEtag(); - - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 6; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - int getLabelsCount(); - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - boolean containsLabels(java.lang.String key); - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - java.util.Map getLabelsMap(); - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - - /** - * - * - *
-   * The labels with user-defined metadata to organize your Endpoints.
-   *
-   * Label keys and values can be no longer than 64 characters
-   * (Unicode codepoints), can only contain lowercase letters, numeric
-   * characters, underscores and dashes. International characters are allowed.
-   *
-   * See https://goo.gl/xmQnxf for more information and examples of labels.
-   * 
- * - * map<string, string> labels = 7; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this Endpoint was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return Whether the encryptionSpec field is set. - */ - boolean hasEncryptionSpec(); - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - * - * @return The encryptionSpec. - */ - com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec(); - - /** - * - * - *
-   * Customer-managed encryption key spec for an Endpoint. If set, this
-   * Endpoint and all sub-resources of this Endpoint will be secured by
-   * this key.
-   * 
- * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 10; - */ - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); - - /** - * - * - *
-   * Optional. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-   * to which the Endpoint should be peered.
-   *
-   * Private services access must already be configured for the network. If left
-   * unspecified, the Endpoint is not peered with any network.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   *
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-   * `projects/{project}/global/networks/{network}`.
-   * Where `{project}` is a project number, as in `12345`, and `{network}` is
-   * network name.
-   * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The network. - */ - java.lang.String getNetwork(); - - /** - * - * - *
-   * Optional. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
-   * to which the Endpoint should be peered.
-   *
-   * Private services access must already be configured for the network. If left
-   * unspecified, the Endpoint is not peered with any network.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   *
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
-   * `projects/{project}/global/networks/{network}`.
-   * Where `{project}` is a project number, as in `12345`, and `{network}` is
-   * network name.
-   * 
- * - * - * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Deprecated: If true, expose the Endpoint via private service connect.
-   *
-   * Only one of the fields,
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] or
-   * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
-   * can be set.
-   * 
- * - * bool enable_private_service_connect = 17 [deprecated = true]; - * - * @deprecated google.cloud.vertexai.v1.Endpoint.enable_private_service_connect is deprecated. See - * google/cloud/vertexai/v1/endpoint.proto;l=128 - * @return The enablePrivateServiceConnect. - */ - @java.lang.Deprecated - boolean getEnablePrivateServiceConnect(); - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the privateServiceConnectConfig field is set. - */ - boolean hasPrivateServiceConnectConfig(); - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateServiceConnectConfig. - */ - com.google.cloud.vertexai.api.PrivateServiceConnectConfig getPrivateServiceConnectConfig(); - - /** - * - * - *
-   * Optional. Configuration for private service connect.
-   *
-   * [network][google.cloud.aiplatform.v1.Endpoint.network] and
-   * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
-   * are mutually exclusive.
-   * 
- * - * - * .google.cloud.vertexai.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder - getPrivateServiceConnectConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Resource name of the Model Monitoring job associated with this
-   * Endpoint if monitoring is enabled by
-   * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-   * Format:
-   * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-   * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The modelDeploymentMonitoringJob. - */ - java.lang.String getModelDeploymentMonitoringJob(); - - /** - * - * - *
-   * Output only. Resource name of the Model Monitoring job associated with this
-   * Endpoint if monitoring is enabled by
-   * [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
-   * Format:
-   * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
-   * 
- * - * - * string model_deployment_monitoring_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for modelDeploymentMonitoringJob. - */ - com.google.protobuf.ByteString getModelDeploymentMonitoringJobBytes(); - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return Whether the predictRequestResponseLoggingConfig field is set. - */ - boolean hasPredictRequestResponseLoggingConfig(); - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - * - * @return The predictRequestResponseLoggingConfig. - */ - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - getPredictRequestResponseLoggingConfig(); - - /** - * - * - *
-   * Configures the request-response logging for online prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig predict_request_response_logging_config = 18; - * - */ - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder - getPredictRequestResponseLoggingConfigOrBuilder(); - - /** - * - * - *
-   * If true, the endpoint will be exposed through a dedicated
-   * DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
-   * will be isolated from other users' traffic and will have better performance
-   * and reliability.
-   * Note: Once you enabled dedicated endpoint, you won't be able to send
-   * request to the shared DNS {region}-aiplatform.googleapis.com. The
-   * limitation will be removed soon.
-   * 
- * - * bool dedicated_endpoint_enabled = 24; - * - * @return The dedicatedEndpointEnabled. - */ - boolean getDedicatedEndpointEnabled(); - - /** - * - * - *
-   * Output only. DNS of the dedicated endpoint. Will only be populated if
-   * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-   * might be a random number or a string. For example, if fast_tryout is
-   * enabled, uid will be fasttryout. Format:
-   * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-   * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The dedicatedEndpointDns. - */ - java.lang.String getDedicatedEndpointDns(); - - /** - * - * - *
-   * Output only. DNS of the dedicated endpoint. Will only be populated if
-   * dedicated_endpoint_enabled is true. Depending on the features enabled, uid
-   * might be a random number or a string. For example, if fast_tryout is
-   * enabled, uid will be fasttryout. Format:
-   * `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
-   * 
- * - * string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for dedicatedEndpointDns. - */ - com.google.protobuf.ByteString getDedicatedEndpointDnsBytes(); - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return Whether the clientConnectionConfig field is set. - */ - boolean hasClientConnectionConfig(); - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - * - * @return The clientConnectionConfig. - */ - com.google.cloud.vertexai.api.ClientConnectionConfig getClientConnectionConfig(); - - /** - * - * - *
-   * Configurations that are applied to the endpoint for online prediction.
-   * 
- * - * .google.cloud.vertexai.v1.ClientConnectionConfig client_connection_config = 23; - */ - com.google.cloud.vertexai.api.ClientConnectionConfigOrBuilder - getClientConnectionConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Reserved for future use.
-   * 
- * - * bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzs. - */ - boolean getSatisfiesPzs(); - - /** - * - * - *
-   * Output only. Reserved for future use.
-   * 
- * - * bool satisfies_pzi = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The satisfiesPzi. - */ - boolean getSatisfiesPzi(); - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the genAiAdvancedFeaturesConfig field is set. - */ - boolean hasGenAiAdvancedFeaturesConfig(); - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The genAiAdvancedFeaturesConfig. - */ - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig getGenAiAdvancedFeaturesConfig(); - - /** - * - * - *
-   * Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
-   * serving GenAI models, advanced features like native RAG integration can be
-   * configured. Currently, only Model Garden models are supported.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder - getGenAiAdvancedFeaturesConfigOrBuilder(); - - /** - * - * - *
-   * If true, the model server will be isolated from the external internet.
-   * 
- * - * bool private_model_server_enabled = 30; - * - * @return The privateModelServerEnabled. - */ - boolean getPrivateModelServerEnabled(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java deleted file mode 100644 index 4dc34db6750c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class EndpointProto extends com.google.protobuf.GeneratedFile { - private EndpointProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EndpointProto"); - } - - 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_vertexai_v1_Endpoint_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Endpoint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployedModel_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployedModel_Status_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PrivateEndpoints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_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/vertexai/v1/endpoint.prot" - + "o\022\030google.cloud.vertexai.v1\032\037google/api/" - + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\032.google/cloud/vertexai/v1/encryption_spec.proto\032*google/cloud/vertexai/v" - + "1/explanation.proto\032!google/cloud/vertexai/v1/io.proto\0320google/cloud/vertexai/v1" - + "/machine_resources.proto\0321google/cloud/v" - + "ertexai/v1/service_networking.proto\032\036goo" - + "gle/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\374\013\n" - + "\010Endpoint\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\003\022\031\n" - + "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n" - + "\013description\030\003 \001(\t\022E\n" - + "\017deployed_models\030\004" - + " \003(\0132\'.google.cloud.vertexai.v1.DeployedModelB\003\340A\003\022K\n\r" - + "traffic_split\030\005 \003(\01324.goo" - + "gle.cloud.vertexai.v1.Endpoint.TrafficSplitEntry\022\014\n" - + "\004etag\030\006 \001(\t\022>\n" - + "\006labels\030\007 \003(\0132..google.cloud.vertexai.v1.Endpoint.LabelsEntry\0224\n" - + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022A\n" - + "\017encryption_spec\030\n" - + " \001(\0132(.google.cloud.vertexai.v1.EncryptionSpec\0227\n" - + "\007network\030\r" - + " \001(\tB&\340A\001\372A \n" - + "\036compute.googleapis.com/Network\022*\n" - + "\036enable_private_service_connect\030\021 \001(\010B\002\030\001\022b\n" - + "\036private_service_connect_config\030\025 \001" - + "(\01325.google.cloud.vertexai.v1.PrivateServiceConnectConfigB\003\340A\001\022g\n" - + "\037model_deployment_monitoring_job\030\016 \001(\tB>\340A\003\372A8\n" - + "6aiplatform.googleapis.com/ModelDeploymentMonitoringJob\022n\n" - + "\'predict_request_response_logging_config\030\022 \001(\0132=.google.cloud.vertexai" - + ".v1.PredictRequestResponseLoggingConfig\022\"\n" - + "\032dedicated_endpoint_enabled\030\030 \001(\010\022#\n" - + "\026dedicated_endpoint_dns\030\031 \001(\tB\003\340A\003\022R\n" - + "\030client_connection_config\030\027" - + " \001(\01320.google.cloud.vertexai.v1.ClientConnectionConfig\022\032\n\r" - + "satisfies_pzs\030\033 \001(\010B\003\340A\003\022\032\n\r" - + "satisfies_pzi\030\034 \001(\010B\003\340A\003\022c\n" - + "\037gen_ai_advanced_features_config\030\035" - + " \001(\01325.google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfigB\003\340A\001\022$\n" - + "\034private_model_server_enabled\030\036 \001(\010\0323\n" - + "\021TrafficSplitEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\005:\0028\001\032-\n" - + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001:\265\001\352A\261\001\n" - + "\"aiplatform.googleapis.com/Endpoint\022cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\252" - + "\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\Cl" - + "oud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.vertexai.api.EncryptionSpecProto.getDescriptor(), - com.google.cloud.vertexai.api.ExplanationProto.getDescriptor(), - com.google.cloud.vertexai.api.IoProto.getDescriptor(), - com.google.cloud.vertexai.api.MachineResourcesProto.getDescriptor(), - com.google.cloud.vertexai.api.ServiceNetworkingProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_Endpoint_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_Endpoint_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Endpoint_descriptor, - new java.lang.String[] { - "Name", - "DisplayName", - "Description", - "DeployedModels", - "TrafficSplit", - "Etag", - "Labels", - "CreateTime", - "UpdateTime", - "EncryptionSpec", - "Network", - "EnablePrivateServiceConnect", - "PrivateServiceConnectConfig", - "ModelDeploymentMonitoringJob", - "PredictRequestResponseLoggingConfig", - "DedicatedEndpointEnabled", - "DedicatedEndpointDns", - "ClientConnectionConfig", - "SatisfiesPzs", - "SatisfiesPzi", - "GenAiAdvancedFeaturesConfig", - "PrivateModelServerEnabled", - }); - internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_descriptor = - internal_static_google_cloud_vertexai_v1_Endpoint_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Endpoint_TrafficSplitEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_Endpoint_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Endpoint_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_DeployedModel_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor, - new java.lang.String[] { - "DedicatedResources", - "AutomaticResources", - "SharedResources", - "Id", - "Model", - "ModelVersionId", - "DisplayName", - "CreateTime", - "ExplanationSpec", - "DisableExplanations", - "ServiceAccount", - "DisableContainerLogging", - "EnableAccessLogging", - "PrivateEndpoints", - "FasterDeploymentConfig", - "Status", - "SystemLabels", - "CheckpointId", - "SpeculativeDecodingSpec", - "PredictionResources", - }); - internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor = - internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_DeployedModel_Status_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployedModel_Status_descriptor, - new java.lang.String[] { - "Message", "LastUpdateTime", "AvailableReplicaCount", - }); - internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_DeployedModel_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployedModel_SystemLabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_PrivateEndpoints_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor, - new java.lang.String[] { - "PredictHttpUri", "ExplainHttpUri", "HealthHttpUri", "ServiceAttachment", - }); - internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor, - new java.lang.String[] { - "Enabled", "SamplingRate", "BigqueryDestination", - }); - internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ClientConnectionConfig_descriptor, - new java.lang.String[] { - "InferenceTimeout", - }); - internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor, - new java.lang.String[] { - "FastTryoutEnabled", - }); - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor, - new java.lang.String[] { - "RagConfig", - }); - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor = - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor - .getNestedType(0); - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor, - new java.lang.String[] { - "EnableRag", - }); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor, - new java.lang.String[] { - "DraftModelSpeculation", "NgramSpeculation", "SpeculativeTokenCount", "Speculation", - }); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor = - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor.getNestedType( - 0); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor, - new java.lang.String[] { - "DraftModel", - }); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor = - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor.getNestedType( - 1); - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor, - new java.lang.String[] { - "NgramSize", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.EncryptionSpecProto.getDescriptor(); - com.google.cloud.vertexai.api.ExplanationProto.getDescriptor(); - com.google.cloud.vertexai.api.IoProto.getDescriptor(); - com.google.cloud.vertexai.api.MachineResourcesProto.getDescriptor(); - com.google.cloud.vertexai.api.ServiceNetworkingProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.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); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java deleted file mode 100644 index 26d72d8be733..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class EndpointServiceProto extends com.google.protobuf.GeneratedFile { - private EndpointServiceProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EndpointServiceProto"); - } - - 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_vertexai_v1_CreateEndpointRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GetEndpointRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployModelResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UndeployModelResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_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/vertexai/v1/endpoint_serv" - + "ice.proto\022\030google.cloud.vertexai.v1\032\034goo" - + "gle/api/annotations.proto\032\027google/api/cl" - + "ient.proto\032\037google/api/field_behavior.pr" - + "oto\032\031google/api/resource.proto\032/google/c" - + "loud/vertexai/v1/deployment_stage.proto\032\'google/cloud/vertexai/v1/endpoint.proto" - + "\032(google/cloud/vertexai/v1/operation.pro" - + "to\032#google/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\"\247\001\n" - + "\025CreateEndpointRequest\0229\n" - + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" - + "!locations.googleapis.com/Location\0229\n" - + "\010endpoint\030\002" - + " \001(\0132\".google.cloud.vertexai.v1.EndpointB\003\340A\002\022\030\n" - + "\013endpoint_id\030\004 \001(\tB\003\340A\005\"\271\001\n" - + "\037CreateEndpointOperationMetadata\022L\n" - + "\020generic_metadata\030\001" - + " \001(\01322.google.cloud.vertexai.v1.GenericOperationMetadata\022H\n" - + "\020deployment_stage\030\002" - + " \001(\0162).google.cloud.vertexai.v1.DeploymentStageB\003\340A\003\"N\n" - + "\022GetEndpointRequest\0228\n" - + "\004name\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\"\335\001\n" - + "\024ListEndpointsRequest\0229\n" - + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" - + "!locations.googleapis.com/Location\022\023\n" - + "\006filter\030\002 \001(\tB\003\340A\001\022\026\n" - + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" - + "page_token\030\004 \001(\tB\003\340A\001\0222\n" - + "\tread_mask\030\005 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022\020\n" - + "\010order_by\030\006 \001(\t\"g\n" - + "\025ListEndpointsResponse\0225\n" - + "\tendpoints\030\001 \003(\0132\".google.cloud.vertexai.v1.Endpoint\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\210\001\n" - + "\025UpdateEndpointRequest\0229\n" - + "\010endpoint\030\001" - + " \001(\0132\".google.cloud.vertexai.v1.EndpointB\003\340A\002\0224\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"]\n" - + " UpdateEndpointLongRunningRequest\0229\n" - + "\010endpoint\030\001 \001(\0132\".google.cloud.vertexai.v1.EndpointB\003\340A\002\"o\n" - + "\037UpdateEndpointOperationMetadata\022L\n" - + "\020generic_metadata\030\001" - + " \001(\01322.google.cloud.vertexai.v1.GenericOperationMetadata\"Q\n" - + "\025DeleteEndpointRequest\0228\n" - + "\004name\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\"\244\002\n" - + "\022DeployModelRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022D\n" - + "\016deployed_model\030\002" - + " \001(\0132\'.google.cloud.vertexai.v1.DeployedModelB\003\340A\002\022U\n\r" - + "traffic_split\030\003 \003(\0132>." - + "google.cloud.vertexai.v1.DeployModelRequest.TrafficSplitEntry\0323\n" - + "\021TrafficSplitEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\005:\0028\001\"V\n" - + "\023DeployModelResponse\022?\n" - + "\016deployed_model\030\001 \001(" - + "\0132\'.google.cloud.vertexai.v1.DeployedModel\"\266\001\n" - + "\034DeployModelOperationMetadata\022L\n" - + "\020generic_metadata\030\001" - + " \001(\01322.google.cloud.vertexai.v1.GenericOperationMetadata\022H\n" - + "\020deployment_stage\030\002" - + " \001(\0162).google.cloud.vertexai.v1.DeploymentStageB\003\340A\003\"\202\002\n" - + "\024UndeployModelRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\036\n" - + "\021deployed_model_id\030\002 \001(\tB\003\340A\002\022W\n\r" - + "traffic_split\030\003" - + " \003(\0132@.google.cloud.vertexai.v1.UndeployModelRequest.TrafficSplitEntry\0323\n" - + "\021TrafficSplitEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\005:\0028\001\"\027\n" - + "\025UndeployModelResponse\"n\n" - + "\036UndeployModelOperationMetadata\022L\n" - + "\020generic_metadata\030\001" - + " \001(\01322.google.cloud.vertexai.v1.GenericOperationMetadata\"\326\001\n" - + "\032MutateDeployedModelRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022D\n" - + "\016deployed_model\030\002" - + " \001(\0132\'.google.cloud.vertexai.v1.DeployedModelB\003\340A\002\0224\n" - + "\013update_mask\030\004 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"^\n" - + "\033MutateDeployedModelResponse\022?\n" - + "\016deployed_model\030\001 \001(\0132\'.google.cloud.vertexai.v1.DeployedModel\"t\n" - + "$MutateDeployedModelOperationMetadata\022L\n" - + "\020generic_metadata\030\001" - + " \001(\01322.google.cloud.vertexai.v1.GenericOperationMetadata2\225\021\n" - + "\017EndpointService\022\200\002\n" - + "\016CreateEndpoint\022/.google.cloud.vertexai." - + "v1.CreateEndpointRequest\032\035.google.longrunning.Operation\"\235\001\312A+\n" - + "\010Endpoint\022\037CreateEndpointOperationMetadata\332A\017parent,endpoi" - + "nt\332A\033parent,endpoint,endpoint_id\202\323\344\223\0029\"-" - + "/v1/{parent=projects/*/locations/*}/endpoints:\010endpoint\022\235\001\n" - + "\013GetEndpoint\022,.google.cloud.vertexai.v1.GetEndpointRequest\032\"." - + "google.cloud.vertexai.v1.Endpoint\"<\332A\004na" - + "me\202\323\344\223\002/\022-/v1/{name=projects/*/locations/*/endpoints/*}\022\260\001\n\r" - + "ListEndpoints\022..google.cloud.vertexai.v1.ListEndpointsReques" - + "t\032/.google.cloud.vertexai.v1.ListEndpoin" - + "tsResponse\">\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projects/*/locations/*}/endpoints\022\306\001\n" - + "\016UpdateEndpoint\022/.google.cloud.vertexai.v1" - + ".UpdateEndpointRequest\032\".google.cloud.ve" - + "rtexai.v1.Endpoint\"_\332A\024endpoint,update_m" - + "ask\202\323\344\223\002B26/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:\010endpoint\022\372\001\n" - + "\031UpdateEndpointLongRunning\022:.google.cloud" - + ".vertexai.v1.UpdateEndpointLongRunningRe" - + "quest\032\035.google.longrunning.Operation\"\201\001\312A+\n" - + "\010Endpoint\022\037UpdateEndpointOperationMet" - + "adata\332A\010endpoint\202\323\344\223\002B\"=/v1/{endpoint.na" - + "me=projects/*/locations/*/endpoints/*}:update:\001*\022\321\001\n" - + "\016DeleteEndpoint\022/.google.clo" - + "ud.vertexai.v1.DeleteEndpointRequest\032\035.google.longrunning.Operation\"o\312A0\n" - + "\025google.protobuf.Empty\022\027DeleteOperationMetadata" - + "\332A\004name\202\323\344\223\002/*-/v1/{name=projects/*/locations/*/endpoints/*}\022\203\002\n" - + "\013DeployModel\022,.g" - + "oogle.cloud.vertexai.v1.DeployModelRequest\032\035.google.longrunning.Operation\"\246\001\312A3\n" - + "\023DeployModelResponse\022\034DeployModelOperati" - + "onMetadata\332A%endpoint,deployed_model,tra" - + "ffic_split\202\323\344\223\002B\"=/v1/{endpoint=projects" - + "/*/locations/*/endpoints/*}:deployModel:\001*\022\220\002\n\r" - + "UndeployModel\022..google.cloud.vert" - + "exai.v1.UndeployModelRequest\032\035.google.longrunning.Operation\"\257\001\312A7\n" - + "\025UndeployModelResponse\022\036UndeployModelOperationMetadata" - + "\332A(endpoint,deployed_model_id,traffic_sp" - + "lit\202\323\344\223\002D\"?/v1/{endpoint=projects/*/loca" - + "tions/*/endpoints/*}:undeployModel:\001*\022\251\002\n" - + "\023MutateDeployedModel\0224.google.cloud.ver" - + "texai.v1.MutateDeployedModelRequest\032\035.google.longrunning.Operation\"\274\001\312AC\n" - + "\033MutateDeployedModelResponse\022$MutateDeployedMod" - + "elOperationMetadata\332A#endpoint,deployed_" - + "model,update_mask\202\323\344\223\002J\"E/v1/{endpoint=p" - + "rojects/*/locations/*/endpoints/*}:mutat" - + "eDeployedModel:\001*\032M\312A\031aiplatform.googlea" - + "pis.com\322A.https://www.googleapis.com/auth/cloud-platformB\321\001\n" - + "\035com.google.cloud.vertexai.apiB\024EndpointServiceProtoP\001Z>clou" - + "d.google.com/go/aiplatform/apiv1/aiplatf" - + "ormpb;aiplatformpb\252\002\032Google.Cloud.AIPlat" - + "form.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035G" - + "oogle::Cloud::AIPlatform::V1b\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.vertexai.api.DeploymentStageProto.getDescriptor(), - com.google.cloud.vertexai.api.EndpointProto.getDescriptor(), - com.google.cloud.vertexai.api.OperationProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CreateEndpointRequest_descriptor, - new java.lang.String[] { - "Parent", "Endpoint", "EndpointId", - }); - internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CreateEndpointOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", "DeploymentStage", - }); - internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_GetEndpointRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor, - new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", "ReadMask", "OrderBy", - }); - internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor, - new java.lang.String[] { - "Endpoints", "NextPageToken", - }); - internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor, - new java.lang.String[] { - "Endpoint", "UpdateMask", - }); - internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor, - new java.lang.String[] { - "Endpoint", - }); - internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", - }); - internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeleteEndpointRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_DeployModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor, - new java.lang.String[] { - "Endpoint", "DeployedModel", "TrafficSplit", - }); - internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_descriptor = - internal_static_google_cloud_vertexai_v1_DeployModelRequest_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployModelRequest_TrafficSplitEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_DeployModelResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployModelResponse_descriptor, - new java.lang.String[] { - "DeployedModel", - }); - internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeployModelOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", "DeploymentStage", - }); - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor, - new java.lang.String[] { - "Endpoint", "DeployedModelId", "TrafficSplit", - }); - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_descriptor = - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_UndeployModelResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor = - getDescriptor().getMessageType(14); - internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", - }); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor = - getDescriptor().getMessageType(15); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor, - new java.lang.String[] { - "Endpoint", "DeployedModel", "UpdateMask", - }); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor = - getDescriptor().getMessageType(16); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor, - new java.lang.String[] { - "DeployedModel", - }); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor = - getDescriptor().getMessageType(17); - internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.DeploymentStageProto.getDescriptor(); - com.google.cloud.vertexai.api.EndpointProto.getDescriptor(); - com.google.cloud.vertexai.api.OperationProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - 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); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearch.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearch.java deleted file mode 100644 index debdbfe830c5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearch.java +++ /dev/null @@ -1,940 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool to search public web data, powered by Vertex AI Search and Sec4
- * compliance.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EnterpriseWebSearch} - */ -@com.google.protobuf.Generated -public final class EnterpriseWebSearch extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.EnterpriseWebSearch) - EnterpriseWebSearchOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EnterpriseWebSearch"); - } - - // Use EnterpriseWebSearch.newBuilder() to construct. - private EnterpriseWebSearch(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private EnterpriseWebSearch() { - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - blockingConfidence_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EnterpriseWebSearch.class, - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder.class); - } - - private int bitField0_; - public static final int EXCLUDE_DOMAINS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList excludeDomains_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { - return excludeDomains_; - } - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - public int getExcludeDomainsCount() { - return excludeDomains_.size(); - } - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - public java.lang.String getExcludeDomains(int index) { - return excludeDomains_.get(index); - } - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { - return excludeDomains_.getByteString(index); - } - - public static final int BLOCKING_CONFIDENCE_FIELD_NUMBER = 2; - private int blockingConfidence_ = 0; - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - @java.lang.Override - public boolean hasBlockingConfidence() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - @java.lang.Override - public int getBlockingConfidenceValue() { - return blockingConfidence_; - } - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence() { - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold result = - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.forNumber(blockingConfidence_); - return result == null - ? com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.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 { - for (int i = 0; i < excludeDomains_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, excludeDomains_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(2, blockingConfidence_); - } - 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 < excludeDomains_.size(); i++) { - dataSize += computeStringSizeNoTag(excludeDomains_.getRaw(i)); - } - size += dataSize; - size += 1 * getExcludeDomainsList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, blockingConfidence_); - } - 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.vertexai.api.EnterpriseWebSearch)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.EnterpriseWebSearch other = - (com.google.cloud.vertexai.api.EnterpriseWebSearch) obj; - - if (!getExcludeDomainsList().equals(other.getExcludeDomainsList())) return false; - if (hasBlockingConfidence() != other.hasBlockingConfidence()) return false; - if (hasBlockingConfidence()) { - if (blockingConfidence_ != other.blockingConfidence_) 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 (getExcludeDomainsCount() > 0) { - hash = (37 * hash) + EXCLUDE_DOMAINS_FIELD_NUMBER; - hash = (53 * hash) + getExcludeDomainsList().hashCode(); - } - if (hasBlockingConfidence()) { - hash = (37 * hash) + BLOCKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + blockingConfidence_; - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch 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.vertexai.api.EnterpriseWebSearch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch 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.vertexai.api.EnterpriseWebSearch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.EnterpriseWebSearch 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool to search public web data, powered by Vertex AI Search and Sec4
-   * compliance.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.EnterpriseWebSearch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.EnterpriseWebSearch) - com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.EnterpriseWebSearch.class, - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.EnterpriseWebSearch.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - blockingConfidence_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EnterpriseWebSearch getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EnterpriseWebSearch build() { - com.google.cloud.vertexai.api.EnterpriseWebSearch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.EnterpriseWebSearch buildPartial() { - com.google.cloud.vertexai.api.EnterpriseWebSearch result = - new com.google.cloud.vertexai.api.EnterpriseWebSearch(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.EnterpriseWebSearch result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - excludeDomains_.makeImmutable(); - result.excludeDomains_ = excludeDomains_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.blockingConfidence_ = blockingConfidence_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.EnterpriseWebSearch) { - return mergeFrom((com.google.cloud.vertexai.api.EnterpriseWebSearch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.EnterpriseWebSearch other) { - if (other == com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance()) - return this; - if (!other.excludeDomains_.isEmpty()) { - if (excludeDomains_.isEmpty()) { - excludeDomains_ = other.excludeDomains_; - bitField0_ |= 0x00000001; - } else { - ensureExcludeDomainsIsMutable(); - excludeDomains_.addAll(other.excludeDomains_); - } - onChanged(); - } - if (other.hasBlockingConfidence()) { - setBlockingConfidenceValue(other.getBlockingConfidenceValue()); - } - 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(); - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(s); - break; - } // case 10 - case 16: - { - blockingConfidence_ = input.readEnum(); - 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.protobuf.LazyStringArrayList excludeDomains_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureExcludeDomainsIsMutable() { - if (!excludeDomains_.isModifiable()) { - excludeDomains_ = new com.google.protobuf.LazyStringArrayList(excludeDomains_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { - excludeDomains_.makeImmutable(); - return excludeDomains_; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - public int getExcludeDomainsCount() { - return excludeDomains_.size(); - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - public java.lang.String getExcludeDomains(int index) { - return excludeDomains_.get(index); - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { - return excludeDomains_.getByteString(index); - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The excludeDomains to set. - * @return This builder for chaining. - */ - public Builder setExcludeDomains(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeDomainsIsMutable(); - excludeDomains_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addExcludeDomains(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addAllExcludeDomains(java.lang.Iterable values) { - ensureExcludeDomainsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeDomains_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearExcludeDomains() { - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addExcludeDomainsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int blockingConfidence_ = 0; - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - @java.lang.Override - public boolean hasBlockingConfidence() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - @java.lang.Override - public int getBlockingConfidenceValue() { - return blockingConfidence_; - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for blockingConfidence to set. - * @return This builder for chaining. - */ - public Builder setBlockingConfidenceValue(int value) { - blockingConfidence_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence() { - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold result = - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.forNumber(blockingConfidence_); - return result == null - ? com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The blockingConfidence to set. - * @return This builder for chaining. - */ - public Builder setBlockingConfidence( - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - blockingConfidence_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearBlockingConfidence() { - bitField0_ = (bitField0_ & ~0x00000002); - blockingConfidence_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.EnterpriseWebSearch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.EnterpriseWebSearch) - private static final com.google.cloud.vertexai.api.EnterpriseWebSearch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.EnterpriseWebSearch(); - } - - public static com.google.cloud.vertexai.api.EnterpriseWebSearch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnterpriseWebSearch 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.vertexai.api.EnterpriseWebSearch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearchOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearchOrBuilder.java deleted file mode 100644 index a2e6d417d2dd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EnterpriseWebSearchOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface EnterpriseWebSearchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.EnterpriseWebSearch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - java.util.List getExcludeDomainsList(); - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - int getExcludeDomainsCount(); - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - java.lang.String getExcludeDomains(int index); - - /** - * - * - *
-   * Optional. List of domains to be excluded from the search results.
-   * The default limit is 2000 domains.
-   * 
- * - * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - com.google.protobuf.ByteString getExcludeDomainsBytes(int index); - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - boolean hasBlockingConfidence(); - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - int getBlockingConfidenceValue(); - - /** - * - * - *
-   * Optional. Sites with confidence level chosen & above this value will be
-   * blocked from the search results.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java deleted file mode 100644 index 63310465a253..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java +++ /dev/null @@ -1,2710 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Example-based explainability that returns the nearest neighbors from the
- * provided dataset.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Examples} - */ -@com.google.protobuf.Generated -public final class Examples extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Examples) - ExamplesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Examples"); - } - - // Use Examples.newBuilder() to construct. - private Examples(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Examples() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Examples.class, - com.google.cloud.vertexai.api.Examples.Builder.class); - } - - public interface ExampleGcsSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Examples.ExampleGcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The format in which instances are given, if not specified, assume it's
-     * JSONL format. Currently only JSONL format is supported.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * @return The enum numeric value on the wire for dataFormat. - */ - int getDataFormatValue(); - - /** - * - * - *
-     * The format in which instances are given, if not specified, assume it's
-     * JSONL format. Currently only JSONL format is supported.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * @return The dataFormat. - */ - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat getDataFormat(); - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - com.google.cloud.vertexai.api.GcsSource getGcsSource(); - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder(); - } - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Examples.ExampleGcsSource} - */ - public static final class ExampleGcsSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Examples.ExampleGcsSource) - ExampleGcsSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExampleGcsSource"); - } - - // Use ExampleGcsSource.newBuilder() to construct. - private ExampleGcsSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExampleGcsSource() { - dataFormat_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.class, - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder.class); - } - - /** - * - * - *
-     * The format of the input example instances.
-     * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat} - */ - public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Format unspecified, used when unset.
-       * 
- * - * DATA_FORMAT_UNSPECIFIED = 0; - */ - DATA_FORMAT_UNSPECIFIED(0), - /** - * - * - *
-       * Examples are stored in JSONL files.
-       * 
- * - * JSONL = 1; - */ - JSONL(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DataFormat"); - } - - /** - * - * - *
-       * Format unspecified, used when unset.
-       * 
- * - * DATA_FORMAT_UNSPECIFIED = 0; - */ - public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-       * Examples are stored in JSONL files.
-       * 
- * - * JSONL = 1; - */ - public static final int JSONL_VALUE = 1; - - 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 DataFormat 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 DataFormat forNumber(int value) { - switch (value) { - case 0: - return DATA_FORMAT_UNSPECIFIED; - case 1: - return JSONL; - 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 DataFormat findValueByNumber(int number) { - return DataFormat.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final DataFormat[] VALUES = values(); - - public static DataFormat 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 DataFormat(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat) - } - - private int bitField0_; - public static final int DATA_FORMAT_FIELD_NUMBER = 1; - private int dataFormat_ = 0; - - /** - * - * - *
-     * The format in which instances are given, if not specified, assume it's
-     * JSONL format. Currently only JSONL format is supported.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * @return The enum numeric value on the wire for dataFormat. - */ - @java.lang.Override - public int getDataFormatValue() { - return dataFormat_; - } - - /** - * - * - *
-     * The format in which instances are given, if not specified, assume it's
-     * JSONL format. Currently only JSONL format is supported.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * @return The dataFormat. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat getDataFormat() { - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat result = - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat.forNumber(dataFormat_); - return result == null - ? com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat.UNRECOGNIZED - : result; - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.GcsSource gcsSource_; - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - /** - * - * - *
-     * The Cloud Storage location for the input instances.
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - - 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 (dataFormat_ - != com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat - .DATA_FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, dataFormat_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getGcsSource()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataFormat_ - != com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat - .DATA_FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataFormat_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGcsSource()); - } - 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.vertexai.api.Examples.ExampleGcsSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Examples.ExampleGcsSource other = - (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) obj; - - if (dataFormat_ != other.dataFormat_) return false; - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource().equals(other.getGcsSource())) 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_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + dataFormat_; - if (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource 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.vertexai.api.Examples.ExampleGcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource 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.vertexai.api.Examples.ExampleGcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Examples.ExampleGcsSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Examples.ExampleGcsSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Examples.ExampleGcsSource) - com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.class, - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Examples.ExampleGcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGcsSourceFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dataFormat_ = 0; - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource build() { - com.google.cloud.vertexai.api.Examples.ExampleGcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource buildPartial() { - com.google.cloud.vertexai.api.Examples.ExampleGcsSource result = - new com.google.cloud.vertexai.api.Examples.ExampleGcsSource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Examples.ExampleGcsSource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dataFormat_ = dataFormat_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Examples.ExampleGcsSource) { - return mergeFrom((com.google.cloud.vertexai.api.Examples.ExampleGcsSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Examples.ExampleGcsSource other) { - if (other == com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance()) - return this; - if (other.dataFormat_ != 0) { - setDataFormatValue(other.getDataFormatValue()); - } - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - 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: - { - dataFormat_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage( - internalGetGcsSourceFieldBuilder().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 dataFormat_ = 0; - - /** - * - * - *
-       * The format in which instances are given, if not specified, assume it's
-       * JSONL format. Currently only JSONL format is supported.
-       * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * - * @return The enum numeric value on the wire for dataFormat. - */ - @java.lang.Override - public int getDataFormatValue() { - return dataFormat_; - } - - /** - * - * - *
-       * The format in which instances are given, if not specified, assume it's
-       * JSONL format. Currently only JSONL format is supported.
-       * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * - * @param value The enum numeric value on the wire for dataFormat to set. - * @return This builder for chaining. - */ - public Builder setDataFormatValue(int value) { - dataFormat_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The format in which instances are given, if not specified, assume it's
-       * JSONL format. Currently only JSONL format is supported.
-       * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * - * @return The dataFormat. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat getDataFormat() { - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat result = - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat.forNumber( - dataFormat_); - return result == null - ? com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat.UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * The format in which instances are given, if not specified, assume it's
-       * JSONL format. Currently only JSONL format is supported.
-       * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * - * @param value The dataFormat to set. - * @return This builder for chaining. - */ - public Builder setDataFormat( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - dataFormat_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * The format in which instances are given, if not specified, assume it's
-       * JSONL format. Currently only JSONL format is supported.
-       * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat data_format = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearDataFormat() { - bitField0_ = (bitField0_ & ~0x00000001); - dataFormat_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - gcsSourceBuilder_; - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - } else { - gcsSourceBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && gcsSource_ != null - && gcsSource_ != com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) { - getGcsSourceBuilder().mergeFrom(value); - } else { - gcsSource_ = value; - } - } else { - gcsSourceBuilder_.mergeFrom(value); - } - if (gcsSource_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder clearGcsSource() { - bitField0_ = (bitField0_ & ~0x00000002); - gcsSource_ = null; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.dispose(); - gcsSourceBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public com.google.cloud.vertexai.api.GcsSource.Builder getGcsSourceBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null - ? com.google.cloud.vertexai.api.GcsSource.getDefaultInstance() - : gcsSource_; - } - } - - /** - * - * - *
-       * The Cloud Storage location for the input instances.
-       * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - internalGetGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder>( - getGcsSource(), getParentForChildren(), isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Examples.ExampleGcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Examples.ExampleGcsSource) - private static final com.google.cloud.vertexai.api.Examples.ExampleGcsSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Examples.ExampleGcsSource(); - } - - public static com.google.cloud.vertexai.api.Examples.ExampleGcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExampleGcsSource 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.vertexai.api.Examples.ExampleGcsSource 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 { - EXAMPLE_GCS_SOURCE(5), - 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 5: - return EXAMPLE_GCS_SOURCE; - case 0: - return SOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - private int configCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object config_; - - public enum ConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NEAREST_NEIGHBOR_SEARCH_CONFIG(2), - PRESETS(4), - CONFIG_NOT_SET(0); - private final int value; - - private ConfigCase(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 ConfigCase valueOf(int value) { - return forNumber(value); - } - - public static ConfigCase forNumber(int value) { - switch (value) { - case 2: - return NEAREST_NEIGHBOR_SEARCH_CONFIG; - case 4: - return PRESETS; - case 0: - return CONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ConfigCase getConfigCase() { - return ConfigCase.forNumber(configCase_); - } - - public static final int EXAMPLE_GCS_SOURCE_FIELD_NUMBER = 5; - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return Whether the exampleGcsSource field is set. - */ - @java.lang.Override - public boolean hasExampleGcsSource() { - return sourceCase_ == 5; - } - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return The exampleGcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource getExampleGcsSource() { - if (sourceCase_ == 5) { - return (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_; - } - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder - getExampleGcsSourceOrBuilder() { - if (sourceCase_ == 5) { - return (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_; - } - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - - public static final int NEAREST_NEIGHBOR_SEARCH_CONFIG_FIELD_NUMBER = 2; - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return Whether the nearestNeighborSearchConfig field is set. - */ - @java.lang.Override - public boolean hasNearestNeighborSearchConfig() { - return configCase_ == 2; - } - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return The nearestNeighborSearchConfig. - */ - @java.lang.Override - public com.google.protobuf.Value getNearestNeighborSearchConfig() { - if (configCase_ == 2) { - return (com.google.protobuf.Value) config_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getNearestNeighborSearchConfigOrBuilder() { - if (configCase_ == 2) { - return (com.google.protobuf.Value) config_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - - public static final int PRESETS_FIELD_NUMBER = 4; - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return Whether the presets field is set. - */ - @java.lang.Override - public boolean hasPresets() { - return configCase_ == 4; - } - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return The presets. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets getPresets() { - if (configCase_ == 4) { - return (com.google.cloud.vertexai.api.Presets) config_; - } - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PresetsOrBuilder getPresetsOrBuilder() { - if (configCase_ == 4) { - return (com.google.cloud.vertexai.api.Presets) config_; - } - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - - public static final int NEIGHBOR_COUNT_FIELD_NUMBER = 3; - private int neighborCount_ = 0; - - /** - * - * - *
-   * The number of neighbors to return when querying for examples.
-   * 
- * - * int32 neighbor_count = 3; - * - * @return The neighborCount. - */ - @java.lang.Override - public int getNeighborCount() { - return neighborCount_; - } - - 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 (configCase_ == 2) { - output.writeMessage(2, (com.google.protobuf.Value) config_); - } - if (neighborCount_ != 0) { - output.writeInt32(3, neighborCount_); - } - if (configCase_ == 4) { - output.writeMessage(4, (com.google.cloud.vertexai.api.Presets) config_); - } - if (sourceCase_ == 5) { - output.writeMessage(5, (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (configCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.protobuf.Value) config_); - } - if (neighborCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, neighborCount_); - } - if (configCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.Presets) config_); - } - if (sourceCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_); - } - 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.vertexai.api.Examples)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Examples other = (com.google.cloud.vertexai.api.Examples) obj; - - if (getNeighborCount() != other.getNeighborCount()) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 5: - if (!getExampleGcsSource().equals(other.getExampleGcsSource())) return false; - break; - case 0: - default: - } - if (!getConfigCase().equals(other.getConfigCase())) return false; - switch (configCase_) { - case 2: - if (!getNearestNeighborSearchConfig().equals(other.getNearestNeighborSearchConfig())) - return false; - break; - case 4: - if (!getPresets().equals(other.getPresets())) 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) + NEIGHBOR_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getNeighborCount(); - switch (sourceCase_) { - case 5: - hash = (37 * hash) + EXAMPLE_GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getExampleGcsSource().hashCode(); - break; - case 0: - default: - } - switch (configCase_) { - case 2: - hash = (37 * hash) + NEAREST_NEIGHBOR_SEARCH_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNearestNeighborSearchConfig().hashCode(); - break; - case 4: - hash = (37 * hash) + PRESETS_FIELD_NUMBER; - hash = (53 * hash) + getPresets().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Examples parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples 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.vertexai.api.Examples parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples 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.vertexai.api.Examples parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Examples parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Examples parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Examples parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Examples 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Example-based explainability that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Examples} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Examples) - com.google.cloud.vertexai.api.ExamplesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Examples.class, - com.google.cloud.vertexai.api.Examples.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Examples.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (exampleGcsSourceBuilder_ != null) { - exampleGcsSourceBuilder_.clear(); - } - if (nearestNeighborSearchConfigBuilder_ != null) { - nearestNeighborSearchConfigBuilder_.clear(); - } - if (presetsBuilder_ != null) { - presetsBuilder_.clear(); - } - neighborCount_ = 0; - sourceCase_ = 0; - source_ = null; - configCase_ = 0; - config_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Examples_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples build() { - com.google.cloud.vertexai.api.Examples result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Examples buildPartial() { - com.google.cloud.vertexai.api.Examples result = - new com.google.cloud.vertexai.api.Examples(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Examples result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.neighborCount_ = neighborCount_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.Examples result) { - result.sourceCase_ = sourceCase_; - result.source_ = this.source_; - if (sourceCase_ == 5 && exampleGcsSourceBuilder_ != null) { - result.source_ = exampleGcsSourceBuilder_.build(); - } - result.configCase_ = configCase_; - result.config_ = this.config_; - if (configCase_ == 2 && nearestNeighborSearchConfigBuilder_ != null) { - result.config_ = nearestNeighborSearchConfigBuilder_.build(); - } - if (configCase_ == 4 && presetsBuilder_ != null) { - result.config_ = presetsBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Examples) { - return mergeFrom((com.google.cloud.vertexai.api.Examples) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Examples other) { - if (other == com.google.cloud.vertexai.api.Examples.getDefaultInstance()) return this; - if (other.getNeighborCount() != 0) { - setNeighborCount(other.getNeighborCount()); - } - switch (other.getSourceCase()) { - case EXAMPLE_GCS_SOURCE: - { - mergeExampleGcsSource(other.getExampleGcsSource()); - break; - } - case SOURCE_NOT_SET: - { - break; - } - } - switch (other.getConfigCase()) { - case NEAREST_NEIGHBOR_SEARCH_CONFIG: - { - mergeNearestNeighborSearchConfig(other.getNearestNeighborSearchConfig()); - break; - } - case PRESETS: - { - mergePresets(other.getPresets()); - break; - } - case CONFIG_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 18: - { - input.readMessage( - internalGetNearestNeighborSearchConfigFieldBuilder().getBuilder(), - extensionRegistry); - configCase_ = 2; - break; - } // case 18 - case 24: - { - neighborCount_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 34: - { - input.readMessage(internalGetPresetsFieldBuilder().getBuilder(), extensionRegistry); - configCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetExampleGcsSourceFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 5; - 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 configCase_ = 0; - private java.lang.Object config_; - - public ConfigCase getConfigCase() { - return ConfigCase.forNumber(configCase_); - } - - public Builder clearConfig() { - configCase_ = 0; - config_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples.ExampleGcsSource, - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder, - com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder> - exampleGcsSourceBuilder_; - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return Whether the exampleGcsSource field is set. - */ - @java.lang.Override - public boolean hasExampleGcsSource() { - return sourceCase_ == 5; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return The exampleGcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource getExampleGcsSource() { - if (exampleGcsSourceBuilder_ == null) { - if (sourceCase_ == 5) { - return (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_; - } - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 5) { - return exampleGcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - public Builder setExampleGcsSource( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource value) { - if (exampleGcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - exampleGcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 5; - return this; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - public Builder setExampleGcsSource( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder builderForValue) { - if (exampleGcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - exampleGcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 5; - return this; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - public Builder mergeExampleGcsSource( - com.google.cloud.vertexai.api.Examples.ExampleGcsSource value) { - if (exampleGcsSourceBuilder_ == null) { - if (sourceCase_ == 5 - && source_ - != com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance()) { - source_ = - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.newBuilder( - (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 5) { - exampleGcsSourceBuilder_.mergeFrom(value); - } else { - exampleGcsSourceBuilder_.setMessage(value); - } - } - sourceCase_ = 5; - return this; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - public Builder clearExampleGcsSource() { - if (exampleGcsSourceBuilder_ == null) { - if (sourceCase_ == 5) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 5) { - sourceCase_ = 0; - source_ = null; - } - exampleGcsSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - public com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder - getExampleGcsSourceBuilder() { - return internalGetExampleGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder - getExampleGcsSourceOrBuilder() { - if ((sourceCase_ == 5) && (exampleGcsSourceBuilder_ != null)) { - return exampleGcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 5) { - return (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_; - } - return com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage input instances.
-     * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples.ExampleGcsSource, - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder, - com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder> - internalGetExampleGcsSourceFieldBuilder() { - if (exampleGcsSourceBuilder_ == null) { - if (!(sourceCase_ == 5)) { - source_ = com.google.cloud.vertexai.api.Examples.ExampleGcsSource.getDefaultInstance(); - } - exampleGcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples.ExampleGcsSource, - com.google.cloud.vertexai.api.Examples.ExampleGcsSource.Builder, - com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder>( - (com.google.cloud.vertexai.api.Examples.ExampleGcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 5; - onChanged(); - return exampleGcsSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - nearestNeighborSearchConfigBuilder_; - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return Whether the nearestNeighborSearchConfig field is set. - */ - @java.lang.Override - public boolean hasNearestNeighborSearchConfig() { - return configCase_ == 2; - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return The nearestNeighborSearchConfig. - */ - @java.lang.Override - public com.google.protobuf.Value getNearestNeighborSearchConfig() { - if (nearestNeighborSearchConfigBuilder_ == null) { - if (configCase_ == 2) { - return (com.google.protobuf.Value) config_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } else { - if (configCase_ == 2) { - return nearestNeighborSearchConfigBuilder_.getMessage(); - } - return com.google.protobuf.Value.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - public Builder setNearestNeighborSearchConfig(com.google.protobuf.Value value) { - if (nearestNeighborSearchConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - nearestNeighborSearchConfigBuilder_.setMessage(value); - } - configCase_ = 2; - return this; - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - public Builder setNearestNeighborSearchConfig( - com.google.protobuf.Value.Builder builderForValue) { - if (nearestNeighborSearchConfigBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - nearestNeighborSearchConfigBuilder_.setMessage(builderForValue.build()); - } - configCase_ = 2; - return this; - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - public Builder mergeNearestNeighborSearchConfig(com.google.protobuf.Value value) { - if (nearestNeighborSearchConfigBuilder_ == null) { - if (configCase_ == 2 && config_ != com.google.protobuf.Value.getDefaultInstance()) { - config_ = - com.google.protobuf.Value.newBuilder((com.google.protobuf.Value) config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - if (configCase_ == 2) { - nearestNeighborSearchConfigBuilder_.mergeFrom(value); - } else { - nearestNeighborSearchConfigBuilder_.setMessage(value); - } - } - configCase_ = 2; - return this; - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - public Builder clearNearestNeighborSearchConfig() { - if (nearestNeighborSearchConfigBuilder_ == null) { - if (configCase_ == 2) { - configCase_ = 0; - config_ = null; - onChanged(); - } - } else { - if (configCase_ == 2) { - configCase_ = 0; - config_ = null; - } - nearestNeighborSearchConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - public com.google.protobuf.Value.Builder getNearestNeighborSearchConfigBuilder() { - return internalGetNearestNeighborSearchConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getNearestNeighborSearchConfigOrBuilder() { - if ((configCase_ == 2) && (nearestNeighborSearchConfigBuilder_ != null)) { - return nearestNeighborSearchConfigBuilder_.getMessageOrBuilder(); - } else { - if (configCase_ == 2) { - return (com.google.protobuf.Value) config_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The full configuration for the generated index, the semantics are the
-     * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-     * match
-     * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-     * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetNearestNeighborSearchConfigFieldBuilder() { - if (nearestNeighborSearchConfigBuilder_ == null) { - if (!(configCase_ == 2)) { - config_ = com.google.protobuf.Value.getDefaultInstance(); - } - nearestNeighborSearchConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - (com.google.protobuf.Value) config_, getParentForChildren(), isClean()); - config_ = null; - } - configCase_ = 2; - onChanged(); - return nearestNeighborSearchConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Presets, - com.google.cloud.vertexai.api.Presets.Builder, - com.google.cloud.vertexai.api.PresetsOrBuilder> - presetsBuilder_; - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return Whether the presets field is set. - */ - @java.lang.Override - public boolean hasPresets() { - return configCase_ == 4; - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return The presets. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets getPresets() { - if (presetsBuilder_ == null) { - if (configCase_ == 4) { - return (com.google.cloud.vertexai.api.Presets) config_; - } - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } else { - if (configCase_ == 4) { - return presetsBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - public Builder setPresets(com.google.cloud.vertexai.api.Presets value) { - if (presetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - presetsBuilder_.setMessage(value); - } - configCase_ = 4; - return this; - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - public Builder setPresets(com.google.cloud.vertexai.api.Presets.Builder builderForValue) { - if (presetsBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - presetsBuilder_.setMessage(builderForValue.build()); - } - configCase_ = 4; - return this; - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - public Builder mergePresets(com.google.cloud.vertexai.api.Presets value) { - if (presetsBuilder_ == null) { - if (configCase_ == 4 - && config_ != com.google.cloud.vertexai.api.Presets.getDefaultInstance()) { - config_ = - com.google.cloud.vertexai.api.Presets.newBuilder( - (com.google.cloud.vertexai.api.Presets) config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - if (configCase_ == 4) { - presetsBuilder_.mergeFrom(value); - } else { - presetsBuilder_.setMessage(value); - } - } - configCase_ = 4; - return this; - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - public Builder clearPresets() { - if (presetsBuilder_ == null) { - if (configCase_ == 4) { - configCase_ = 0; - config_ = null; - onChanged(); - } - } else { - if (configCase_ == 4) { - configCase_ = 0; - config_ = null; - } - presetsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - public com.google.cloud.vertexai.api.Presets.Builder getPresetsBuilder() { - return internalGetPresetsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PresetsOrBuilder getPresetsOrBuilder() { - if ((configCase_ == 4) && (presetsBuilder_ != null)) { - return presetsBuilder_.getMessageOrBuilder(); - } else { - if (configCase_ == 4) { - return (com.google.cloud.vertexai.api.Presets) config_; - } - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Simplified preset configuration, which automatically sets configuration
-     * values based on the desired query speed-precision trade-off and modality.
-     * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Presets, - com.google.cloud.vertexai.api.Presets.Builder, - com.google.cloud.vertexai.api.PresetsOrBuilder> - internalGetPresetsFieldBuilder() { - if (presetsBuilder_ == null) { - if (!(configCase_ == 4)) { - config_ = com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - presetsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Presets, - com.google.cloud.vertexai.api.Presets.Builder, - com.google.cloud.vertexai.api.PresetsOrBuilder>( - (com.google.cloud.vertexai.api.Presets) config_, getParentForChildren(), isClean()); - config_ = null; - } - configCase_ = 4; - onChanged(); - return presetsBuilder_; - } - - private int neighborCount_; - - /** - * - * - *
-     * The number of neighbors to return when querying for examples.
-     * 
- * - * int32 neighbor_count = 3; - * - * @return The neighborCount. - */ - @java.lang.Override - public int getNeighborCount() { - return neighborCount_; - } - - /** - * - * - *
-     * The number of neighbors to return when querying for examples.
-     * 
- * - * int32 neighbor_count = 3; - * - * @param value The neighborCount to set. - * @return This builder for chaining. - */ - public Builder setNeighborCount(int value) { - - neighborCount_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of neighbors to return when querying for examples.
-     * 
- * - * int32 neighbor_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearNeighborCount() { - bitField0_ = (bitField0_ & ~0x00000008); - neighborCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Examples) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Examples) - private static final com.google.cloud.vertexai.api.Examples DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Examples(); - } - - public static com.google.cloud.vertexai.api.Examples getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Examples 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.vertexai.api.Examples getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java deleted file mode 100644 index cba3c79aebe0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExamplesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Examples) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return Whether the exampleGcsSource field is set. - */ - boolean hasExampleGcsSource(); - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - * - * @return The exampleGcsSource. - */ - com.google.cloud.vertexai.api.Examples.ExampleGcsSource getExampleGcsSource(); - - /** - * - * - *
-   * The Cloud Storage input instances.
-   * 
- * - * .google.cloud.vertexai.v1.Examples.ExampleGcsSource example_gcs_source = 5; - */ - com.google.cloud.vertexai.api.Examples.ExampleGcsSourceOrBuilder getExampleGcsSourceOrBuilder(); - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return Whether the nearestNeighborSearchConfig field is set. - */ - boolean hasNearestNeighborSearchConfig(); - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - * - * @return The nearestNeighborSearchConfig. - */ - com.google.protobuf.Value getNearestNeighborSearchConfig(); - - /** - * - * - *
-   * The full configuration for the generated index, the semantics are the
-   * same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
-   * match
-   * [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
-   * 
- * - * .google.protobuf.Value nearest_neighbor_search_config = 2; - */ - com.google.protobuf.ValueOrBuilder getNearestNeighborSearchConfigOrBuilder(); - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return Whether the presets field is set. - */ - boolean hasPresets(); - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - * - * @return The presets. - */ - com.google.cloud.vertexai.api.Presets getPresets(); - - /** - * - * - *
-   * Simplified preset configuration, which automatically sets configuration
-   * values based on the desired query speed-precision trade-off and modality.
-   * 
- * - * .google.cloud.vertexai.v1.Presets presets = 4; - */ - com.google.cloud.vertexai.api.PresetsOrBuilder getPresetsOrBuilder(); - - /** - * - * - *
-   * The number of neighbors to return when querying for examples.
-   * 
- * - * int32 neighbor_count = 3; - * - * @return The neighborCount. - */ - int getNeighborCount(); - - com.google.cloud.vertexai.api.Examples.SourceCase getSourceCase(); - - com.google.cloud.vertexai.api.Examples.ConfigCase getConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java deleted file mode 100644 index 0e6f02325211..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java +++ /dev/null @@ -1,1583 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Overrides for example-based explanations.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExamplesOverride} - */ -@com.google.protobuf.Generated -public final class ExamplesOverride extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExamplesOverride) - ExamplesOverrideOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExamplesOverride"); - } - - // Use ExamplesOverride.newBuilder() to construct. - private ExamplesOverride(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExamplesOverride() { - restrictions_ = java.util.Collections.emptyList(); - dataFormat_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExamplesOverride.class, - com.google.cloud.vertexai.api.ExamplesOverride.Builder.class); - } - - /** - * - * - *
-   * Data format enum.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.ExamplesOverride.DataFormat} - */ - public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified format. Must not be used.
-     * 
- * - * DATA_FORMAT_UNSPECIFIED = 0; - */ - DATA_FORMAT_UNSPECIFIED(0), - /** - * - * - *
-     * Provided data is a set of model inputs.
-     * 
- * - * INSTANCES = 1; - */ - INSTANCES(1), - /** - * - * - *
-     * Provided data is a set of embeddings.
-     * 
- * - * EMBEDDINGS = 2; - */ - EMBEDDINGS(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DataFormat"); - } - - /** - * - * - *
-     * Unspecified format. Must not be used.
-     * 
- * - * DATA_FORMAT_UNSPECIFIED = 0; - */ - public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Provided data is a set of model inputs.
-     * 
- * - * INSTANCES = 1; - */ - public static final int INSTANCES_VALUE = 1; - - /** - * - * - *
-     * Provided data is a set of embeddings.
-     * 
- * - * EMBEDDINGS = 2; - */ - public static final int EMBEDDINGS_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 DataFormat 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 DataFormat forNumber(int value) { - switch (value) { - case 0: - return DATA_FORMAT_UNSPECIFIED; - case 1: - return INSTANCES; - case 2: - return EMBEDDINGS; - 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 DataFormat findValueByNumber(int number) { - return DataFormat.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExamplesOverride.getDescriptor().getEnumTypes().get(0); - } - - private static final DataFormat[] VALUES = values(); - - public static DataFormat 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 DataFormat(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExamplesOverride.DataFormat) - } - - public static final int NEIGHBOR_COUNT_FIELD_NUMBER = 1; - private int neighborCount_ = 0; - - /** - * - * - *
-   * The number of neighbors to return.
-   * 
- * - * int32 neighbor_count = 1; - * - * @return The neighborCount. - */ - @java.lang.Override - public int getNeighborCount() { - return neighborCount_; - } - - public static final int CROWDING_COUNT_FIELD_NUMBER = 2; - private int crowdingCount_ = 0; - - /** - * - * - *
-   * The number of neighbors to return that have the same crowding tag.
-   * 
- * - * int32 crowding_count = 2; - * - * @return The crowdingCount. - */ - @java.lang.Override - public int getCrowdingCount() { - return crowdingCount_; - } - - public static final int RESTRICTIONS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List restrictions_; - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - @java.lang.Override - public java.util.List - getRestrictionsList() { - return restrictions_; - } - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder> - getRestrictionsOrBuilderList() { - return restrictions_; - } - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - @java.lang.Override - public int getRestrictionsCount() { - return restrictions_.size(); - } - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace getRestrictions(int index) { - return restrictions_.get(index); - } - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder - getRestrictionsOrBuilder(int index) { - return restrictions_.get(index); - } - - public static final int RETURN_EMBEDDINGS_FIELD_NUMBER = 4; - private boolean returnEmbeddings_ = false; - - /** - * - * - *
-   * If true, return the embeddings instead of neighbors.
-   * 
- * - * bool return_embeddings = 4; - * - * @return The returnEmbeddings. - */ - @java.lang.Override - public boolean getReturnEmbeddings() { - return returnEmbeddings_; - } - - public static final int DATA_FORMAT_FIELD_NUMBER = 5; - private int dataFormat_ = 0; - - /** - * - * - *
-   * The format of the data being provided with each call.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The enum numeric value on the wire for dataFormat. - */ - @java.lang.Override - public int getDataFormatValue() { - return dataFormat_; - } - - /** - * - * - *
-   * The format of the data being provided with each call.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The dataFormat. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride.DataFormat getDataFormat() { - com.google.cloud.vertexai.api.ExamplesOverride.DataFormat result = - com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.forNumber(dataFormat_); - return result == null - ? com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.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 (neighborCount_ != 0) { - output.writeInt32(1, neighborCount_); - } - if (crowdingCount_ != 0) { - output.writeInt32(2, crowdingCount_); - } - for (int i = 0; i < restrictions_.size(); i++) { - output.writeMessage(3, restrictions_.get(i)); - } - if (returnEmbeddings_ != false) { - output.writeBool(4, returnEmbeddings_); - } - if (dataFormat_ - != com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.DATA_FORMAT_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, dataFormat_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (neighborCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, neighborCount_); - } - if (crowdingCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, crowdingCount_); - } - for (int i = 0; i < restrictions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, restrictions_.get(i)); - } - if (returnEmbeddings_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, returnEmbeddings_); - } - if (dataFormat_ - != com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.DATA_FORMAT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, dataFormat_); - } - 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.vertexai.api.ExamplesOverride)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExamplesOverride other = - (com.google.cloud.vertexai.api.ExamplesOverride) obj; - - if (getNeighborCount() != other.getNeighborCount()) return false; - if (getCrowdingCount() != other.getCrowdingCount()) return false; - if (!getRestrictionsList().equals(other.getRestrictionsList())) return false; - if (getReturnEmbeddings() != other.getReturnEmbeddings()) return false; - if (dataFormat_ != other.dataFormat_) 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) + NEIGHBOR_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getNeighborCount(); - hash = (37 * hash) + CROWDING_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCrowdingCount(); - if (getRestrictionsCount() > 0) { - hash = (37 * hash) + RESTRICTIONS_FIELD_NUMBER; - hash = (53 * hash) + getRestrictionsList().hashCode(); - } - hash = (37 * hash) + RETURN_EMBEDDINGS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnEmbeddings()); - hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + dataFormat_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride 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.vertexai.api.ExamplesOverride parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride 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.vertexai.api.ExamplesOverride parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExamplesOverride 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Overrides for example-based explanations.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExamplesOverride} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExamplesOverride) - com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExamplesOverride.class, - com.google.cloud.vertexai.api.ExamplesOverride.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExamplesOverride.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - neighborCount_ = 0; - crowdingCount_ = 0; - if (restrictionsBuilder_ == null) { - restrictions_ = java.util.Collections.emptyList(); - } else { - restrictions_ = null; - restrictionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - returnEmbeddings_ = false; - dataFormat_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride build() { - com.google.cloud.vertexai.api.ExamplesOverride result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride buildPartial() { - com.google.cloud.vertexai.api.ExamplesOverride result = - new com.google.cloud.vertexai.api.ExamplesOverride(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.ExamplesOverride result) { - if (restrictionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - restrictions_ = java.util.Collections.unmodifiableList(restrictions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.restrictions_ = restrictions_; - } else { - result.restrictions_ = restrictionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExamplesOverride result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.neighborCount_ = neighborCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.crowdingCount_ = crowdingCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.returnEmbeddings_ = returnEmbeddings_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.dataFormat_ = dataFormat_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExamplesOverride) { - return mergeFrom((com.google.cloud.vertexai.api.ExamplesOverride) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExamplesOverride other) { - if (other == com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance()) return this; - if (other.getNeighborCount() != 0) { - setNeighborCount(other.getNeighborCount()); - } - if (other.getCrowdingCount() != 0) { - setCrowdingCount(other.getCrowdingCount()); - } - if (restrictionsBuilder_ == null) { - if (!other.restrictions_.isEmpty()) { - if (restrictions_.isEmpty()) { - restrictions_ = other.restrictions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRestrictionsIsMutable(); - restrictions_.addAll(other.restrictions_); - } - onChanged(); - } - } else { - if (!other.restrictions_.isEmpty()) { - if (restrictionsBuilder_.isEmpty()) { - restrictionsBuilder_.dispose(); - restrictionsBuilder_ = null; - restrictions_ = other.restrictions_; - bitField0_ = (bitField0_ & ~0x00000004); - restrictionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetRestrictionsFieldBuilder() - : null; - } else { - restrictionsBuilder_.addAllMessages(other.restrictions_); - } - } - } - if (other.getReturnEmbeddings() != false) { - setReturnEmbeddings(other.getReturnEmbeddings()); - } - if (other.dataFormat_ != 0) { - setDataFormatValue(other.getDataFormatValue()); - } - 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: - { - neighborCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - crowdingCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace m = - input.readMessage( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.parser(), - extensionRegistry); - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - restrictions_.add(m); - } else { - restrictionsBuilder_.addMessage(m); - } - break; - } // case 26 - case 32: - { - returnEmbeddings_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: - { - dataFormat_ = input.readEnum(); - 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 neighborCount_; - - /** - * - * - *
-     * The number of neighbors to return.
-     * 
- * - * int32 neighbor_count = 1; - * - * @return The neighborCount. - */ - @java.lang.Override - public int getNeighborCount() { - return neighborCount_; - } - - /** - * - * - *
-     * The number of neighbors to return.
-     * 
- * - * int32 neighbor_count = 1; - * - * @param value The neighborCount to set. - * @return This builder for chaining. - */ - public Builder setNeighborCount(int value) { - - neighborCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of neighbors to return.
-     * 
- * - * int32 neighbor_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearNeighborCount() { - bitField0_ = (bitField0_ & ~0x00000001); - neighborCount_ = 0; - onChanged(); - return this; - } - - private int crowdingCount_; - - /** - * - * - *
-     * The number of neighbors to return that have the same crowding tag.
-     * 
- * - * int32 crowding_count = 2; - * - * @return The crowdingCount. - */ - @java.lang.Override - public int getCrowdingCount() { - return crowdingCount_; - } - - /** - * - * - *
-     * The number of neighbors to return that have the same crowding tag.
-     * 
- * - * int32 crowding_count = 2; - * - * @param value The crowdingCount to set. - * @return This builder for chaining. - */ - public Builder setCrowdingCount(int value) { - - crowdingCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of neighbors to return that have the same crowding tag.
-     * 
- * - * int32 crowding_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearCrowdingCount() { - bitField0_ = (bitField0_ & ~0x00000002); - crowdingCount_ = 0; - onChanged(); - return this; - } - - private java.util.List - restrictions_ = java.util.Collections.emptyList(); - - private void ensureRestrictionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - restrictions_ = - new java.util.ArrayList( - restrictions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder> - restrictionsBuilder_; - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public java.util.List - getRestrictionsList() { - if (restrictionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(restrictions_); - } else { - return restrictionsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public int getRestrictionsCount() { - if (restrictionsBuilder_ == null) { - return restrictions_.size(); - } else { - return restrictionsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace getRestrictions(int index) { - if (restrictionsBuilder_ == null) { - return restrictions_.get(index); - } else { - return restrictionsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder setRestrictions( - int index, com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace value) { - if (restrictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestrictionsIsMutable(); - restrictions_.set(index, value); - onChanged(); - } else { - restrictionsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder setRestrictions( - int index, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder builderForValue) { - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - restrictions_.set(index, builderForValue.build()); - onChanged(); - } else { - restrictionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder addRestrictions( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace value) { - if (restrictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestrictionsIsMutable(); - restrictions_.add(value); - onChanged(); - } else { - restrictionsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder addRestrictions( - int index, com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace value) { - if (restrictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRestrictionsIsMutable(); - restrictions_.add(index, value); - onChanged(); - } else { - restrictionsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder addRestrictions( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder builderForValue) { - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - restrictions_.add(builderForValue.build()); - onChanged(); - } else { - restrictionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder addRestrictions( - int index, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder builderForValue) { - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - restrictions_.add(index, builderForValue.build()); - onChanged(); - } else { - restrictionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder addAllRestrictions( - java.lang.Iterable - values) { - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restrictions_); - onChanged(); - } else { - restrictionsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder clearRestrictions() { - if (restrictionsBuilder_ == null) { - restrictions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - restrictionsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public Builder removeRestrictions(int index) { - if (restrictionsBuilder_ == null) { - ensureRestrictionsIsMutable(); - restrictions_.remove(index); - onChanged(); - } else { - restrictionsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder - getRestrictionsBuilder(int index) { - return internalGetRestrictionsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder - getRestrictionsOrBuilder(int index) { - if (restrictionsBuilder_ == null) { - return restrictions_.get(index); - } else { - return restrictionsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder> - getRestrictionsOrBuilderList() { - if (restrictionsBuilder_ != null) { - return restrictionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(restrictions_); - } - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder - addRestrictionsBuilder() { - return internalGetRestrictionsFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.getDefaultInstance()); - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder - addRestrictionsBuilder(int index) { - return internalGetRestrictionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.getDefaultInstance()); - } - - /** - * - * - *
-     * Restrict the resulting nearest neighbors to respect these constraints.
-     * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - * - */ - public java.util.List - getRestrictionsBuilderList() { - return internalGetRestrictionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder> - internalGetRestrictionsFieldBuilder() { - if (restrictionsBuilder_ == null) { - restrictionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder>( - restrictions_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - restrictions_ = null; - } - return restrictionsBuilder_; - } - - private boolean returnEmbeddings_; - - /** - * - * - *
-     * If true, return the embeddings instead of neighbors.
-     * 
- * - * bool return_embeddings = 4; - * - * @return The returnEmbeddings. - */ - @java.lang.Override - public boolean getReturnEmbeddings() { - return returnEmbeddings_; - } - - /** - * - * - *
-     * If true, return the embeddings instead of neighbors.
-     * 
- * - * bool return_embeddings = 4; - * - * @param value The returnEmbeddings to set. - * @return This builder for chaining. - */ - public Builder setReturnEmbeddings(boolean value) { - - returnEmbeddings_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, return the embeddings instead of neighbors.
-     * 
- * - * bool return_embeddings = 4; - * - * @return This builder for chaining. - */ - public Builder clearReturnEmbeddings() { - bitField0_ = (bitField0_ & ~0x00000008); - returnEmbeddings_ = false; - onChanged(); - return this; - } - - private int dataFormat_ = 0; - - /** - * - * - *
-     * The format of the data being provided with each call.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The enum numeric value on the wire for dataFormat. - */ - @java.lang.Override - public int getDataFormatValue() { - return dataFormat_; - } - - /** - * - * - *
-     * The format of the data being provided with each call.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @param value The enum numeric value on the wire for dataFormat to set. - * @return This builder for chaining. - */ - public Builder setDataFormatValue(int value) { - dataFormat_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * The format of the data being provided with each call.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The dataFormat. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride.DataFormat getDataFormat() { - com.google.cloud.vertexai.api.ExamplesOverride.DataFormat result = - com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.forNumber(dataFormat_); - return result == null - ? com.google.cloud.vertexai.api.ExamplesOverride.DataFormat.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * The format of the data being provided with each call.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @param value The dataFormat to set. - * @return This builder for chaining. - */ - public Builder setDataFormat(com.google.cloud.vertexai.api.ExamplesOverride.DataFormat value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - dataFormat_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * The format of the data being provided with each call.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return This builder for chaining. - */ - public Builder clearDataFormat() { - bitField0_ = (bitField0_ & ~0x00000010); - dataFormat_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExamplesOverride) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExamplesOverride) - private static final com.google.cloud.vertexai.api.ExamplesOverride DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExamplesOverride(); - } - - public static com.google.cloud.vertexai.api.ExamplesOverride getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExamplesOverride 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.vertexai.api.ExamplesOverride getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java deleted file mode 100644 index 6f3f63c91303..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExamplesOverrideOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExamplesOverride) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The number of neighbors to return.
-   * 
- * - * int32 neighbor_count = 1; - * - * @return The neighborCount. - */ - int getNeighborCount(); - - /** - * - * - *
-   * The number of neighbors to return that have the same crowding tag.
-   * 
- * - * int32 crowding_count = 2; - * - * @return The crowdingCount. - */ - int getCrowdingCount(); - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - java.util.List getRestrictionsList(); - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace getRestrictions(int index); - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - int getRestrictionsCount(); - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - java.util.List - getRestrictionsOrBuilderList(); - - /** - * - * - *
-   * Restrict the resulting nearest neighbors to respect these constraints.
-   * 
- * - * repeated .google.cloud.vertexai.v1.ExamplesRestrictionsNamespace restrictions = 3; - */ - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder getRestrictionsOrBuilder( - int index); - - /** - * - * - *
-   * If true, return the embeddings instead of neighbors.
-   * 
- * - * bool return_embeddings = 4; - * - * @return The returnEmbeddings. - */ - boolean getReturnEmbeddings(); - - /** - * - * - *
-   * The format of the data being provided with each call.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The enum numeric value on the wire for dataFormat. - */ - int getDataFormatValue(); - - /** - * - * - *
-   * The format of the data being provided with each call.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride.DataFormat data_format = 5; - * - * @return The dataFormat. - */ - com.google.cloud.vertexai.api.ExamplesOverride.DataFormat getDataFormat(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java deleted file mode 100644 index 8aac4cd745e3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java +++ /dev/null @@ -1,1177 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Restrictions namespace for example-based explanations overrides.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExamplesRestrictionsNamespace} - */ -@com.google.protobuf.Generated -public final class ExamplesRestrictionsNamespace extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExamplesRestrictionsNamespace) - ExamplesRestrictionsNamespaceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExamplesRestrictionsNamespace"); - } - - // Use ExamplesRestrictionsNamespace.newBuilder() to construct. - private ExamplesRestrictionsNamespace(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExamplesRestrictionsNamespace() { - namespaceName_ = ""; - allow_ = com.google.protobuf.LazyStringArrayList.emptyList(); - deny_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.class, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder.class); - } - - public static final int NAMESPACE_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object namespaceName_ = ""; - - /** - * - * - *
-   * The namespace name.
-   * 
- * - * string namespace_name = 1; - * - * @return The namespaceName. - */ - @java.lang.Override - public java.lang.String getNamespaceName() { - java.lang.Object ref = namespaceName_; - 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(); - namespaceName_ = s; - return s; - } - } - - /** - * - * - *
-   * The namespace name.
-   * 
- * - * string namespace_name = 1; - * - * @return The bytes for namespaceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNamespaceNameBytes() { - java.lang.Object ref = namespaceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namespaceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ALLOW_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList allow_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @return A list containing the allow. - */ - public com.google.protobuf.ProtocolStringList getAllowList() { - return allow_; - } - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @return The count of allow. - */ - public int getAllowCount() { - return allow_.size(); - } - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @param index The index of the element to return. - * @return The allow at the given index. - */ - public java.lang.String getAllow(int index) { - return allow_.get(index); - } - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @param index The index of the value to return. - * @return The bytes of the allow at the given index. - */ - public com.google.protobuf.ByteString getAllowBytes(int index) { - return allow_.getByteString(index); - } - - public static final int DENY_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList deny_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @return A list containing the deny. - */ - public com.google.protobuf.ProtocolStringList getDenyList() { - return deny_; - } - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @return The count of deny. - */ - public int getDenyCount() { - return deny_.size(); - } - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @param index The index of the element to return. - * @return The deny at the given index. - */ - public java.lang.String getDeny(int index) { - return deny_.get(index); - } - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deny at the given index. - */ - public com.google.protobuf.ByteString getDenyBytes(int index) { - return deny_.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.GeneratedMessage.isStringEmpty(namespaceName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, namespaceName_); - } - for (int i = 0; i < allow_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, allow_.getRaw(i)); - } - for (int i = 0; i < deny_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, deny_.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.GeneratedMessage.isStringEmpty(namespaceName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, namespaceName_); - } - { - int dataSize = 0; - for (int i = 0; i < allow_.size(); i++) { - dataSize += computeStringSizeNoTag(allow_.getRaw(i)); - } - size += dataSize; - size += 1 * getAllowList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < deny_.size(); i++) { - dataSize += computeStringSizeNoTag(deny_.getRaw(i)); - } - size += dataSize; - size += 1 * getDenyList().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.vertexai.api.ExamplesRestrictionsNamespace)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace other = - (com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace) obj; - - if (!getNamespaceName().equals(other.getNamespaceName())) return false; - if (!getAllowList().equals(other.getAllowList())) return false; - if (!getDenyList().equals(other.getDenyList())) 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) + NAMESPACE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getNamespaceName().hashCode(); - if (getAllowCount() > 0) { - hash = (37 * hash) + ALLOW_FIELD_NUMBER; - hash = (53 * hash) + getAllowList().hashCode(); - } - if (getDenyCount() > 0) { - hash = (37 * hash) + DENY_FIELD_NUMBER; - hash = (53 * hash) + getDenyList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace 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.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace 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.vertexai.api.ExamplesRestrictionsNamespace parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExamplesRestrictionsNamespace 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Restrictions namespace for example-based explanations overrides.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExamplesRestrictionsNamespace} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExamplesRestrictionsNamespace) - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespaceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.class, - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - namespaceName_ = ""; - allow_ = com.google.protobuf.LazyStringArrayList.emptyList(); - deny_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace build() { - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace buildPartial() { - com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace result = - new com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.namespaceName_ = namespaceName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - allow_.makeImmutable(); - result.allow_ = allow_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - deny_.makeImmutable(); - result.deny_ = deny_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace) { - return mergeFrom((com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace other) { - if (other == com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace.getDefaultInstance()) - return this; - if (!other.getNamespaceName().isEmpty()) { - namespaceName_ = other.namespaceName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.allow_.isEmpty()) { - if (allow_.isEmpty()) { - allow_ = other.allow_; - bitField0_ |= 0x00000002; - } else { - ensureAllowIsMutable(); - allow_.addAll(other.allow_); - } - onChanged(); - } - if (!other.deny_.isEmpty()) { - if (deny_.isEmpty()) { - deny_ = other.deny_; - bitField0_ |= 0x00000004; - } else { - ensureDenyIsMutable(); - deny_.addAll(other.deny_); - } - 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: - { - namespaceName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureAllowIsMutable(); - allow_.add(s); - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDenyIsMutable(); - deny_.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 namespaceName_ = ""; - - /** - * - * - *
-     * The namespace name.
-     * 
- * - * string namespace_name = 1; - * - * @return The namespaceName. - */ - public java.lang.String getNamespaceName() { - java.lang.Object ref = namespaceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namespaceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The namespace name.
-     * 
- * - * string namespace_name = 1; - * - * @return The bytes for namespaceName. - */ - public com.google.protobuf.ByteString getNamespaceNameBytes() { - java.lang.Object ref = namespaceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namespaceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The namespace name.
-     * 
- * - * string namespace_name = 1; - * - * @param value The namespaceName to set. - * @return This builder for chaining. - */ - public Builder setNamespaceName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - namespaceName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The namespace name.
-     * 
- * - * string namespace_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearNamespaceName() { - namespaceName_ = getDefaultInstance().getNamespaceName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * The namespace name.
-     * 
- * - * string namespace_name = 1; - * - * @param value The bytes for namespaceName to set. - * @return This builder for chaining. - */ - public Builder setNamespaceNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - namespaceName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList allow_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureAllowIsMutable() { - if (!allow_.isModifiable()) { - allow_ = new com.google.protobuf.LazyStringArrayList(allow_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @return A list containing the allow. - */ - public com.google.protobuf.ProtocolStringList getAllowList() { - allow_.makeImmutable(); - return allow_; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @return The count of allow. - */ - public int getAllowCount() { - return allow_.size(); - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param index The index of the element to return. - * @return The allow at the given index. - */ - public java.lang.String getAllow(int index) { - return allow_.get(index); - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param index The index of the value to return. - * @return The bytes of the allow at the given index. - */ - public com.google.protobuf.ByteString getAllowBytes(int index) { - return allow_.getByteString(index); - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param index The index to set the value at. - * @param value The allow to set. - * @return This builder for chaining. - */ - public Builder setAllow(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAllowIsMutable(); - allow_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param value The allow to add. - * @return This builder for chaining. - */ - public Builder addAllow(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAllowIsMutable(); - allow_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param values The allow to add. - * @return This builder for chaining. - */ - public Builder addAllAllow(java.lang.Iterable values) { - ensureAllowIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allow_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @return This builder for chaining. - */ - public Builder clearAllow() { - allow_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of allowed tags.
-     * 
- * - * repeated string allow = 2; - * - * @param value The bytes of the allow to add. - * @return This builder for chaining. - */ - public Builder addAllowBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAllowIsMutable(); - allow_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList deny_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureDenyIsMutable() { - if (!deny_.isModifiable()) { - deny_ = new com.google.protobuf.LazyStringArrayList(deny_); - } - bitField0_ |= 0x00000004; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @return A list containing the deny. - */ - public com.google.protobuf.ProtocolStringList getDenyList() { - deny_.makeImmutable(); - return deny_; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @return The count of deny. - */ - public int getDenyCount() { - return deny_.size(); - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param index The index of the element to return. - * @return The deny at the given index. - */ - public java.lang.String getDeny(int index) { - return deny_.get(index); - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deny at the given index. - */ - public com.google.protobuf.ByteString getDenyBytes(int index) { - return deny_.getByteString(index); - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param index The index to set the value at. - * @param value The deny to set. - * @return This builder for chaining. - */ - public Builder setDeny(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDenyIsMutable(); - deny_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param value The deny to add. - * @return This builder for chaining. - */ - public Builder addDeny(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDenyIsMutable(); - deny_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param values The deny to add. - * @return This builder for chaining. - */ - public Builder addAllDeny(java.lang.Iterable values) { - ensureDenyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deny_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @return This builder for chaining. - */ - public Builder clearDeny() { - deny_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * The list of deny tags.
-     * 
- * - * repeated string deny = 3; - * - * @param value The bytes of the deny to add. - * @return This builder for chaining. - */ - public Builder addDenyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDenyIsMutable(); - deny_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExamplesRestrictionsNamespace) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExamplesRestrictionsNamespace) - private static final com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace(); - } - - public static com.google.cloud.vertexai.api.ExamplesRestrictionsNamespace getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExamplesRestrictionsNamespace 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.vertexai.api.ExamplesRestrictionsNamespace getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java deleted file mode 100644 index e304aab0fe3b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExamplesRestrictionsNamespaceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExamplesRestrictionsNamespace) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The namespace name.
-   * 
- * - * string namespace_name = 1; - * - * @return The namespaceName. - */ - java.lang.String getNamespaceName(); - - /** - * - * - *
-   * The namespace name.
-   * 
- * - * string namespace_name = 1; - * - * @return The bytes for namespaceName. - */ - com.google.protobuf.ByteString getNamespaceNameBytes(); - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @return A list containing the allow. - */ - java.util.List getAllowList(); - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @return The count of allow. - */ - int getAllowCount(); - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @param index The index of the element to return. - * @return The allow at the given index. - */ - java.lang.String getAllow(int index); - - /** - * - * - *
-   * The list of allowed tags.
-   * 
- * - * repeated string allow = 2; - * - * @param index The index of the value to return. - * @return The bytes of the allow at the given index. - */ - com.google.protobuf.ByteString getAllowBytes(int index); - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @return A list containing the deny. - */ - java.util.List getDenyList(); - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @return The count of deny. - */ - int getDenyCount(); - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @param index The index of the element to return. - * @return The deny at the given index. - */ - java.lang.String getDeny(int index); - - /** - * - * - *
-   * The list of deny tags.
-   * 
- * - * repeated string deny = 3; - * - * @param index The index of the value to return. - * @return The bytes of the deny at the given index. - */ - com.google.protobuf.ByteString getDenyBytes(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCode.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCode.java deleted file mode 100644 index f4d81af5f4d7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCode.java +++ /dev/null @@ -1,924 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Code generated by the model that is meant to be executed, and the result
- * returned to the model.
- *
- * Generated when using the [FunctionDeclaration] tool and
- * [FunctionCallingConfig] mode is set to [Mode.CODE].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExecutableCode} - */ -@com.google.protobuf.Generated -public final class ExecutableCode extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExecutableCode) - ExecutableCodeOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExecutableCode"); - } - - // Use ExecutableCode.newBuilder() to construct. - private ExecutableCode(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExecutableCode() { - language_ = 0; - code_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ExecutableCode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExecutableCode.class, - com.google.cloud.vertexai.api.ExecutableCode.Builder.class); - } - - /** - * - * - *
-   * Supported programming languages for the generated code.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.ExecutableCode.Language} - */ - public enum Language implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified language. This value should not be used.
-     * 
- * - * LANGUAGE_UNSPECIFIED = 0; - */ - LANGUAGE_UNSPECIFIED(0), - /** - * - * - *
-     * Python >= 3.10, with numpy and simpy available.
-     * 
- * - * PYTHON = 1; - */ - PYTHON(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Language"); - } - - /** - * - * - *
-     * Unspecified language. This value should not be used.
-     * 
- * - * LANGUAGE_UNSPECIFIED = 0; - */ - public static final int LANGUAGE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Python >= 3.10, with numpy and simpy available.
-     * 
- * - * PYTHON = 1; - */ - public static final int PYTHON_VALUE = 1; - - 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 Language 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 Language forNumber(int value) { - switch (value) { - case 0: - return LANGUAGE_UNSPECIFIED; - case 1: - return PYTHON; - 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 Language findValueByNumber(int number) { - return Language.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExecutableCode.getDescriptor().getEnumTypes().get(0); - } - - private static final Language[] VALUES = values(); - - public static Language 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 Language(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExecutableCode.Language) - } - - public static final int LANGUAGE_FIELD_NUMBER = 1; - private int language_ = 0; - - /** - * - * - *
-   * Required. Programming language of the `code`.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for language. - */ - @java.lang.Override - public int getLanguageValue() { - return language_; - } - - /** - * - * - *
-   * Required. Programming language of the `code`.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The language. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode.Language getLanguage() { - com.google.cloud.vertexai.api.ExecutableCode.Language result = - com.google.cloud.vertexai.api.ExecutableCode.Language.forNumber(language_); - return result == null - ? com.google.cloud.vertexai.api.ExecutableCode.Language.UNRECOGNIZED - : result; - } - - public static final int CODE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object code_ = ""; - - /** - * - * - *
-   * Required. The code to be executed.
-   * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The code. - */ - @java.lang.Override - public java.lang.String getCode() { - java.lang.Object ref = code_; - 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(); - code_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The code to be executed.
-   * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for code. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCodeBytes() { - java.lang.Object ref = code_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - code_ = 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 (language_ - != com.google.cloud.vertexai.api.ExecutableCode.Language.LANGUAGE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, language_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, code_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (language_ - != com.google.cloud.vertexai.api.ExecutableCode.Language.LANGUAGE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, language_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, code_); - } - 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.vertexai.api.ExecutableCode)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExecutableCode other = - (com.google.cloud.vertexai.api.ExecutableCode) obj; - - if (language_ != other.language_) return false; - if (!getCode().equals(other.getCode())) 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) + LANGUAGE_FIELD_NUMBER; - hash = (53 * hash) + language_; - hash = (37 * hash) + CODE_FIELD_NUMBER; - hash = (53 * hash) + getCode().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExecutableCode 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.vertexai.api.ExecutableCode parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExecutableCode 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.vertexai.api.ExecutableCode parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExecutableCode parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExecutableCode 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Code generated by the model that is meant to be executed, and the result
-   * returned to the model.
-   *
-   * Generated when using the [FunctionDeclaration] tool and
-   * [FunctionCallingConfig] mode is set to [Mode.CODE].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExecutableCode} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExecutableCode) - com.google.cloud.vertexai.api.ExecutableCodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ExecutableCode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExecutableCode.class, - com.google.cloud.vertexai.api.ExecutableCode.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExecutableCode.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - language_ = 0; - code_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode build() { - com.google.cloud.vertexai.api.ExecutableCode result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode buildPartial() { - com.google.cloud.vertexai.api.ExecutableCode result = - new com.google.cloud.vertexai.api.ExecutableCode(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExecutableCode result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.language_ = language_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.code_ = code_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExecutableCode) { - return mergeFrom((com.google.cloud.vertexai.api.ExecutableCode) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExecutableCode other) { - if (other == com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance()) return this; - if (other.language_ != 0) { - setLanguageValue(other.getLanguageValue()); - } - if (!other.getCode().isEmpty()) { - code_ = other.code_; - 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: - { - language_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - code_ = 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 language_ = 0; - - /** - * - * - *
-     * Required. Programming language of the `code`.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for language. - */ - @java.lang.Override - public int getLanguageValue() { - return language_; - } - - /** - * - * - *
-     * Required. Programming language of the `code`.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for language to set. - * @return This builder for chaining. - */ - public Builder setLanguageValue(int value) { - language_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Programming language of the `code`.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The language. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode.Language getLanguage() { - com.google.cloud.vertexai.api.ExecutableCode.Language result = - com.google.cloud.vertexai.api.ExecutableCode.Language.forNumber(language_); - return result == null - ? com.google.cloud.vertexai.api.ExecutableCode.Language.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Required. Programming language of the `code`.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The language to set. - * @return This builder for chaining. - */ - public Builder setLanguage(com.google.cloud.vertexai.api.ExecutableCode.Language value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - language_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Programming language of the `code`.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearLanguage() { - bitField0_ = (bitField0_ & ~0x00000001); - language_ = 0; - onChanged(); - return this; - } - - private java.lang.Object code_ = ""; - - /** - * - * - *
-     * Required. The code to be executed.
-     * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The code. - */ - public java.lang.String getCode() { - java.lang.Object ref = code_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - code_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The code to be executed.
-     * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for code. - */ - public com.google.protobuf.ByteString getCodeBytes() { - java.lang.Object ref = code_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - code_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The code to be executed.
-     * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The code to set. - * @return This builder for chaining. - */ - public Builder setCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - code_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The code to be executed.
-     * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearCode() { - code_ = getDefaultInstance().getCode(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The code to be executed.
-     * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for code to set. - * @return This builder for chaining. - */ - public Builder setCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - code_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExecutableCode) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExecutableCode) - private static final com.google.cloud.vertexai.api.ExecutableCode DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExecutableCode(); - } - - public static com.google.cloud.vertexai.api.ExecutableCode getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExecutableCode 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.vertexai.api.ExecutableCode getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCodeOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCodeOrBuilder.java deleted file mode 100644 index 7d2fc30aef6f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExecutableCodeOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExecutableCodeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExecutableCode) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Programming language of the `code`.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for language. - */ - int getLanguageValue(); - - /** - * - * - *
-   * Required. Programming language of the `code`.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode.Language language = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The language. - */ - com.google.cloud.vertexai.api.ExecutableCode.Language getLanguage(); - - /** - * - * - *
-   * Required. The code to be executed.
-   * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The code. - */ - java.lang.String getCode(); - - /** - * - * - *
-   * Required. The code to be executed.
-   * 
- * - * string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for code. - */ - com.google.protobuf.ByteString getCodeBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java deleted file mode 100644 index d6e44ad4f865..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java +++ /dev/null @@ -1,2271 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplainRequest} - */ -@com.google.protobuf.Generated -public final class ExplainRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplainRequest) - ExplainRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplainRequest"); - } - - // Use ExplainRequest.newBuilder() to construct. - private ExplainRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplainRequest() { - endpoint_ = ""; - instances_ = java.util.Collections.emptyList(); - deployedModelId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplainRequest.class, - com.google.cloud.vertexai.api.ExplainRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the explanation.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the explanation.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List instances_; - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getInstancesOrBuilderList() { - return instances_; - } - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.Value getInstances(int index) { - return instances_.get(index); - } - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - return instances_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 4; - private com.google.protobuf.Value parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.protobuf.Value getParameters() { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - - public static final int EXPLANATION_SPEC_OVERRIDE_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.ExplanationSpecOverride explanationSpecOverride_; - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return Whether the explanationSpecOverride field is set. - */ - @java.lang.Override - public boolean hasExplanationSpecOverride() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return The explanationSpecOverride. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOverride getExplanationSpecOverride() { - return explanationSpecOverride_ == null - ? com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance() - : explanationSpecOverride_; - } - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder - getExplanationSpecOverrideOrBuilder() { - return explanationSpecOverride_ == null - ? com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance() - : explanationSpecOverride_; - } - - public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-   * If specified, this ExplainRequest will be served by the chosen
-   * DeployedModel, overriding
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-   * 
- * - * string deployed_model_id = 3; - * - * @return The deployedModelId. - */ - @java.lang.Override - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - 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(); - deployedModelId_ = s; - return s; - } - } - - /** - * - * - *
-   * If specified, this ExplainRequest will be served by the chosen
-   * DeployedModel, overriding
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-   * 
- * - * string deployed_model_id = 3; - * - * @return The bytes for deployedModelId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, deployedModelId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getExplanationSpecOverride()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, deployedModelId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExplanationSpecOverride()); - } - 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.vertexai.api.ExplainRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplainRequest other = - (com.google.cloud.vertexai.api.ExplainRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInstancesList().equals(other.getInstancesList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) return false; - } - if (hasExplanationSpecOverride() != other.hasExplanationSpecOverride()) return false; - if (hasExplanationSpecOverride()) { - if (!getExplanationSpecOverride().equals(other.getExplanationSpecOverride())) return false; - } - if (!getDeployedModelId().equals(other.getDeployedModelId())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasExplanationSpecOverride()) { - hash = (37 * hash) + EXPLANATION_SPEC_OVERRIDE_FIELD_NUMBER; - hash = (53 * hash) + getExplanationSpecOverride().hashCode(); - } - hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModelId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainRequest 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.vertexai.api.ExplainRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainRequest 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.vertexai.api.ExplainRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplainRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplainRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplainRequest) - com.google.cloud.vertexai.api.ExplainRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplainRequest.class, - com.google.cloud.vertexai.api.ExplainRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplainRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInstancesFieldBuilder(); - internalGetParametersFieldBuilder(); - internalGetExplanationSpecOverrideFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - } else { - instances_ = null; - instancesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - explanationSpecOverride_ = null; - if (explanationSpecOverrideBuilder_ != null) { - explanationSpecOverrideBuilder_.dispose(); - explanationSpecOverrideBuilder_ = null; - } - deployedModelId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplainRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainRequest build() { - com.google.cloud.vertexai.api.ExplainRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainRequest buildPartial() { - com.google.cloud.vertexai.api.ExplainRequest result = - new com.google.cloud.vertexai.api.ExplainRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.ExplainRequest result) { - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplainRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.explanationSpecOverride_ = - explanationSpecOverrideBuilder_ == null - ? explanationSpecOverride_ - : explanationSpecOverrideBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.deployedModelId_ = deployedModelId_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplainRequest) { - return mergeFrom((com.google.cloud.vertexai.api.ExplainRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplainRequest other) { - if (other == com.google.cloud.vertexai.api.ExplainRequest.getDefaultInstance()) return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - instancesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInstancesFieldBuilder() - : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasExplanationSpecOverride()) { - mergeExplanationSpecOverride(other.getExplanationSpecOverride()); - } - if (!other.getDeployedModelId().isEmpty()) { - deployedModelId_ = other.deployedModelId_; - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(m); - } else { - instancesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - deployedModelId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetExplanationSpecOverrideFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the explanation.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the explanation.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the explanation.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the explanation.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the explanation.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List instances_ = - java.util.Collections.emptyList(); - - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - instancesBuilder_; - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllInstances(java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder() { - return internalGetInstancesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The instances that are the input to the explanation call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the explanation call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getInstancesBuilderList() { - return internalGetInstancesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private com.google.protobuf.Value parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return The parameters. - */ - public com.google.protobuf.Value getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public Builder setParameters(com.google.protobuf.Value value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public Builder setParameters(com.google.protobuf.Value.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public Builder mergeParameters(com.google.protobuf.Value value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.protobuf.Value.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public com.google.protobuf.Value.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.cloud.vertexai.api.ExplanationSpecOverride explanationSpecOverride_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpecOverride, - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder> - explanationSpecOverrideBuilder_; - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return Whether the explanationSpecOverride field is set. - */ - public boolean hasExplanationSpecOverride() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return The explanationSpecOverride. - */ - public com.google.cloud.vertexai.api.ExplanationSpecOverride getExplanationSpecOverride() { - if (explanationSpecOverrideBuilder_ == null) { - return explanationSpecOverride_ == null - ? com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance() - : explanationSpecOverride_; - } else { - return explanationSpecOverrideBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public Builder setExplanationSpecOverride( - com.google.cloud.vertexai.api.ExplanationSpecOverride value) { - if (explanationSpecOverrideBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - explanationSpecOverride_ = value; - } else { - explanationSpecOverrideBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public Builder setExplanationSpecOverride( - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder builderForValue) { - if (explanationSpecOverrideBuilder_ == null) { - explanationSpecOverride_ = builderForValue.build(); - } else { - explanationSpecOverrideBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public Builder mergeExplanationSpecOverride( - com.google.cloud.vertexai.api.ExplanationSpecOverride value) { - if (explanationSpecOverrideBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && explanationSpecOverride_ != null - && explanationSpecOverride_ - != com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance()) { - getExplanationSpecOverrideBuilder().mergeFrom(value); - } else { - explanationSpecOverride_ = value; - } - } else { - explanationSpecOverrideBuilder_.mergeFrom(value); - } - if (explanationSpecOverride_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public Builder clearExplanationSpecOverride() { - bitField0_ = (bitField0_ & ~0x00000008); - explanationSpecOverride_ = null; - if (explanationSpecOverrideBuilder_ != null) { - explanationSpecOverrideBuilder_.dispose(); - explanationSpecOverrideBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder - getExplanationSpecOverrideBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetExplanationSpecOverrideFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - public com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder - getExplanationSpecOverrideOrBuilder() { - if (explanationSpecOverrideBuilder_ != null) { - return explanationSpecOverrideBuilder_.getMessageOrBuilder(); - } else { - return explanationSpecOverride_ == null - ? com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance() - : explanationSpecOverride_; - } - } - - /** - * - * - *
-     * If specified, overrides the
-     * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-     * of the DeployedModel. Can be used for explaining prediction results with
-     * different configurations, such as:
-     * - Explaining top-5 predictions results as opposed to top-1;
-     * - Increasing path count or step count of the attribution methods to reduce
-     * approximate errors;
-     * - Using different baselines for explaining the prediction results.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpecOverride, - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder> - internalGetExplanationSpecOverrideFieldBuilder() { - if (explanationSpecOverrideBuilder_ == null) { - explanationSpecOverrideBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationSpecOverride, - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder, - com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder>( - getExplanationSpecOverride(), getParentForChildren(), isClean()); - explanationSpecOverride_ = null; - } - return explanationSpecOverrideBuilder_; - } - - private java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-     * If specified, this ExplainRequest will be served by the chosen
-     * DeployedModel, overriding
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-     * 
- * - * string deployed_model_id = 3; - * - * @return The deployedModelId. - */ - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deployedModelId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * If specified, this ExplainRequest will be served by the chosen
-     * DeployedModel, overriding
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-     * 
- * - * string deployed_model_id = 3; - * - * @return The bytes for deployedModelId. - */ - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * If specified, this ExplainRequest will be served by the chosen
-     * DeployedModel, overriding
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-     * 
- * - * string deployed_model_id = 3; - * - * @param value The deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - deployedModelId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * If specified, this ExplainRequest will be served by the chosen
-     * DeployedModel, overriding
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-     * 
- * - * string deployed_model_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearDeployedModelId() { - deployedModelId_ = getDefaultInstance().getDeployedModelId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * If specified, this ExplainRequest will be served by the chosen
-     * DeployedModel, overriding
-     * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-     * 
- * - * string deployed_model_id = 3; - * - * @param value The bytes for deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - deployedModelId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplainRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplainRequest) - private static final com.google.cloud.vertexai.api.ExplainRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplainRequest(); - } - - public static com.google.cloud.vertexai.api.ExplainRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplainRequest 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.vertexai.api.ExplainRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java deleted file mode 100644 index 5decda1ed0d3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplainRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplainRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the explanation.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the explanation.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getInstancesList(); - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.Value getInstances(int index); - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getInstancesCount(); - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getInstancesOrBuilderList(); - - /** - * - * - *
-   * Required. The instances that are the input to the explanation call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the explanation call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - * - * @return The parameters. - */ - com.google.protobuf.Value getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 4; - */ - com.google.protobuf.ValueOrBuilder getParametersOrBuilder(); - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return Whether the explanationSpecOverride field is set. - */ - boolean hasExplanationSpecOverride(); - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - * - * @return The explanationSpecOverride. - */ - com.google.cloud.vertexai.api.ExplanationSpecOverride getExplanationSpecOverride(); - - /** - * - * - *
-   * If specified, overrides the
-   * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
-   * of the DeployedModel. Can be used for explaining prediction results with
-   * different configurations, such as:
-   * - Explaining top-5 predictions results as opposed to top-1;
-   * - Increasing path count or step count of the attribution methods to reduce
-   * approximate errors;
-   * - Using different baselines for explaining the prediction results.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationSpecOverride explanation_spec_override = 5; - */ - com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder - getExplanationSpecOverrideOrBuilder(); - - /** - * - * - *
-   * If specified, this ExplainRequest will be served by the chosen
-   * DeployedModel, overriding
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-   * 
- * - * string deployed_model_id = 3; - * - * @return The deployedModelId. - */ - java.lang.String getDeployedModelId(); - - /** - * - * - *
-   * If specified, this ExplainRequest will be served by the chosen
-   * DeployedModel, overriding
-   * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
-   * 
- * - * string deployed_model_id = 3; - * - * @return The bytes for deployedModelId. - */ - com.google.protobuf.ByteString getDeployedModelIdBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java deleted file mode 100644 index 7d95681fa348..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java +++ /dev/null @@ -1,1780 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplainResponse} - */ -@com.google.protobuf.Generated -public final class ExplainResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplainResponse) - ExplainResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplainResponse"); - } - - // Use ExplainResponse.newBuilder() to construct. - private ExplainResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplainResponse() { - explanations_ = java.util.Collections.emptyList(); - deployedModelId_ = ""; - predictions_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplainResponse.class, - com.google.cloud.vertexai.api.ExplainResponse.Builder.class); - } - - public static final int EXPLANATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List explanations_; - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - @java.lang.Override - public java.util.List getExplanationsList() { - return explanations_; - } - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - @java.lang.Override - public java.util.List - getExplanationsOrBuilderList() { - return explanations_; - } - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - @java.lang.Override - public int getExplanationsCount() { - return explanations_.size(); - } - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Explanation getExplanations(int index) { - return explanations_.get(index); - } - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationOrBuilder getExplanationsOrBuilder(int index) { - return explanations_.get(index); - } - - public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this explanation.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - @java.lang.Override - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - 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(); - deployedModelId_ = s; - return s; - } - } - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this explanation.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREDICTIONS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List predictions_; - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - @java.lang.Override - public java.util.List getPredictionsList() { - return predictions_; - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - @java.lang.Override - public java.util.List - getPredictionsOrBuilderList() { - return predictions_; - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - @java.lang.Override - public int getPredictionsCount() { - return predictions_.size(); - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - @java.lang.Override - public com.google.protobuf.Value getPredictions(int index) { - return predictions_.get(index); - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { - return predictions_.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 < explanations_.size(); i++) { - output.writeMessage(1, explanations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, deployedModelId_); - } - for (int i = 0; i < predictions_.size(); i++) { - output.writeMessage(3, predictions_.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 < explanations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, explanations_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deployedModelId_); - } - for (int i = 0; i < predictions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, predictions_.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.vertexai.api.ExplainResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplainResponse other = - (com.google.cloud.vertexai.api.ExplainResponse) obj; - - if (!getExplanationsList().equals(other.getExplanationsList())) return false; - if (!getDeployedModelId().equals(other.getDeployedModelId())) return false; - if (!getPredictionsList().equals(other.getPredictionsList())) 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 (getExplanationsCount() > 0) { - hash = (37 * hash) + EXPLANATIONS_FIELD_NUMBER; - hash = (53 * hash) + getExplanationsList().hashCode(); - } - hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModelId().hashCode(); - if (getPredictionsCount() > 0) { - hash = (37 * hash) + PREDICTIONS_FIELD_NUMBER; - hash = (53 * hash) + getPredictionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainResponse 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.vertexai.api.ExplainResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainResponse 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.vertexai.api.ExplainResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplainResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplainResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplainResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplainResponse) - com.google.cloud.vertexai.api.ExplainResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplainResponse.class, - com.google.cloud.vertexai.api.ExplainResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplainResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (explanationsBuilder_ == null) { - explanations_ = java.util.Collections.emptyList(); - } else { - explanations_ = null; - explanationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - deployedModelId_ = ""; - if (predictionsBuilder_ == null) { - predictions_ = java.util.Collections.emptyList(); - } else { - predictions_ = null; - predictionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplainResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainResponse build() { - com.google.cloud.vertexai.api.ExplainResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplainResponse buildPartial() { - com.google.cloud.vertexai.api.ExplainResponse result = - new com.google.cloud.vertexai.api.ExplainResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.ExplainResponse result) { - if (explanationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - explanations_ = java.util.Collections.unmodifiableList(explanations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.explanations_ = explanations_; - } else { - result.explanations_ = explanationsBuilder_.build(); - } - if (predictionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - predictions_ = java.util.Collections.unmodifiableList(predictions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.predictions_ = predictions_; - } else { - result.predictions_ = predictionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplainResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployedModelId_ = deployedModelId_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplainResponse) { - return mergeFrom((com.google.cloud.vertexai.api.ExplainResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplainResponse other) { - if (other == com.google.cloud.vertexai.api.ExplainResponse.getDefaultInstance()) return this; - if (explanationsBuilder_ == null) { - if (!other.explanations_.isEmpty()) { - if (explanations_.isEmpty()) { - explanations_ = other.explanations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureExplanationsIsMutable(); - explanations_.addAll(other.explanations_); - } - onChanged(); - } - } else { - if (!other.explanations_.isEmpty()) { - if (explanationsBuilder_.isEmpty()) { - explanationsBuilder_.dispose(); - explanationsBuilder_ = null; - explanations_ = other.explanations_; - bitField0_ = (bitField0_ & ~0x00000001); - explanationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetExplanationsFieldBuilder() - : null; - } else { - explanationsBuilder_.addAllMessages(other.explanations_); - } - } - } - if (!other.getDeployedModelId().isEmpty()) { - deployedModelId_ = other.deployedModelId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (predictionsBuilder_ == null) { - if (!other.predictions_.isEmpty()) { - if (predictions_.isEmpty()) { - predictions_ = other.predictions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePredictionsIsMutable(); - predictions_.addAll(other.predictions_); - } - onChanged(); - } - } else { - if (!other.predictions_.isEmpty()) { - if (predictionsBuilder_.isEmpty()) { - predictionsBuilder_.dispose(); - predictionsBuilder_ = null; - predictions_ = other.predictions_; - bitField0_ = (bitField0_ & ~0x00000004); - predictionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPredictionsFieldBuilder() - : null; - } else { - predictionsBuilder_.addAllMessages(other.predictions_); - } - } - } - 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.vertexai.api.Explanation m = - input.readMessage( - com.google.cloud.vertexai.api.Explanation.parser(), extensionRegistry); - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - explanations_.add(m); - } else { - explanationsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - deployedModelId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(m); - } else { - predictionsBuilder_.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.util.List explanations_ = - java.util.Collections.emptyList(); - - private void ensureExplanationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - explanations_ = - new java.util.ArrayList(explanations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Explanation, - com.google.cloud.vertexai.api.Explanation.Builder, - com.google.cloud.vertexai.api.ExplanationOrBuilder> - explanationsBuilder_; - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public java.util.List getExplanationsList() { - if (explanationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(explanations_); - } else { - return explanationsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public int getExplanationsCount() { - if (explanationsBuilder_ == null) { - return explanations_.size(); - } else { - return explanationsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public com.google.cloud.vertexai.api.Explanation getExplanations(int index) { - if (explanationsBuilder_ == null) { - return explanations_.get(index); - } else { - return explanationsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder setExplanations(int index, com.google.cloud.vertexai.api.Explanation value) { - if (explanationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExplanationsIsMutable(); - explanations_.set(index, value); - onChanged(); - } else { - explanationsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder setExplanations( - int index, com.google.cloud.vertexai.api.Explanation.Builder builderForValue) { - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - explanations_.set(index, builderForValue.build()); - onChanged(); - } else { - explanationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder addExplanations(com.google.cloud.vertexai.api.Explanation value) { - if (explanationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExplanationsIsMutable(); - explanations_.add(value); - onChanged(); - } else { - explanationsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder addExplanations(int index, com.google.cloud.vertexai.api.Explanation value) { - if (explanationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExplanationsIsMutable(); - explanations_.add(index, value); - onChanged(); - } else { - explanationsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder addExplanations( - com.google.cloud.vertexai.api.Explanation.Builder builderForValue) { - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - explanations_.add(builderForValue.build()); - onChanged(); - } else { - explanationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder addExplanations( - int index, com.google.cloud.vertexai.api.Explanation.Builder builderForValue) { - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - explanations_.add(index, builderForValue.build()); - onChanged(); - } else { - explanationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder addAllExplanations( - java.lang.Iterable values) { - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, explanations_); - onChanged(); - } else { - explanationsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder clearExplanations() { - if (explanationsBuilder_ == null) { - explanations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - explanationsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public Builder removeExplanations(int index) { - if (explanationsBuilder_ == null) { - ensureExplanationsIsMutable(); - explanations_.remove(index); - onChanged(); - } else { - explanationsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public com.google.cloud.vertexai.api.Explanation.Builder getExplanationsBuilder(int index) { - return internalGetExplanationsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public com.google.cloud.vertexai.api.ExplanationOrBuilder getExplanationsOrBuilder(int index) { - if (explanationsBuilder_ == null) { - return explanations_.get(index); - } else { - return explanationsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public java.util.List - getExplanationsOrBuilderList() { - if (explanationsBuilder_ != null) { - return explanationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(explanations_); - } - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public com.google.cloud.vertexai.api.Explanation.Builder addExplanationsBuilder() { - return internalGetExplanationsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Explanation.getDefaultInstance()); - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public com.google.cloud.vertexai.api.Explanation.Builder addExplanationsBuilder(int index) { - return internalGetExplanationsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Explanation.getDefaultInstance()); - } - - /** - * - * - *
-     * The explanations of the Model's
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     *
-     * It has the same number of elements as
-     * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-     * explained.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - public java.util.List - getExplanationsBuilderList() { - return internalGetExplanationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Explanation, - com.google.cloud.vertexai.api.Explanation.Builder, - com.google.cloud.vertexai.api.ExplanationOrBuilder> - internalGetExplanationsFieldBuilder() { - if (explanationsBuilder_ == null) { - explanationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Explanation, - com.google.cloud.vertexai.api.Explanation.Builder, - com.google.cloud.vertexai.api.ExplanationOrBuilder>( - explanations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - explanations_ = null; - } - return explanationsBuilder_; - } - - private java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this explanation.
-     * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deployedModelId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this explanation.
-     * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this explanation.
-     * 
- * - * string deployed_model_id = 2; - * - * @param value The deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this explanation.
-     * 
- * - * string deployed_model_id = 2; - * - * @return This builder for chaining. - */ - public Builder clearDeployedModelId() { - deployedModelId_ = getDefaultInstance().getDeployedModelId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this explanation.
-     * 
- * - * string deployed_model_id = 2; - * - * @param value The bytes for deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List predictions_ = - java.util.Collections.emptyList(); - - private void ensurePredictionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - predictions_ = new java.util.ArrayList(predictions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - predictionsBuilder_; - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public java.util.List getPredictionsList() { - if (predictionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(predictions_); - } else { - return predictionsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public int getPredictionsCount() { - if (predictionsBuilder_ == null) { - return predictions_.size(); - } else { - return predictionsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public com.google.protobuf.Value getPredictions(int index) { - if (predictionsBuilder_ == null) { - return predictions_.get(index); - } else { - return predictionsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder setPredictions(int index, com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.set(index, value); - onChanged(); - } else { - predictionsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder setPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.set(index, builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder addPredictions(com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.add(value); - onChanged(); - } else { - predictionsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder addPredictions(int index, com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.add(index, value); - onChanged(); - } else { - predictionsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder addPredictions(com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder addPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(index, builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder addAllPredictions( - java.lang.Iterable values) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, predictions_); - onChanged(); - } else { - predictionsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder clearPredictions() { - if (predictionsBuilder_ == null) { - predictions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - predictionsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public Builder removePredictions(int index) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.remove(index); - onChanged(); - } else { - predictionsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public com.google.protobuf.Value.Builder getPredictionsBuilder(int index) { - return internalGetPredictionsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { - if (predictionsBuilder_ == null) { - return predictions_.get(index); - } else { - return predictionsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public java.util.List - getPredictionsOrBuilderList() { - if (predictionsBuilder_ != null) { - return predictionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(predictions_); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public com.google.protobuf.Value.Builder addPredictionsBuilder() { - return internalGetPredictionsFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public com.google.protobuf.Value.Builder addPredictionsBuilder(int index) { - return internalGetPredictionsFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * Same as
-     * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-     * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - public java.util.List getPredictionsBuilderList() { - return internalGetPredictionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetPredictionsFieldBuilder() { - if (predictionsBuilder_ == null) { - predictionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - predictions_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - predictions_ = null; - } - return predictionsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplainResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplainResponse) - private static final com.google.cloud.vertexai.api.ExplainResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplainResponse(); - } - - public static com.google.cloud.vertexai.api.ExplainResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplainResponse 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.vertexai.api.ExplainResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java deleted file mode 100644 index 493ed832b215..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplainResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplainResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - java.util.List getExplanationsList(); - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - com.google.cloud.vertexai.api.Explanation getExplanations(int index); - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - int getExplanationsCount(); - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - java.util.List - getExplanationsOrBuilderList(); - - /** - * - * - *
-   * The explanations of the Model's
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   *
-   * It has the same number of elements as
-   * [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
-   * explained.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Explanation explanations = 1; - */ - com.google.cloud.vertexai.api.ExplanationOrBuilder getExplanationsOrBuilder(int index); - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this explanation.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - java.lang.String getDeployedModelId(); - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this explanation.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - com.google.protobuf.ByteString getDeployedModelIdBytes(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - java.util.List getPredictionsList(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - com.google.protobuf.Value getPredictions(int index); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - int getPredictionsCount(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - java.util.List getPredictionsOrBuilderList(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * Same as
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
-   * 
- * - * repeated .google.protobuf.Value predictions = 3; - */ - com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java deleted file mode 100644 index f9356c5461fe..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java +++ /dev/null @@ -1,2197 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Explanation of a prediction (provided in
- * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions])
- * produced by the Model on a given
- * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Explanation} - */ -@com.google.protobuf.Generated -public final class Explanation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Explanation) - ExplanationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Explanation"); - } - - // Use Explanation.newBuilder() to construct. - private Explanation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Explanation() { - attributions_ = java.util.Collections.emptyList(); - neighbors_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Explanation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Explanation.class, - com.google.cloud.vertexai.api.Explanation.Builder.class); - } - - public static final int ATTRIBUTIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List attributions_; - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getAttributionsList() { - return attributions_; - } - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getAttributionsOrBuilderList() { - return attributions_; - } - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getAttributionsCount() { - return attributions_.size(); - } - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Attribution getAttributions(int index) { - return attributions_.get(index); - } - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AttributionOrBuilder getAttributionsOrBuilder(int index) { - return attributions_.get(index); - } - - public static final int NEIGHBORS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List neighbors_; - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getNeighborsList() { - return neighbors_; - } - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getNeighborsOrBuilderList() { - return neighbors_; - } - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getNeighborsCount() { - return neighbors_.size(); - } - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Neighbor getNeighbors(int index) { - return neighbors_.get(index); - } - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.NeighborOrBuilder getNeighborsOrBuilder(int index) { - return neighbors_.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 < attributions_.size(); i++) { - output.writeMessage(1, attributions_.get(i)); - } - for (int i = 0; i < neighbors_.size(); i++) { - output.writeMessage(2, neighbors_.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 < attributions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attributions_.get(i)); - } - for (int i = 0; i < neighbors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, neighbors_.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.vertexai.api.Explanation)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Explanation other = - (com.google.cloud.vertexai.api.Explanation) obj; - - if (!getAttributionsList().equals(other.getAttributionsList())) return false; - if (!getNeighborsList().equals(other.getNeighborsList())) 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 (getAttributionsCount() > 0) { - hash = (37 * hash) + ATTRIBUTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAttributionsList().hashCode(); - } - if (getNeighborsCount() > 0) { - hash = (37 * hash) + NEIGHBORS_FIELD_NUMBER; - hash = (53 * hash) + getNeighborsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Explanation 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.vertexai.api.Explanation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Explanation 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.vertexai.api.Explanation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Explanation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Explanation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Explanation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Explanation 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Explanation of a prediction (provided in
-   * [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions])
-   * produced by the Model on a given
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Explanation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Explanation) - com.google.cloud.vertexai.api.ExplanationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Explanation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Explanation.class, - com.google.cloud.vertexai.api.Explanation.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Explanation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (attributionsBuilder_ == null) { - attributions_ = java.util.Collections.emptyList(); - } else { - attributions_ = null; - attributionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (neighborsBuilder_ == null) { - neighbors_ = java.util.Collections.emptyList(); - } else { - neighbors_ = null; - neighborsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Explanation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Explanation getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Explanation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Explanation build() { - com.google.cloud.vertexai.api.Explanation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Explanation buildPartial() { - com.google.cloud.vertexai.api.Explanation result = - new com.google.cloud.vertexai.api.Explanation(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Explanation result) { - if (attributionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - attributions_ = java.util.Collections.unmodifiableList(attributions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.attributions_ = attributions_; - } else { - result.attributions_ = attributionsBuilder_.build(); - } - if (neighborsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - neighbors_ = java.util.Collections.unmodifiableList(neighbors_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.neighbors_ = neighbors_; - } else { - result.neighbors_ = neighborsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Explanation result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Explanation) { - return mergeFrom((com.google.cloud.vertexai.api.Explanation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Explanation other) { - if (other == com.google.cloud.vertexai.api.Explanation.getDefaultInstance()) return this; - if (attributionsBuilder_ == null) { - if (!other.attributions_.isEmpty()) { - if (attributions_.isEmpty()) { - attributions_ = other.attributions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAttributionsIsMutable(); - attributions_.addAll(other.attributions_); - } - onChanged(); - } - } else { - if (!other.attributions_.isEmpty()) { - if (attributionsBuilder_.isEmpty()) { - attributionsBuilder_.dispose(); - attributionsBuilder_ = null; - attributions_ = other.attributions_; - bitField0_ = (bitField0_ & ~0x00000001); - attributionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetAttributionsFieldBuilder() - : null; - } else { - attributionsBuilder_.addAllMessages(other.attributions_); - } - } - } - if (neighborsBuilder_ == null) { - if (!other.neighbors_.isEmpty()) { - if (neighbors_.isEmpty()) { - neighbors_ = other.neighbors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNeighborsIsMutable(); - neighbors_.addAll(other.neighbors_); - } - onChanged(); - } - } else { - if (!other.neighbors_.isEmpty()) { - if (neighborsBuilder_.isEmpty()) { - neighborsBuilder_.dispose(); - neighborsBuilder_ = null; - neighbors_ = other.neighbors_; - bitField0_ = (bitField0_ & ~0x00000002); - neighborsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetNeighborsFieldBuilder() - : null; - } else { - neighborsBuilder_.addAllMessages(other.neighbors_); - } - } - } - 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.vertexai.api.Attribution m = - input.readMessage( - com.google.cloud.vertexai.api.Attribution.parser(), extensionRegistry); - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - attributions_.add(m); - } else { - attributionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.Neighbor m = - input.readMessage( - com.google.cloud.vertexai.api.Neighbor.parser(), extensionRegistry); - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - neighbors_.add(m); - } else { - neighborsBuilder_.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.util.List attributions_ = - java.util.Collections.emptyList(); - - private void ensureAttributionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - attributions_ = - new java.util.ArrayList(attributions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder> - attributionsBuilder_; - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getAttributionsList() { - if (attributionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(attributions_); - } else { - return attributionsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getAttributionsCount() { - if (attributionsBuilder_ == null) { - return attributions_.size(); - } else { - return attributionsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution getAttributions(int index) { - if (attributionsBuilder_ == null) { - return attributions_.get(index); - } else { - return attributionsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setAttributions(int index, com.google.cloud.vertexai.api.Attribution value) { - if (attributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributionsIsMutable(); - attributions_.set(index, value); - onChanged(); - } else { - attributionsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setAttributions( - int index, com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - attributions_.set(index, builderForValue.build()); - onChanged(); - } else { - attributionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAttributions(com.google.cloud.vertexai.api.Attribution value) { - if (attributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributionsIsMutable(); - attributions_.add(value); - onChanged(); - } else { - attributionsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAttributions(int index, com.google.cloud.vertexai.api.Attribution value) { - if (attributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttributionsIsMutable(); - attributions_.add(index, value); - onChanged(); - } else { - attributionsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAttributions( - com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - attributions_.add(builderForValue.build()); - onChanged(); - } else { - attributionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAttributions( - int index, com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - attributions_.add(index, builderForValue.build()); - onChanged(); - } else { - attributionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllAttributions( - java.lang.Iterable values) { - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributions_); - onChanged(); - } else { - attributionsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearAttributions() { - if (attributionsBuilder_ == null) { - attributions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - attributionsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeAttributions(int index) { - if (attributionsBuilder_ == null) { - ensureAttributionsIsMutable(); - attributions_.remove(index); - onChanged(); - } else { - attributionsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder getAttributionsBuilder(int index) { - return internalGetAttributionsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.AttributionOrBuilder getAttributionsOrBuilder(int index) { - if (attributionsBuilder_ == null) { - return attributions_.get(index); - } else { - return attributionsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getAttributionsOrBuilderList() { - if (attributionsBuilder_ != null) { - return attributionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attributions_); - } - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder addAttributionsBuilder() { - return internalGetAttributionsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Attribution.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder addAttributionsBuilder(int index) { - return internalGetAttributionsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Attribution.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Feature attributions grouped by predicted outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * By default, we provide Shapley values for the predicted class. However,
-     * you can configure the explanation request to generate Shapley values for
-     * any other classes too. For example, if a model predicts a probability of
-     * `0.4` for approving a loan application, the model's decision is to reject
-     * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-     * Shapley values would be computed for rejection decision and not approval,
-     * even though the latter might be the positive class.
-     *
-     * If users set
-     * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-     * the attributions are sorted by
-     * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * in descending order. If
-     * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-     * is specified, the attributions are stored by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * in the same order as they appear in the output_indices.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getAttributionsBuilderList() { - return internalGetAttributionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder> - internalGetAttributionsFieldBuilder() { - if (attributionsBuilder_ == null) { - attributionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder>( - attributions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - attributions_ = null; - } - return attributionsBuilder_; - } - - private java.util.List neighbors_ = - java.util.Collections.emptyList(); - - private void ensureNeighborsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - neighbors_ = new java.util.ArrayList(neighbors_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Neighbor, - com.google.cloud.vertexai.api.Neighbor.Builder, - com.google.cloud.vertexai.api.NeighborOrBuilder> - neighborsBuilder_; - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getNeighborsList() { - if (neighborsBuilder_ == null) { - return java.util.Collections.unmodifiableList(neighbors_); - } else { - return neighborsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getNeighborsCount() { - if (neighborsBuilder_ == null) { - return neighbors_.size(); - } else { - return neighborsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Neighbor getNeighbors(int index) { - if (neighborsBuilder_ == null) { - return neighbors_.get(index); - } else { - return neighborsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNeighbors(int index, com.google.cloud.vertexai.api.Neighbor value) { - if (neighborsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNeighborsIsMutable(); - neighbors_.set(index, value); - onChanged(); - } else { - neighborsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNeighbors( - int index, com.google.cloud.vertexai.api.Neighbor.Builder builderForValue) { - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - neighbors_.set(index, builderForValue.build()); - onChanged(); - } else { - neighborsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNeighbors(com.google.cloud.vertexai.api.Neighbor value) { - if (neighborsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNeighborsIsMutable(); - neighbors_.add(value); - onChanged(); - } else { - neighborsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNeighbors(int index, com.google.cloud.vertexai.api.Neighbor value) { - if (neighborsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNeighborsIsMutable(); - neighbors_.add(index, value); - onChanged(); - } else { - neighborsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNeighbors(com.google.cloud.vertexai.api.Neighbor.Builder builderForValue) { - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - neighbors_.add(builderForValue.build()); - onChanged(); - } else { - neighborsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNeighbors( - int index, com.google.cloud.vertexai.api.Neighbor.Builder builderForValue) { - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - neighbors_.add(index, builderForValue.build()); - onChanged(); - } else { - neighborsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllNeighbors( - java.lang.Iterable values) { - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, neighbors_); - onChanged(); - } else { - neighborsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearNeighbors() { - if (neighborsBuilder_ == null) { - neighbors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - neighborsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeNeighbors(int index) { - if (neighborsBuilder_ == null) { - ensureNeighborsIsMutable(); - neighbors_.remove(index); - onChanged(); - } else { - neighborsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Neighbor.Builder getNeighborsBuilder(int index) { - return internalGetNeighborsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.NeighborOrBuilder getNeighborsOrBuilder(int index) { - if (neighborsBuilder_ == null) { - return neighbors_.get(index); - } else { - return neighborsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getNeighborsOrBuilderList() { - if (neighborsBuilder_ != null) { - return neighborsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(neighbors_); - } - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Neighbor.Builder addNeighborsBuilder() { - return internalGetNeighborsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Neighbor.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Neighbor.Builder addNeighborsBuilder(int index) { - return internalGetNeighborsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Neighbor.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of the nearest neighbors for example-based explanations.
-     *
-     * For models deployed with the examples explanations feature enabled, the
-     * attributions field is empty and instead the neighbors field is populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getNeighborsBuilderList() { - return internalGetNeighborsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Neighbor, - com.google.cloud.vertexai.api.Neighbor.Builder, - com.google.cloud.vertexai.api.NeighborOrBuilder> - internalGetNeighborsFieldBuilder() { - if (neighborsBuilder_ == null) { - neighborsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Neighbor, - com.google.cloud.vertexai.api.Neighbor.Builder, - com.google.cloud.vertexai.api.NeighborOrBuilder>( - neighbors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - neighbors_ = null; - } - return neighborsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Explanation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Explanation) - private static final com.google.cloud.vertexai.api.Explanation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Explanation(); - } - - public static com.google.cloud.vertexai.api.Explanation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Explanation 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.vertexai.api.Explanation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java deleted file mode 100644 index 469a1b28045e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java +++ /dev/null @@ -1,12552 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Metadata describing the Model's input and output for explanation.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata} - */ -@com.google.protobuf.Generated -public final class ExplanationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadata) - ExplanationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationMetadata"); - } - - // Use ExplanationMetadata.newBuilder() to construct. - private ExplanationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplanationMetadata() { - featureAttributionsSchemaUri_ = ""; - latentSpaceSource_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetInputs(); - case 2: - return internalGetOutputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.Builder.class); - } - - public interface InputMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - java.util.List getInputBaselinesList(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - com.google.protobuf.Value getInputBaselines(int index); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - int getInputBaselinesCount(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - java.util.List getInputBaselinesOrBuilderList(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index); - - /** - * - * - *
-     * Name of the input tensor for this feature. Required and is only
-     * applicable to Vertex AI-provided images for Tensorflow.
-     * 
- * - * string input_tensor_name = 2; - * - * @return The inputTensorName. - */ - java.lang.String getInputTensorName(); - - /** - * - * - *
-     * Name of the input tensor for this feature. Required and is only
-     * applicable to Vertex AI-provided images for Tensorflow.
-     * 
- * - * string input_tensor_name = 2; - * - * @return The bytes for inputTensorName. - */ - com.google.protobuf.ByteString getInputTensorNameBytes(); - - /** - * - * - *
-     * Defines how the feature is encoded into the input tensor. Defaults to
-     * IDENTITY.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The enum numeric value on the wire for encoding. - */ - int getEncodingValue(); - - /** - * - * - *
-     * Defines how the feature is encoded into the input tensor. Defaults to
-     * IDENTITY.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The encoding. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding getEncoding(); - - /** - * - * - *
-     * Modality of the feature. Valid values are: numeric, image. Defaults to
-     * numeric.
-     * 
- * - * string modality = 4; - * - * @return The modality. - */ - java.lang.String getModality(); - - /** - * - * - *
-     * Modality of the feature. Valid values are: numeric, image. Defaults to
-     * numeric.
-     * 
- * - * string modality = 4; - * - * @return The bytes for modality. - */ - com.google.protobuf.ByteString getModalityBytes(); - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return Whether the featureValueDomain field is set. - */ - boolean hasFeatureValueDomain(); - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return The featureValueDomain. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - getFeatureValueDomain(); - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomainOrBuilder - getFeatureValueDomainOrBuilder(); - - /** - * - * - *
-     * Specifies the index of the values of the input tensor.
-     * Required when the input tensor is a sparse representation. Refer to
-     * Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string indices_tensor_name = 6; - * - * @return The indicesTensorName. - */ - java.lang.String getIndicesTensorName(); - - /** - * - * - *
-     * Specifies the index of the values of the input tensor.
-     * Required when the input tensor is a sparse representation. Refer to
-     * Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string indices_tensor_name = 6; - * - * @return The bytes for indicesTensorName. - */ - com.google.protobuf.ByteString getIndicesTensorNameBytes(); - - /** - * - * - *
-     * Specifies the shape of the values of the input if the input is a sparse
-     * representation. Refer to Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The denseShapeTensorName. - */ - java.lang.String getDenseShapeTensorName(); - - /** - * - * - *
-     * Specifies the shape of the values of the input if the input is a sparse
-     * representation. Refer to Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The bytes for denseShapeTensorName. - */ - com.google.protobuf.ByteString getDenseShapeTensorNameBytes(); - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @return A list containing the indexFeatureMapping. - */ - java.util.List getIndexFeatureMappingList(); - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @return The count of indexFeatureMapping. - */ - int getIndexFeatureMappingCount(); - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the element to return. - * @return The indexFeatureMapping at the given index. - */ - java.lang.String getIndexFeatureMapping(int index); - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the value to return. - * @return The bytes of the indexFeatureMapping at the given index. - */ - com.google.protobuf.ByteString getIndexFeatureMappingBytes(int index); - - /** - * - * - *
-     * Encoded tensor is a transformation of the input tensor. Must be provided
-     * if choosing
-     * [Integrated Gradients
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-     * or [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-     * and the input tensor is not differentiable.
-     *
-     * An encoded tensor is generated if the input tensor is encoded by a lookup
-     * table.
-     * 
- * - * string encoded_tensor_name = 9; - * - * @return The encodedTensorName. - */ - java.lang.String getEncodedTensorName(); - - /** - * - * - *
-     * Encoded tensor is a transformation of the input tensor. Must be provided
-     * if choosing
-     * [Integrated Gradients
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-     * or [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-     * and the input tensor is not differentiable.
-     *
-     * An encoded tensor is generated if the input tensor is encoded by a lookup
-     * table.
-     * 
- * - * string encoded_tensor_name = 9; - * - * @return The bytes for encodedTensorName. - */ - com.google.protobuf.ByteString getEncodedTensorNameBytes(); - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - java.util.List getEncodedBaselinesList(); - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - com.google.protobuf.Value getEncodedBaselines(int index); - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - int getEncodedBaselinesCount(); - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - java.util.List getEncodedBaselinesOrBuilderList(); - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - com.google.protobuf.ValueOrBuilder getEncodedBaselinesOrBuilder(int index); - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return Whether the visualization field is set. - */ - boolean hasVisualization(); - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return The visualization. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getVisualization(); - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.VisualizationOrBuilder - getVisualizationOrBuilder(); - - /** - * - * - *
-     * Name of the group that the input belongs to. Features with the same group
-     * name will be treated as one feature when computing attributions. Features
-     * grouped together can have different shapes in value. If provided, there
-     * will be one single attribution generated in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-     * keyed by the group name.
-     * 
- * - * string group_name = 12; - * - * @return The groupName. - */ - java.lang.String getGroupName(); - - /** - * - * - *
-     * Name of the group that the input belongs to. Features with the same group
-     * name will be treated as one feature when computing attributions. Features
-     * grouped together can have different shapes in value. If provided, there
-     * will be one single attribution generated in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-     * keyed by the group name.
-     * 
- * - * string group_name = 12; - * - * @return The bytes for groupName. - */ - com.google.protobuf.ByteString getGroupNameBytes(); - } - - /** - * - * - *
-   * Metadata of the input of a feature.
-   *
-   * Fields other than
-   * [InputMetadata.input_baselines][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines]
-   * are applicable only for Models that are using Vertex AI-provided images for
-   * Tensorflow.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata} - */ - public static final class InputMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata) - InputMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "InputMetadata"); - } - - // Use InputMetadata.newBuilder() to construct. - private InputMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private InputMetadata() { - inputBaselines_ = java.util.Collections.emptyList(); - inputTensorName_ = ""; - encoding_ = 0; - modality_ = ""; - indicesTensorName_ = ""; - denseShapeTensorName_ = ""; - indexFeatureMapping_ = com.google.protobuf.LazyStringArrayList.emptyList(); - encodedTensorName_ = ""; - encodedBaselines_ = java.util.Collections.emptyList(); - groupName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder.class); - } - - /** - * - * - *
-     * Defines how a feature is encoded. Defaults to IDENTITY.
-     * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding} - */ - public enum Encoding implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Default value. This is the same as IDENTITY.
-       * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - ENCODING_UNSPECIFIED(0), - /** - * - * - *
-       * The tensor represents one feature.
-       * 
- * - * IDENTITY = 1; - */ - IDENTITY(1), - /** - * - * - *
-       * The tensor represents a bag of features where each index maps to
-       * a feature.
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [27, 6.0, 150]
-       * index_feature_mapping = ["age", "height", "weight"]
-       * ```
-       * 
- * - * BAG_OF_FEATURES = 2; - */ - BAG_OF_FEATURES(2), - /** - * - * - *
-       * The tensor represents a bag of features where each index maps to a
-       * feature. Zero values in the tensor indicates feature being
-       * non-existent.
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [2, 0, 5, 0, 1]
-       * index_feature_mapping = ["a", "b", "c", "d", "e"]
-       * ```
-       * 
- * - * BAG_OF_FEATURES_SPARSE = 3; - */ - BAG_OF_FEATURES_SPARSE(3), - /** - * - * - *
-       * The tensor is a list of binaries representing whether a feature exists
-       * or not (1 indicates existence).
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [1, 0, 1, 0, 1]
-       * index_feature_mapping = ["a", "b", "c", "d", "e"]
-       * ```
-       * 
- * - * INDICATOR = 4; - */ - INDICATOR(4), - /** - * - * - *
-       * The tensor is encoded into a 1-dimensional array represented by an
-       * encoded tensor.
-       * [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = ["This", "is", "a", "test", "."]
-       * encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
-       * ```
-       * 
- * - * COMBINED_EMBEDDING = 5; - */ - COMBINED_EMBEDDING(5), - /** - * - * - *
-       * Select this encoding when the input tensor is encoded into a
-       * 2-dimensional array represented by an encoded tensor.
-       * [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
-       * must be provided for this encoding. The first dimension of the encoded
-       * tensor's shape is the same as the input tensor's shape. For example:
-       * ```
-       * input = ["This", "is", "a", "test", "."]
-       * encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
-       * [0.2, 0.1, 0.4, 0.3, 0.5],
-       * [0.5, 0.1, 0.3, 0.5, 0.4],
-       * [0.5, 0.3, 0.1, 0.2, 0.4],
-       * [0.4, 0.3, 0.2, 0.5, 0.1]]
-       * ```
-       * 
- * - * CONCAT_EMBEDDING = 6; - */ - CONCAT_EMBEDDING(6), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Encoding"); - } - - /** - * - * - *
-       * Default value. This is the same as IDENTITY.
-       * 
- * - * ENCODING_UNSPECIFIED = 0; - */ - public static final int ENCODING_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-       * The tensor represents one feature.
-       * 
- * - * IDENTITY = 1; - */ - public static final int IDENTITY_VALUE = 1; - - /** - * - * - *
-       * The tensor represents a bag of features where each index maps to
-       * a feature.
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [27, 6.0, 150]
-       * index_feature_mapping = ["age", "height", "weight"]
-       * ```
-       * 
- * - * BAG_OF_FEATURES = 2; - */ - public static final int BAG_OF_FEATURES_VALUE = 2; - - /** - * - * - *
-       * The tensor represents a bag of features where each index maps to a
-       * feature. Zero values in the tensor indicates feature being
-       * non-existent.
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [2, 0, 5, 0, 1]
-       * index_feature_mapping = ["a", "b", "c", "d", "e"]
-       * ```
-       * 
- * - * BAG_OF_FEATURES_SPARSE = 3; - */ - public static final int BAG_OF_FEATURES_SPARSE_VALUE = 3; - - /** - * - * - *
-       * The tensor is a list of binaries representing whether a feature exists
-       * or not (1 indicates existence).
-       * [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = [1, 0, 1, 0, 1]
-       * index_feature_mapping = ["a", "b", "c", "d", "e"]
-       * ```
-       * 
- * - * INDICATOR = 4; - */ - public static final int INDICATOR_VALUE = 4; - - /** - * - * - *
-       * The tensor is encoded into a 1-dimensional array represented by an
-       * encoded tensor.
-       * [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
-       * must be provided for this encoding. For example:
-       * ```
-       * input = ["This", "is", "a", "test", "."]
-       * encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
-       * ```
-       * 
- * - * COMBINED_EMBEDDING = 5; - */ - public static final int COMBINED_EMBEDDING_VALUE = 5; - - /** - * - * - *
-       * Select this encoding when the input tensor is encoded into a
-       * 2-dimensional array represented by an encoded tensor.
-       * [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
-       * must be provided for this encoding. The first dimension of the encoded
-       * tensor's shape is the same as the input tensor's shape. For example:
-       * ```
-       * input = ["This", "is", "a", "test", "."]
-       * encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
-       * [0.2, 0.1, 0.4, 0.3, 0.5],
-       * [0.5, 0.1, 0.3, 0.5, 0.4],
-       * [0.5, 0.3, 0.1, 0.2, 0.4],
-       * [0.4, 0.3, 0.2, 0.5, 0.1]]
-       * ```
-       * 
- * - * CONCAT_EMBEDDING = 6; - */ - public static final int CONCAT_EMBEDDING_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 Encoding 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 Encoding forNumber(int value) { - switch (value) { - case 0: - return ENCODING_UNSPECIFIED; - case 1: - return IDENTITY; - case 2: - return BAG_OF_FEATURES; - case 3: - return BAG_OF_FEATURES_SPARSE; - case 4: - return INDICATOR; - case 5: - return COMBINED_EMBEDDING; - case 6: - return CONCAT_EMBEDDING; - 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 Encoding findValueByNumber(int number) { - return Encoding.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Encoding[] VALUES = values(); - - public static Encoding 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 Encoding(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding) - } - - public interface FeatureValueDomainOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The minimum permissible value for this feature.
-       * 
- * - * float min_value = 1; - * - * @return The minValue. - */ - float getMinValue(); - - /** - * - * - *
-       * The maximum permissible value for this feature.
-       * 
- * - * float max_value = 2; - * - * @return The maxValue. - */ - float getMaxValue(); - - /** - * - * - *
-       * If this input feature has been normalized to a mean value of 0,
-       * the original_mean specifies the mean value of the domain prior to
-       * normalization.
-       * 
- * - * float original_mean = 3; - * - * @return The originalMean. - */ - float getOriginalMean(); - - /** - * - * - *
-       * If this input feature has been normalized to a standard deviation of
-       * 1.0, the original_stddev specifies the standard deviation of the domain
-       * prior to normalization.
-       * 
- * - * float original_stddev = 4; - * - * @return The originalStddev. - */ - float getOriginalStddev(); - } - - /** - * - * - *
-     * Domain details of the input feature value. Provides numeric information
-     * about the feature, such as its range (min, max). If the feature has been
-     * pre-processed, for example with z-scoring, then it provides information
-     * about how to recover the original feature. For example, if the input
-     * feature is an image and it has been pre-processed to obtain 0-mean and
-     * stddev = 1 values, then original_mean, and original_stddev refer to the
-     * mean and stddev of the original feature (e.g. image tensor) from which
-     * input feature (with mean = 0 and stddev = 1) was obtained.
-     * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain} - */ - public static final class FeatureValueDomain extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain) - FeatureValueDomainOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FeatureValueDomain"); - } - - // Use FeatureValueDomain.newBuilder() to construct. - private FeatureValueDomain(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FeatureValueDomain() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder.class); - } - - public static final int MIN_VALUE_FIELD_NUMBER = 1; - private float minValue_ = 0F; - - /** - * - * - *
-       * The minimum permissible value for this feature.
-       * 
- * - * float min_value = 1; - * - * @return The minValue. - */ - @java.lang.Override - public float getMinValue() { - return minValue_; - } - - public static final int MAX_VALUE_FIELD_NUMBER = 2; - private float maxValue_ = 0F; - - /** - * - * - *
-       * The maximum permissible value for this feature.
-       * 
- * - * float max_value = 2; - * - * @return The maxValue. - */ - @java.lang.Override - public float getMaxValue() { - return maxValue_; - } - - public static final int ORIGINAL_MEAN_FIELD_NUMBER = 3; - private float originalMean_ = 0F; - - /** - * - * - *
-       * If this input feature has been normalized to a mean value of 0,
-       * the original_mean specifies the mean value of the domain prior to
-       * normalization.
-       * 
- * - * float original_mean = 3; - * - * @return The originalMean. - */ - @java.lang.Override - public float getOriginalMean() { - return originalMean_; - } - - public static final int ORIGINAL_STDDEV_FIELD_NUMBER = 4; - private float originalStddev_ = 0F; - - /** - * - * - *
-       * If this input feature has been normalized to a standard deviation of
-       * 1.0, the original_stddev specifies the standard deviation of the domain
-       * prior to normalization.
-       * 
- * - * float original_stddev = 4; - * - * @return The originalStddev. - */ - @java.lang.Override - public float getOriginalStddev() { - return originalStddev_; - } - - 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 (java.lang.Float.floatToRawIntBits(minValue_) != 0) { - output.writeFloat(1, minValue_); - } - if (java.lang.Float.floatToRawIntBits(maxValue_) != 0) { - output.writeFloat(2, maxValue_); - } - if (java.lang.Float.floatToRawIntBits(originalMean_) != 0) { - output.writeFloat(3, originalMean_); - } - if (java.lang.Float.floatToRawIntBits(originalStddev_) != 0) { - output.writeFloat(4, originalStddev_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(minValue_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, minValue_); - } - if (java.lang.Float.floatToRawIntBits(maxValue_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, maxValue_); - } - if (java.lang.Float.floatToRawIntBits(originalMean_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, originalMean_); - } - if (java.lang.Float.floatToRawIntBits(originalStddev_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, originalStddev_); - } - 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.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain other = - (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain) - obj; - - if (java.lang.Float.floatToIntBits(getMinValue()) - != java.lang.Float.floatToIntBits(other.getMinValue())) return false; - if (java.lang.Float.floatToIntBits(getMaxValue()) - != java.lang.Float.floatToIntBits(other.getMaxValue())) return false; - if (java.lang.Float.floatToIntBits(getOriginalMean()) - != java.lang.Float.floatToIntBits(other.getOriginalMean())) return false; - if (java.lang.Float.floatToIntBits(getOriginalStddev()) - != java.lang.Float.floatToIntBits(other.getOriginalStddev())) 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) + MIN_VALUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMinValue()); - hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMaxValue()); - hash = (37 * hash) + ORIGINAL_MEAN_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getOriginalMean()); - hash = (37 * hash) + ORIGINAL_STDDEV_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getOriginalStddev()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - 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.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - 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.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Domain details of the input feature value. Provides numeric information
-       * about the feature, such as its range (min, max). If the feature has been
-       * pre-processed, for example with z-scoring, then it provides information
-       * about how to recover the original feature. For example, if the input
-       * feature is an image and it has been pre-processed to obtain 0-mean and
-       * stddev = 1 values, then original_mean, and original_stddev refer to the
-       * mean and stddev of the original feature (e.g. image tensor) from which
-       * input feature (with mean = 0 and stddev = 1) was obtained.
-       * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain) - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - minValue_ = 0F; - maxValue_ = 0F; - originalMean_ = 0F; - originalStddev_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - build() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - result = - new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.minValue_ = minValue_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxValue_ = maxValue_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.originalMean_ = originalMean_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.originalStddev_ = originalStddev_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain) { - return mergeFrom( - (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - other) { - if (other - == com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance()) return this; - if (java.lang.Float.floatToRawIntBits(other.getMinValue()) != 0) { - setMinValue(other.getMinValue()); - } - if (java.lang.Float.floatToRawIntBits(other.getMaxValue()) != 0) { - setMaxValue(other.getMaxValue()); - } - if (java.lang.Float.floatToRawIntBits(other.getOriginalMean()) != 0) { - setOriginalMean(other.getOriginalMean()); - } - if (java.lang.Float.floatToRawIntBits(other.getOriginalStddev()) != 0) { - setOriginalStddev(other.getOriginalStddev()); - } - 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: - { - minValue_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: - { - maxValue_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: - { - originalMean_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 37: - { - originalStddev_ = input.readFloat(); - bitField0_ |= 0x00000008; - break; - } // case 37 - 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 minValue_; - - /** - * - * - *
-         * The minimum permissible value for this feature.
-         * 
- * - * float min_value = 1; - * - * @return The minValue. - */ - @java.lang.Override - public float getMinValue() { - return minValue_; - } - - /** - * - * - *
-         * The minimum permissible value for this feature.
-         * 
- * - * float min_value = 1; - * - * @param value The minValue to set. - * @return This builder for chaining. - */ - public Builder setMinValue(float value) { - - minValue_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * The minimum permissible value for this feature.
-         * 
- * - * float min_value = 1; - * - * @return This builder for chaining. - */ - public Builder clearMinValue() { - bitField0_ = (bitField0_ & ~0x00000001); - minValue_ = 0F; - onChanged(); - return this; - } - - private float maxValue_; - - /** - * - * - *
-         * The maximum permissible value for this feature.
-         * 
- * - * float max_value = 2; - * - * @return The maxValue. - */ - @java.lang.Override - public float getMaxValue() { - return maxValue_; - } - - /** - * - * - *
-         * The maximum permissible value for this feature.
-         * 
- * - * float max_value = 2; - * - * @param value The maxValue to set. - * @return This builder for chaining. - */ - public Builder setMaxValue(float value) { - - maxValue_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-         * The maximum permissible value for this feature.
-         * 
- * - * float max_value = 2; - * - * @return This builder for chaining. - */ - public Builder clearMaxValue() { - bitField0_ = (bitField0_ & ~0x00000002); - maxValue_ = 0F; - onChanged(); - return this; - } - - private float originalMean_; - - /** - * - * - *
-         * If this input feature has been normalized to a mean value of 0,
-         * the original_mean specifies the mean value of the domain prior to
-         * normalization.
-         * 
- * - * float original_mean = 3; - * - * @return The originalMean. - */ - @java.lang.Override - public float getOriginalMean() { - return originalMean_; - } - - /** - * - * - *
-         * If this input feature has been normalized to a mean value of 0,
-         * the original_mean specifies the mean value of the domain prior to
-         * normalization.
-         * 
- * - * float original_mean = 3; - * - * @param value The originalMean to set. - * @return This builder for chaining. - */ - public Builder setOriginalMean(float value) { - - originalMean_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-         * If this input feature has been normalized to a mean value of 0,
-         * the original_mean specifies the mean value of the domain prior to
-         * normalization.
-         * 
- * - * float original_mean = 3; - * - * @return This builder for chaining. - */ - public Builder clearOriginalMean() { - bitField0_ = (bitField0_ & ~0x00000004); - originalMean_ = 0F; - onChanged(); - return this; - } - - private float originalStddev_; - - /** - * - * - *
-         * If this input feature has been normalized to a standard deviation of
-         * 1.0, the original_stddev specifies the standard deviation of the domain
-         * prior to normalization.
-         * 
- * - * float original_stddev = 4; - * - * @return The originalStddev. - */ - @java.lang.Override - public float getOriginalStddev() { - return originalStddev_; - } - - /** - * - * - *
-         * If this input feature has been normalized to a standard deviation of
-         * 1.0, the original_stddev specifies the standard deviation of the domain
-         * prior to normalization.
-         * 
- * - * float original_stddev = 4; - * - * @param value The originalStddev to set. - * @return This builder for chaining. - */ - public Builder setOriginalStddev(float value) { - - originalStddev_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-         * If this input feature has been normalized to a standard deviation of
-         * 1.0, the original_stddev specifies the standard deviation of the domain
-         * prior to normalization.
-         * 
- * - * float original_stddev = 4; - * - * @return This builder for chaining. - */ - public Builder clearOriginalStddev() { - bitField0_ = (bitField0_ & ~0x00000008); - originalStddev_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain) - private static final com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FeatureValueDomain 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.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface VisualizationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Type of the image visualization. Only applicable to
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-       * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-       * attribution. Defaults to OUTLINES.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - - /** - * - * - *
-       * Type of the image visualization. Only applicable to
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-       * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-       * attribution. Defaults to OUTLINES.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The type. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type getType(); - - /** - * - * - *
-       * Whether to only highlight pixels with positive contributions, negative
-       * or both. Defaults to POSITIVE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The enum numeric value on the wire for polarity. - */ - int getPolarityValue(); - - /** - * - * - *
-       * Whether to only highlight pixels with positive contributions, negative
-       * or both. Defaults to POSITIVE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The polarity. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - getPolarity(); - - /** - * - * - *
-       * The color scheme used for the highlighted areas.
-       *
-       * Defaults to PINK_GREEN for
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-       * which shows positive attributions in green and negative in pink.
-       *
-       * Defaults to VIRIDIS for
-       * [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-       * which highlights the most influential regions in yellow and the least
-       * influential in blue.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The enum numeric value on the wire for colorMap. - */ - int getColorMapValue(); - - /** - * - * - *
-       * The color scheme used for the highlighted areas.
-       *
-       * Defaults to PINK_GREEN for
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-       * which shows positive attributions in green and negative in pink.
-       *
-       * Defaults to VIRIDIS for
-       * [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-       * which highlights the most influential regions in yellow and the least
-       * influential in blue.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The colorMap. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - getColorMap(); - - /** - * - * - *
-       * Excludes attributions above the specified percentile from the
-       * highlighted areas. Using the clip_percent_upperbound and
-       * clip_percent_lowerbound together can be useful for filtering out noise
-       * and making it easier to see areas of strong attribution. Defaults to
-       * 99.9.
-       * 
- * - * float clip_percent_upperbound = 4; - * - * @return The clipPercentUpperbound. - */ - float getClipPercentUpperbound(); - - /** - * - * - *
-       * Excludes attributions below the specified percentile, from the
-       * highlighted areas. Defaults to 62.
-       * 
- * - * float clip_percent_lowerbound = 5; - * - * @return The clipPercentLowerbound. - */ - float getClipPercentLowerbound(); - - /** - * - * - *
-       * How the original image is displayed in the visualization.
-       * Adjusting the overlay can help increase visual clarity if the original
-       * image makes it difficult to view the visualization. Defaults to NONE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The enum numeric value on the wire for overlayType. - */ - int getOverlayTypeValue(); - - /** - * - * - *
-       * How the original image is displayed in the visualization.
-       * Adjusting the overlay can help increase visual clarity if the original
-       * image makes it difficult to view the visualization. Defaults to NONE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The overlayType. - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.OverlayType - getOverlayType(); - } - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization} - */ - public static final class Visualization extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization) - VisualizationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Visualization"); - } - - // Use Visualization.newBuilder() to construct. - private Visualization(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Visualization() { - type_ = 0; - polarity_ = 0; - colorMap_ = 0; - overlayType_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Builder.class); - } - - /** - * - * - *
-       * Type of the image visualization. Only applicable to
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-       * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Should not be used.
-         * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-         * Shows which pixel contributed to the image prediction.
-         * 
- * - * PIXELS = 1; - */ - PIXELS(1), - /** - * - * - *
-         * Shows which region contributed to the image prediction by outlining
-         * the region.
-         * 
- * - * OUTLINES = 2; - */ - OUTLINES(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Type"); - } - - /** - * - * - *
-         * Should not be used.
-         * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-         * Shows which pixel contributed to the image prediction.
-         * 
- * - * PIXELS = 1; - */ - public static final int PIXELS_VALUE = 1; - - /** - * - * - *
-         * Shows which region contributed to the image prediction by outlining
-         * the region.
-         * 
- * - * OUTLINES = 2; - */ - public static final int OUTLINES_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 Type 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 Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return PIXELS; - case 2: - return OUTLINES; - 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 Type findValueByNumber(int number) { - return Type.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Type[] VALUES = values(); - - public static Type 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 Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type) - } - - /** - * - * - *
-       * Whether to only highlight pixels with positive contributions, negative
-       * or both. Defaults to POSITIVE.
-       * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity} - */ - public enum Polarity implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Default value. This is the same as POSITIVE.
-         * 
- * - * POLARITY_UNSPECIFIED = 0; - */ - POLARITY_UNSPECIFIED(0), - /** - * - * - *
-         * Highlights the pixels/outlines that were most influential to the
-         * model's prediction.
-         * 
- * - * POSITIVE = 1; - */ - POSITIVE(1), - /** - * - * - *
-         * Setting polarity to negative highlights areas that does not lead to
-         * the models's current prediction.
-         * 
- * - * NEGATIVE = 2; - */ - NEGATIVE(2), - /** - * - * - *
-         * Shows both positive and negative attributions.
-         * 
- * - * BOTH = 3; - */ - BOTH(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Polarity"); - } - - /** - * - * - *
-         * Default value. This is the same as POSITIVE.
-         * 
- * - * POLARITY_UNSPECIFIED = 0; - */ - public static final int POLARITY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-         * Highlights the pixels/outlines that were most influential to the
-         * model's prediction.
-         * 
- * - * POSITIVE = 1; - */ - public static final int POSITIVE_VALUE = 1; - - /** - * - * - *
-         * Setting polarity to negative highlights areas that does not lead to
-         * the models's current prediction.
-         * 
- * - * NEGATIVE = 2; - */ - public static final int NEGATIVE_VALUE = 2; - - /** - * - * - *
-         * Shows both positive and negative attributions.
-         * 
- * - * BOTH = 3; - */ - public static final int BOTH_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 Polarity 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 Polarity forNumber(int value) { - switch (value) { - case 0: - return POLARITY_UNSPECIFIED; - case 1: - return POSITIVE; - case 2: - return NEGATIVE; - case 3: - return BOTH; - 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 Polarity findValueByNumber(int number) { - return Polarity.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDescriptor() - .getEnumTypes() - .get(1); - } - - private static final Polarity[] VALUES = values(); - - public static Polarity 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 Polarity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity) - } - - /** - * - * - *
-       * The color scheme used for highlighting areas.
-       * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap} - */ - public enum ColorMap implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Should not be used.
-         * 
- * - * COLOR_MAP_UNSPECIFIED = 0; - */ - COLOR_MAP_UNSPECIFIED(0), - /** - * - * - *
-         * Positive: green. Negative: pink.
-         * 
- * - * PINK_GREEN = 1; - */ - PINK_GREEN(1), - /** - * - * - *
-         * Viridis color map: A perceptually uniform color mapping which is
-         * easier to see by those with colorblindness and progresses from yellow
-         * to green to blue. Positive: yellow. Negative: blue.
-         * 
- * - * VIRIDIS = 2; - */ - VIRIDIS(2), - /** - * - * - *
-         * Positive: red. Negative: red.
-         * 
- * - * RED = 3; - */ - RED(3), - /** - * - * - *
-         * Positive: green. Negative: green.
-         * 
- * - * GREEN = 4; - */ - GREEN(4), - /** - * - * - *
-         * Positive: green. Negative: red.
-         * 
- * - * RED_GREEN = 6; - */ - RED_GREEN(6), - /** - * - * - *
-         * PiYG palette.
-         * 
- * - * PINK_WHITE_GREEN = 5; - */ - PINK_WHITE_GREEN(5), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ColorMap"); - } - - /** - * - * - *
-         * Should not be used.
-         * 
- * - * COLOR_MAP_UNSPECIFIED = 0; - */ - public static final int COLOR_MAP_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-         * Positive: green. Negative: pink.
-         * 
- * - * PINK_GREEN = 1; - */ - public static final int PINK_GREEN_VALUE = 1; - - /** - * - * - *
-         * Viridis color map: A perceptually uniform color mapping which is
-         * easier to see by those with colorblindness and progresses from yellow
-         * to green to blue. Positive: yellow. Negative: blue.
-         * 
- * - * VIRIDIS = 2; - */ - public static final int VIRIDIS_VALUE = 2; - - /** - * - * - *
-         * Positive: red. Negative: red.
-         * 
- * - * RED = 3; - */ - public static final int RED_VALUE = 3; - - /** - * - * - *
-         * Positive: green. Negative: green.
-         * 
- * - * GREEN = 4; - */ - public static final int GREEN_VALUE = 4; - - /** - * - * - *
-         * Positive: green. Negative: red.
-         * 
- * - * RED_GREEN = 6; - */ - public static final int RED_GREEN_VALUE = 6; - - /** - * - * - *
-         * PiYG palette.
-         * 
- * - * PINK_WHITE_GREEN = 5; - */ - public static final int PINK_WHITE_GREEN_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 ColorMap 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 ColorMap forNumber(int value) { - switch (value) { - case 0: - return COLOR_MAP_UNSPECIFIED; - case 1: - return PINK_GREEN; - case 2: - return VIRIDIS; - case 3: - return RED; - case 4: - return GREEN; - case 6: - return RED_GREEN; - case 5: - return PINK_WHITE_GREEN; - 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 ColorMap findValueByNumber(int number) { - return ColorMap.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDescriptor() - .getEnumTypes() - .get(2); - } - - private static final ColorMap[] VALUES = values(); - - public static ColorMap 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 ColorMap(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap) - } - - /** - * - * - *
-       * How the original image is displayed in the visualization.
-       * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType} - */ - public enum OverlayType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Default value. This is the same as NONE.
-         * 
- * - * OVERLAY_TYPE_UNSPECIFIED = 0; - */ - OVERLAY_TYPE_UNSPECIFIED(0), - /** - * - * - *
-         * No overlay.
-         * 
- * - * NONE = 1; - */ - NONE(1), - /** - * - * - *
-         * The attributions are shown on top of the original image.
-         * 
- * - * ORIGINAL = 2; - */ - ORIGINAL(2), - /** - * - * - *
-         * The attributions are shown on top of grayscaled version of the
-         * original image.
-         * 
- * - * GRAYSCALE = 3; - */ - GRAYSCALE(3), - /** - * - * - *
-         * The attributions are used as a mask to reveal predictive parts of
-         * the image and hide the un-predictive parts.
-         * 
- * - * MASK_BLACK = 4; - */ - MASK_BLACK(4), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "OverlayType"); - } - - /** - * - * - *
-         * Default value. This is the same as NONE.
-         * 
- * - * OVERLAY_TYPE_UNSPECIFIED = 0; - */ - public static final int OVERLAY_TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-         * No overlay.
-         * 
- * - * NONE = 1; - */ - public static final int NONE_VALUE = 1; - - /** - * - * - *
-         * The attributions are shown on top of the original image.
-         * 
- * - * ORIGINAL = 2; - */ - public static final int ORIGINAL_VALUE = 2; - - /** - * - * - *
-         * The attributions are shown on top of grayscaled version of the
-         * original image.
-         * 
- * - * GRAYSCALE = 3; - */ - public static final int GRAYSCALE_VALUE = 3; - - /** - * - * - *
-         * The attributions are used as a mask to reveal predictive parts of
-         * the image and hide the un-predictive parts.
-         * 
- * - * MASK_BLACK = 4; - */ - public static final int MASK_BLACK_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 OverlayType 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 OverlayType forNumber(int value) { - switch (value) { - case 0: - return OVERLAY_TYPE_UNSPECIFIED; - case 1: - return NONE; - case 2: - return ORIGINAL; - case 3: - return GRAYSCALE; - case 4: - return MASK_BLACK; - 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 OverlayType findValueByNumber(int number) { - return OverlayType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDescriptor() - .getEnumTypes() - .get(3); - } - - private static final OverlayType[] VALUES = values(); - - public static OverlayType 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 OverlayType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; - - /** - * - * - *
-       * Type of the image visualization. Only applicable to
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-       * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-       * attribution. Defaults to OUTLINES.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - - /** - * - * - *
-       * Type of the image visualization. Only applicable to
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-       * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-       * attribution. Defaults to OUTLINES.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - getType() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .forNumber(type_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .UNRECOGNIZED - : result; - } - - public static final int POLARITY_FIELD_NUMBER = 2; - private int polarity_ = 0; - - /** - * - * - *
-       * Whether to only highlight pixels with positive contributions, negative
-       * or both. Defaults to POSITIVE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The enum numeric value on the wire for polarity. - */ - @java.lang.Override - public int getPolarityValue() { - return polarity_; - } - - /** - * - * - *
-       * Whether to only highlight pixels with positive contributions, negative
-       * or both. Defaults to POSITIVE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The polarity. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - getPolarity() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity.forNumber(polarity_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - .UNRECOGNIZED - : result; - } - - public static final int COLOR_MAP_FIELD_NUMBER = 3; - private int colorMap_ = 0; - - /** - * - * - *
-       * The color scheme used for the highlighted areas.
-       *
-       * Defaults to PINK_GREEN for
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-       * which shows positive attributions in green and negative in pink.
-       *
-       * Defaults to VIRIDIS for
-       * [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-       * which highlights the most influential regions in yellow and the least
-       * influential in blue.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The enum numeric value on the wire for colorMap. - */ - @java.lang.Override - public int getColorMapValue() { - return colorMap_; - } - - /** - * - * - *
-       * The color scheme used for the highlighted areas.
-       *
-       * Defaults to PINK_GREEN for
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-       * which shows positive attributions in green and negative in pink.
-       *
-       * Defaults to VIRIDIS for
-       * [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-       * which highlights the most influential regions in yellow and the least
-       * influential in blue.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The colorMap. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - getColorMap() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap.forNumber(colorMap_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - .UNRECOGNIZED - : result; - } - - public static final int CLIP_PERCENT_UPPERBOUND_FIELD_NUMBER = 4; - private float clipPercentUpperbound_ = 0F; - - /** - * - * - *
-       * Excludes attributions above the specified percentile from the
-       * highlighted areas. Using the clip_percent_upperbound and
-       * clip_percent_lowerbound together can be useful for filtering out noise
-       * and making it easier to see areas of strong attribution. Defaults to
-       * 99.9.
-       * 
- * - * float clip_percent_upperbound = 4; - * - * @return The clipPercentUpperbound. - */ - @java.lang.Override - public float getClipPercentUpperbound() { - return clipPercentUpperbound_; - } - - public static final int CLIP_PERCENT_LOWERBOUND_FIELD_NUMBER = 5; - private float clipPercentLowerbound_ = 0F; - - /** - * - * - *
-       * Excludes attributions below the specified percentile, from the
-       * highlighted areas. Defaults to 62.
-       * 
- * - * float clip_percent_lowerbound = 5; - * - * @return The clipPercentLowerbound. - */ - @java.lang.Override - public float getClipPercentLowerbound() { - return clipPercentLowerbound_; - } - - public static final int OVERLAY_TYPE_FIELD_NUMBER = 6; - private int overlayType_ = 0; - - /** - * - * - *
-       * How the original image is displayed in the visualization.
-       * Adjusting the overlay can help increase visual clarity if the original
-       * image makes it difficult to view the visualization. Defaults to NONE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The enum numeric value on the wire for overlayType. - */ - @java.lang.Override - public int getOverlayTypeValue() { - return overlayType_; - } - - /** - * - * - *
-       * How the original image is displayed in the visualization.
-       * Adjusting the overlay can help increase visual clarity if the original
-       * image makes it difficult to view the visualization. Defaults to NONE.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The overlayType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType - getOverlayType() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.OverlayType - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.forNumber(overlayType_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.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 (type_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, type_); - } - if (polarity_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity.POLARITY_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, polarity_); - } - if (colorMap_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap.COLOR_MAP_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, colorMap_); - } - if (java.lang.Float.floatToRawIntBits(clipPercentUpperbound_) != 0) { - output.writeFloat(4, clipPercentUpperbound_); - } - if (java.lang.Float.floatToRawIntBits(clipPercentLowerbound_) != 0) { - output.writeFloat(5, clipPercentLowerbound_); - } - if (overlayType_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.OVERLAY_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, overlayType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (polarity_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity.POLARITY_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, polarity_); - } - if (colorMap_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap.COLOR_MAP_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, colorMap_); - } - if (java.lang.Float.floatToRawIntBits(clipPercentUpperbound_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, clipPercentUpperbound_); - } - if (java.lang.Float.floatToRawIntBits(clipPercentLowerbound_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, clipPercentLowerbound_); - } - if (overlayType_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.OVERLAY_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, overlayType_); - } - 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.vertexai.api.ExplanationMetadata.InputMetadata.Visualization)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization other = - (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization) obj; - - if (type_ != other.type_) return false; - if (polarity_ != other.polarity_) return false; - if (colorMap_ != other.colorMap_) return false; - if (java.lang.Float.floatToIntBits(getClipPercentUpperbound()) - != java.lang.Float.floatToIntBits(other.getClipPercentUpperbound())) return false; - if (java.lang.Float.floatToIntBits(getClipPercentLowerbound()) - != java.lang.Float.floatToIntBits(other.getClipPercentLowerbound())) return false; - if (overlayType_ != other.overlayType_) 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) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + POLARITY_FIELD_NUMBER; - hash = (53 * hash) + polarity_; - hash = (37 * hash) + COLOR_MAP_FIELD_NUMBER; - hash = (53 * hash) + colorMap_; - hash = (37 * hash) + CLIP_PERCENT_UPPERBOUND_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getClipPercentUpperbound()); - hash = (37 * hash) + CLIP_PERCENT_LOWERBOUND_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getClipPercentLowerbound()); - hash = (37 * hash) + OVERLAY_TYPE_FIELD_NUMBER; - hash = (53 * hash) + overlayType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - 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.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - 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.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadata.InputMetadata.Visualization 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization) - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.VisualizationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - polarity_ = 0; - colorMap_ = 0; - clipPercentUpperbound_ = 0F; - clipPercentLowerbound_ = 0F; - overlayType_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - build() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization result = - new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.polarity_ = polarity_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.colorMap_ = colorMap_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.clipPercentUpperbound_ = clipPercentUpperbound_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.clipPercentLowerbound_ = clipPercentLowerbound_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.overlayType_ = overlayType_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization) { - return mergeFrom( - (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization other) { - if (other - == com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.polarity_ != 0) { - setPolarityValue(other.getPolarityValue()); - } - if (other.colorMap_ != 0) { - setColorMapValue(other.getColorMapValue()); - } - if (java.lang.Float.floatToRawIntBits(other.getClipPercentUpperbound()) != 0) { - setClipPercentUpperbound(other.getClipPercentUpperbound()); - } - if (java.lang.Float.floatToRawIntBits(other.getClipPercentLowerbound()) != 0) { - setClipPercentLowerbound(other.getClipPercentLowerbound()); - } - if (other.overlayType_ != 0) { - setOverlayTypeValue(other.getOverlayTypeValue()); - } - 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: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - polarity_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - colorMap_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 37: - { - clipPercentUpperbound_ = input.readFloat(); - bitField0_ |= 0x00000008; - break; - } // case 37 - case 45: - { - clipPercentLowerbound_ = input.readFloat(); - bitField0_ |= 0x00000010; - break; - } // case 45 - case 48: - { - overlayType_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 48 - 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 type_ = 0; - - /** - * - * - *
-         * Type of the image visualization. Only applicable to
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-         * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-         * attribution. Defaults to OUTLINES.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - - /** - * - * - *
-         * Type of the image visualization. Only applicable to
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-         * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-         * attribution. Defaults to OUTLINES.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * Type of the image visualization. Only applicable to
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-         * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-         * attribution. Defaults to OUTLINES.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - getType() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .forNumber(type_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - .UNRECOGNIZED - : result; - } - - /** - * - * - *
-         * Type of the image visualization. Only applicable to
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-         * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-         * attribution. Defaults to OUTLINES.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Type - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-         * Type of the image visualization. Only applicable to
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
-         * OUTLINES shows regions of attribution, while PIXELS shows per-pixel
-         * attribution. Defaults to OUTLINES.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Type type = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); - return this; - } - - private int polarity_ = 0; - - /** - * - * - *
-         * Whether to only highlight pixels with positive contributions, negative
-         * or both. Defaults to POSITIVE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The enum numeric value on the wire for polarity. - */ - @java.lang.Override - public int getPolarityValue() { - return polarity_; - } - - /** - * - * - *
-         * Whether to only highlight pixels with positive contributions, negative
-         * or both. Defaults to POSITIVE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @param value The enum numeric value on the wire for polarity to set. - * @return This builder for chaining. - */ - public Builder setPolarityValue(int value) { - polarity_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-         * Whether to only highlight pixels with positive contributions, negative
-         * or both. Defaults to POSITIVE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return The polarity. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity - getPolarity() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity.forNumber(polarity_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Polarity.UNRECOGNIZED - : result; - } - - /** - * - * - *
-         * Whether to only highlight pixels with positive contributions, negative
-         * or both. Defaults to POSITIVE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @param value The polarity to set. - * @return This builder for chaining. - */ - public Builder setPolarity( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Polarity - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - polarity_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-         * Whether to only highlight pixels with positive contributions, negative
-         * or both. Defaults to POSITIVE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity polarity = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearPolarity() { - bitField0_ = (bitField0_ & ~0x00000002); - polarity_ = 0; - onChanged(); - return this; - } - - private int colorMap_ = 0; - - /** - * - * - *
-         * The color scheme used for the highlighted areas.
-         *
-         * Defaults to PINK_GREEN for
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-         * which shows positive attributions in green and negative in pink.
-         *
-         * Defaults to VIRIDIS for
-         * [XRAI
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-         * which highlights the most influential regions in yellow and the least
-         * influential in blue.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The enum numeric value on the wire for colorMap. - */ - @java.lang.Override - public int getColorMapValue() { - return colorMap_; - } - - /** - * - * - *
-         * The color scheme used for the highlighted areas.
-         *
-         * Defaults to PINK_GREEN for
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-         * which shows positive attributions in green and negative in pink.
-         *
-         * Defaults to VIRIDIS for
-         * [XRAI
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-         * which highlights the most influential regions in yellow and the least
-         * influential in blue.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @param value The enum numeric value on the wire for colorMap to set. - * @return This builder for chaining. - */ - public Builder setColorMapValue(int value) { - colorMap_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-         * The color scheme used for the highlighted areas.
-         *
-         * Defaults to PINK_GREEN for
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-         * which shows positive attributions in green and negative in pink.
-         *
-         * Defaults to VIRIDIS for
-         * [XRAI
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-         * which highlights the most influential regions in yellow and the least
-         * influential in blue.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return The colorMap. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap - getColorMap() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap.forNumber(colorMap_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .ColorMap.UNRECOGNIZED - : result; - } - - /** - * - * - *
-         * The color scheme used for the highlighted areas.
-         *
-         * Defaults to PINK_GREEN for
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-         * which shows positive attributions in green and negative in pink.
-         *
-         * Defaults to VIRIDIS for
-         * [XRAI
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-         * which highlights the most influential regions in yellow and the least
-         * influential in blue.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @param value The colorMap to set. - * @return This builder for chaining. - */ - public Builder setColorMap( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.ColorMap - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - colorMap_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-         * The color scheme used for the highlighted areas.
-         *
-         * Defaults to PINK_GREEN for
-         * [Integrated Gradients
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
-         * which shows positive attributions in green and negative in pink.
-         *
-         * Defaults to VIRIDIS for
-         * [XRAI
-         * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
-         * which highlights the most influential regions in yellow and the least
-         * influential in blue.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap color_map = 3; - * - * - * @return This builder for chaining. - */ - public Builder clearColorMap() { - bitField0_ = (bitField0_ & ~0x00000004); - colorMap_ = 0; - onChanged(); - return this; - } - - private float clipPercentUpperbound_; - - /** - * - * - *
-         * Excludes attributions above the specified percentile from the
-         * highlighted areas. Using the clip_percent_upperbound and
-         * clip_percent_lowerbound together can be useful for filtering out noise
-         * and making it easier to see areas of strong attribution. Defaults to
-         * 99.9.
-         * 
- * - * float clip_percent_upperbound = 4; - * - * @return The clipPercentUpperbound. - */ - @java.lang.Override - public float getClipPercentUpperbound() { - return clipPercentUpperbound_; - } - - /** - * - * - *
-         * Excludes attributions above the specified percentile from the
-         * highlighted areas. Using the clip_percent_upperbound and
-         * clip_percent_lowerbound together can be useful for filtering out noise
-         * and making it easier to see areas of strong attribution. Defaults to
-         * 99.9.
-         * 
- * - * float clip_percent_upperbound = 4; - * - * @param value The clipPercentUpperbound to set. - * @return This builder for chaining. - */ - public Builder setClipPercentUpperbound(float value) { - - clipPercentUpperbound_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-         * Excludes attributions above the specified percentile from the
-         * highlighted areas. Using the clip_percent_upperbound and
-         * clip_percent_lowerbound together can be useful for filtering out noise
-         * and making it easier to see areas of strong attribution. Defaults to
-         * 99.9.
-         * 
- * - * float clip_percent_upperbound = 4; - * - * @return This builder for chaining. - */ - public Builder clearClipPercentUpperbound() { - bitField0_ = (bitField0_ & ~0x00000008); - clipPercentUpperbound_ = 0F; - onChanged(); - return this; - } - - private float clipPercentLowerbound_; - - /** - * - * - *
-         * Excludes attributions below the specified percentile, from the
-         * highlighted areas. Defaults to 62.
-         * 
- * - * float clip_percent_lowerbound = 5; - * - * @return The clipPercentLowerbound. - */ - @java.lang.Override - public float getClipPercentLowerbound() { - return clipPercentLowerbound_; - } - - /** - * - * - *
-         * Excludes attributions below the specified percentile, from the
-         * highlighted areas. Defaults to 62.
-         * 
- * - * float clip_percent_lowerbound = 5; - * - * @param value The clipPercentLowerbound to set. - * @return This builder for chaining. - */ - public Builder setClipPercentLowerbound(float value) { - - clipPercentLowerbound_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-         * Excludes attributions below the specified percentile, from the
-         * highlighted areas. Defaults to 62.
-         * 
- * - * float clip_percent_lowerbound = 5; - * - * @return This builder for chaining. - */ - public Builder clearClipPercentLowerbound() { - bitField0_ = (bitField0_ & ~0x00000010); - clipPercentLowerbound_ = 0F; - onChanged(); - return this; - } - - private int overlayType_ = 0; - - /** - * - * - *
-         * How the original image is displayed in the visualization.
-         * Adjusting the overlay can help increase visual clarity if the original
-         * image makes it difficult to view the visualization. Defaults to NONE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The enum numeric value on the wire for overlayType. - */ - @java.lang.Override - public int getOverlayTypeValue() { - return overlayType_; - } - - /** - * - * - *
-         * How the original image is displayed in the visualization.
-         * Adjusting the overlay can help increase visual clarity if the original
-         * image makes it difficult to view the visualization. Defaults to NONE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @param value The enum numeric value on the wire for overlayType to set. - * @return This builder for chaining. - */ - public Builder setOverlayTypeValue(int value) { - overlayType_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-         * How the original image is displayed in the visualization.
-         * Adjusting the overlay can help increase visual clarity if the original
-         * image makes it difficult to view the visualization. Defaults to NONE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return The overlayType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType - getOverlayType() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.OverlayType - result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.forNumber(overlayType_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType.UNRECOGNIZED - : result; - } - - /** - * - * - *
-         * How the original image is displayed in the visualization.
-         * Adjusting the overlay can help increase visual clarity if the original
-         * image makes it difficult to view the visualization. Defaults to NONE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @param value The overlayType to set. - * @return This builder for chaining. - */ - public Builder setOverlayType( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .OverlayType - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - overlayType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-         * How the original image is displayed in the visualization.
-         * Adjusting the overlay can help increase visual clarity if the original
-         * image makes it difficult to view the visualization. Defaults to NONE.
-         * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType overlay_type = 6; - * - * - * @return This builder for chaining. - */ - public Builder clearOverlayType() { - bitField0_ = (bitField0_ & ~0x00000020); - overlayType_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization) - private static final com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .Visualization - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Visualization 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.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int INPUT_BASELINES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List inputBaselines_; - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public java.util.List getInputBaselinesList() { - return inputBaselines_; - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public java.util.List - getInputBaselinesOrBuilderList() { - return inputBaselines_; - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public int getInputBaselinesCount() { - return inputBaselines_.size(); - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public com.google.protobuf.Value getInputBaselines(int index) { - return inputBaselines_.get(index); - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * If no baseline is specified, Vertex AI chooses the baseline for this
-     * feature. If multiple baselines are specified, Vertex AI returns the
-     * average attributions across them in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     *
-     * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-     * of each baseline must match the shape of the input tensor. If a scalar is
-     * provided, we broadcast to the same shape as the input tensor.
-     *
-     * For custom images, the element of the baselines must be in the same
-     * format as the feature's input in the
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-     * schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index) { - return inputBaselines_.get(index); - } - - public static final int INPUT_TENSOR_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object inputTensorName_ = ""; - - /** - * - * - *
-     * Name of the input tensor for this feature. Required and is only
-     * applicable to Vertex AI-provided images for Tensorflow.
-     * 
- * - * string input_tensor_name = 2; - * - * @return The inputTensorName. - */ - @java.lang.Override - public java.lang.String getInputTensorName() { - java.lang.Object ref = inputTensorName_; - 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(); - inputTensorName_ = s; - return s; - } - } - - /** - * - * - *
-     * Name of the input tensor for this feature. Required and is only
-     * applicable to Vertex AI-provided images for Tensorflow.
-     * 
- * - * string input_tensor_name = 2; - * - * @return The bytes for inputTensorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInputTensorNameBytes() { - java.lang.Object ref = inputTensorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - inputTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENCODING_FIELD_NUMBER = 3; - private int encoding_ = 0; - - /** - * - * - *
-     * Defines how the feature is encoded into the input tensor. Defaults to
-     * IDENTITY.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The enum numeric value on the wire for encoding. - */ - @java.lang.Override - public int getEncodingValue() { - return encoding_; - } - - /** - * - * - *
-     * Defines how the feature is encoded into the input tensor. Defaults to
-     * IDENTITY.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The encoding. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding getEncoding() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding.forNumber( - encoding_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding.UNRECOGNIZED - : result; - } - - public static final int MODALITY_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object modality_ = ""; - - /** - * - * - *
-     * Modality of the feature. Valid values are: numeric, image. Defaults to
-     * numeric.
-     * 
- * - * string modality = 4; - * - * @return The modality. - */ - @java.lang.Override - public java.lang.String getModality() { - java.lang.Object ref = modality_; - 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(); - modality_ = s; - return s; - } - } - - /** - * - * - *
-     * Modality of the feature. Valid values are: numeric, image. Defaults to
-     * numeric.
-     * 
- * - * string modality = 4; - * - * @return The bytes for modality. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModalityBytes() { - java.lang.Object ref = modality_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modality_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEATURE_VALUE_DOMAIN_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - featureValueDomain_; - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return Whether the featureValueDomain field is set. - */ - @java.lang.Override - public boolean hasFeatureValueDomain() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return The featureValueDomain. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - getFeatureValueDomain() { - return featureValueDomain_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance() - : featureValueDomain_; - } - - /** - * - * - *
-     * The domain details of the input feature value. Like min/max, original
-     * mean or standard deviation if normalized.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder - getFeatureValueDomainOrBuilder() { - return featureValueDomain_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance() - : featureValueDomain_; - } - - public static final int INDICES_TENSOR_NAME_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object indicesTensorName_ = ""; - - /** - * - * - *
-     * Specifies the index of the values of the input tensor.
-     * Required when the input tensor is a sparse representation. Refer to
-     * Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string indices_tensor_name = 6; - * - * @return The indicesTensorName. - */ - @java.lang.Override - public java.lang.String getIndicesTensorName() { - java.lang.Object ref = indicesTensorName_; - 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(); - indicesTensorName_ = s; - return s; - } - } - - /** - * - * - *
-     * Specifies the index of the values of the input tensor.
-     * Required when the input tensor is a sparse representation. Refer to
-     * Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string indices_tensor_name = 6; - * - * @return The bytes for indicesTensorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIndicesTensorNameBytes() { - java.lang.Object ref = indicesTensorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indicesTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DENSE_SHAPE_TENSOR_NAME_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object denseShapeTensorName_ = ""; - - /** - * - * - *
-     * Specifies the shape of the values of the input if the input is a sparse
-     * representation. Refer to Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The denseShapeTensorName. - */ - @java.lang.Override - public java.lang.String getDenseShapeTensorName() { - java.lang.Object ref = denseShapeTensorName_; - 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(); - denseShapeTensorName_ = s; - return s; - } - } - - /** - * - * - *
-     * Specifies the shape of the values of the input if the input is a sparse
-     * representation. Refer to Tensorflow documentation for more details:
-     * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-     * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The bytes for denseShapeTensorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDenseShapeTensorNameBytes() { - java.lang.Object ref = denseShapeTensorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - denseShapeTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEX_FEATURE_MAPPING_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList indexFeatureMapping_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @return A list containing the indexFeatureMapping. - */ - public com.google.protobuf.ProtocolStringList getIndexFeatureMappingList() { - return indexFeatureMapping_; - } - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @return The count of indexFeatureMapping. - */ - public int getIndexFeatureMappingCount() { - return indexFeatureMapping_.size(); - } - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the element to return. - * @return The indexFeatureMapping at the given index. - */ - public java.lang.String getIndexFeatureMapping(int index) { - return indexFeatureMapping_.get(index); - } - - /** - * - * - *
-     * A list of feature names for each index in the input tensor.
-     * Required when the input
-     * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-     * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-     * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the value to return. - * @return The bytes of the indexFeatureMapping at the given index. - */ - public com.google.protobuf.ByteString getIndexFeatureMappingBytes(int index) { - return indexFeatureMapping_.getByteString(index); - } - - public static final int ENCODED_TENSOR_NAME_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object encodedTensorName_ = ""; - - /** - * - * - *
-     * Encoded tensor is a transformation of the input tensor. Must be provided
-     * if choosing
-     * [Integrated Gradients
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-     * or [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-     * and the input tensor is not differentiable.
-     *
-     * An encoded tensor is generated if the input tensor is encoded by a lookup
-     * table.
-     * 
- * - * string encoded_tensor_name = 9; - * - * @return The encodedTensorName. - */ - @java.lang.Override - public java.lang.String getEncodedTensorName() { - java.lang.Object ref = encodedTensorName_; - 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(); - encodedTensorName_ = s; - return s; - } - } - - /** - * - * - *
-     * Encoded tensor is a transformation of the input tensor. Must be provided
-     * if choosing
-     * [Integrated Gradients
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-     * or [XRAI
-     * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-     * and the input tensor is not differentiable.
-     *
-     * An encoded tensor is generated if the input tensor is encoded by a lookup
-     * table.
-     * 
- * - * string encoded_tensor_name = 9; - * - * @return The bytes for encodedTensorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEncodedTensorNameBytes() { - java.lang.Object ref = encodedTensorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - encodedTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENCODED_BASELINES_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private java.util.List encodedBaselines_; - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - @java.lang.Override - public java.util.List getEncodedBaselinesList() { - return encodedBaselines_; - } - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - @java.lang.Override - public java.util.List - getEncodedBaselinesOrBuilderList() { - return encodedBaselines_; - } - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - @java.lang.Override - public int getEncodedBaselinesCount() { - return encodedBaselines_.size(); - } - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - @java.lang.Override - public com.google.protobuf.Value getEncodedBaselines(int index) { - return encodedBaselines_.get(index); - } - - /** - * - * - *
-     * A list of baselines for the encoded tensor.
-     *
-     * The shape of each baseline should match the shape of the encoded tensor.
-     * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-     * encoded tensor.
-     * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getEncodedBaselinesOrBuilder(int index) { - return encodedBaselines_.get(index); - } - - public static final int VISUALIZATION_FIELD_NUMBER = 11; - private com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - visualization_; - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return Whether the visualization field is set. - */ - @java.lang.Override - public boolean hasVisualization() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return The visualization. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getVisualization() { - return visualization_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance() - : visualization_; - } - - /** - * - * - *
-     * Visualization configurations for image explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.VisualizationOrBuilder - getVisualizationOrBuilder() { - return visualization_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance() - : visualization_; - } - - public static final int GROUP_NAME_FIELD_NUMBER = 12; - - @SuppressWarnings("serial") - private volatile java.lang.Object groupName_ = ""; - - /** - * - * - *
-     * Name of the group that the input belongs to. Features with the same group
-     * name will be treated as one feature when computing attributions. Features
-     * grouped together can have different shapes in value. If provided, there
-     * will be one single attribution generated in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-     * keyed by the group name.
-     * 
- * - * string group_name = 12; - * - * @return The groupName. - */ - @java.lang.Override - public java.lang.String getGroupName() { - java.lang.Object ref = groupName_; - 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(); - groupName_ = s; - return s; - } - } - - /** - * - * - *
-     * Name of the group that the input belongs to. Features with the same group
-     * name will be treated as one feature when computing attributions. Features
-     * grouped together can have different shapes in value. If provided, there
-     * will be one single attribution generated in
-     * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-     * keyed by the group name.
-     * 
- * - * string group_name = 12; - * - * @return The bytes for groupName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGroupNameBytes() { - java.lang.Object ref = groupName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - groupName_ = 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 < inputBaselines_.size(); i++) { - output.writeMessage(1, inputBaselines_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(inputTensorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, inputTensorName_); - } - if (encoding_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding - .ENCODING_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, encoding_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modality_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, modality_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getFeatureValueDomain()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesTensorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, indicesTensorName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(denseShapeTensorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, denseShapeTensorName_); - } - for (int i = 0; i < indexFeatureMapping_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, indexFeatureMapping_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encodedTensorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, encodedTensorName_); - } - for (int i = 0; i < encodedBaselines_.size(); i++) { - output.writeMessage(10, encodedBaselines_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(11, getVisualization()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 12, groupName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < inputBaselines_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, inputBaselines_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(inputTensorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, inputTensorName_); - } - if (encoding_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding - .ENCODING_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, encoding_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modality_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, modality_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeatureValueDomain()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesTensorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, indicesTensorName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(denseShapeTensorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, denseShapeTensorName_); - } - { - int dataSize = 0; - for (int i = 0; i < indexFeatureMapping_.size(); i++) { - dataSize += computeStringSizeNoTag(indexFeatureMapping_.getRaw(i)); - } - size += dataSize; - size += 1 * getIndexFeatureMappingList().size(); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(encodedTensorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(9, encodedTensorName_); - } - for (int i = 0; i < encodedBaselines_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(10, encodedBaselines_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getVisualization()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(12, groupName_); - } - 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.vertexai.api.ExplanationMetadata.InputMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata other = - (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) obj; - - if (!getInputBaselinesList().equals(other.getInputBaselinesList())) return false; - if (!getInputTensorName().equals(other.getInputTensorName())) return false; - if (encoding_ != other.encoding_) return false; - if (!getModality().equals(other.getModality())) return false; - if (hasFeatureValueDomain() != other.hasFeatureValueDomain()) return false; - if (hasFeatureValueDomain()) { - if (!getFeatureValueDomain().equals(other.getFeatureValueDomain())) return false; - } - if (!getIndicesTensorName().equals(other.getIndicesTensorName())) return false; - if (!getDenseShapeTensorName().equals(other.getDenseShapeTensorName())) return false; - if (!getIndexFeatureMappingList().equals(other.getIndexFeatureMappingList())) return false; - if (!getEncodedTensorName().equals(other.getEncodedTensorName())) return false; - if (!getEncodedBaselinesList().equals(other.getEncodedBaselinesList())) return false; - if (hasVisualization() != other.hasVisualization()) return false; - if (hasVisualization()) { - if (!getVisualization().equals(other.getVisualization())) return false; - } - if (!getGroupName().equals(other.getGroupName())) 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 (getInputBaselinesCount() > 0) { - hash = (37 * hash) + INPUT_BASELINES_FIELD_NUMBER; - hash = (53 * hash) + getInputBaselinesList().hashCode(); - } - hash = (37 * hash) + INPUT_TENSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInputTensorName().hashCode(); - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + encoding_; - hash = (37 * hash) + MODALITY_FIELD_NUMBER; - hash = (53 * hash) + getModality().hashCode(); - if (hasFeatureValueDomain()) { - hash = (37 * hash) + FEATURE_VALUE_DOMAIN_FIELD_NUMBER; - hash = (53 * hash) + getFeatureValueDomain().hashCode(); - } - hash = (37 * hash) + INDICES_TENSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getIndicesTensorName().hashCode(); - hash = (37 * hash) + DENSE_SHAPE_TENSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDenseShapeTensorName().hashCode(); - if (getIndexFeatureMappingCount() > 0) { - hash = (37 * hash) + INDEX_FEATURE_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getIndexFeatureMappingList().hashCode(); - } - hash = (37 * hash) + ENCODED_TENSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getEncodedTensorName().hashCode(); - if (getEncodedBaselinesCount() > 0) { - hash = (37 * hash) + ENCODED_BASELINES_FIELD_NUMBER; - hash = (53 * hash) + getEncodedBaselinesList().hashCode(); - } - if (hasVisualization()) { - hash = (37 * hash) + VISUALIZATION_FIELD_NUMBER; - hash = (53 * hash) + getVisualization().hashCode(); - } - hash = (37 * hash) + GROUP_NAME_FIELD_NUMBER; - hash = (53 * hash) + getGroupName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata 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.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata 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.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadata.InputMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Metadata of the input of a feature.
-     *
-     * Fields other than
-     * [InputMetadata.input_baselines][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines]
-     * are applicable only for Models that are using Vertex AI-provided images for
-     * Tensorflow.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata) - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInputBaselinesFieldBuilder(); - internalGetFeatureValueDomainFieldBuilder(); - internalGetEncodedBaselinesFieldBuilder(); - internalGetVisualizationFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (inputBaselinesBuilder_ == null) { - inputBaselines_ = java.util.Collections.emptyList(); - } else { - inputBaselines_ = null; - inputBaselinesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - inputTensorName_ = ""; - encoding_ = 0; - modality_ = ""; - featureValueDomain_ = null; - if (featureValueDomainBuilder_ != null) { - featureValueDomainBuilder_.dispose(); - featureValueDomainBuilder_ = null; - } - indicesTensorName_ = ""; - denseShapeTensorName_ = ""; - indexFeatureMapping_ = com.google.protobuf.LazyStringArrayList.emptyList(); - encodedTensorName_ = ""; - if (encodedBaselinesBuilder_ == null) { - encodedBaselines_ = java.util.Collections.emptyList(); - } else { - encodedBaselines_ = null; - encodedBaselinesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - visualization_ = null; - if (visualizationBuilder_ != null) { - visualizationBuilder_.dispose(); - visualizationBuilder_ = null; - } - groupName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata build() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata result = - new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata result) { - if (inputBaselinesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - inputBaselines_ = java.util.Collections.unmodifiableList(inputBaselines_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inputBaselines_ = inputBaselines_; - } else { - result.inputBaselines_ = inputBaselinesBuilder_.build(); - } - if (encodedBaselinesBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - encodedBaselines_ = java.util.Collections.unmodifiableList(encodedBaselines_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.encodedBaselines_ = encodedBaselines_; - } else { - result.encodedBaselines_ = encodedBaselinesBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.inputTensorName_ = inputTensorName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.encoding_ = encoding_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.modality_ = modality_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.featureValueDomain_ = - featureValueDomainBuilder_ == null - ? featureValueDomain_ - : featureValueDomainBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.indicesTensorName_ = indicesTensorName_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.denseShapeTensorName_ = denseShapeTensorName_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - indexFeatureMapping_.makeImmutable(); - result.indexFeatureMapping_ = indexFeatureMapping_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.encodedTensorName_ = encodedTensorName_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.visualization_ = - visualizationBuilder_ == null ? visualization_ : visualizationBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.groupName_ = groupName_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata other) { - if (other - == com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.getDefaultInstance()) - return this; - if (inputBaselinesBuilder_ == null) { - if (!other.inputBaselines_.isEmpty()) { - if (inputBaselines_.isEmpty()) { - inputBaselines_ = other.inputBaselines_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInputBaselinesIsMutable(); - inputBaselines_.addAll(other.inputBaselines_); - } - onChanged(); - } - } else { - if (!other.inputBaselines_.isEmpty()) { - if (inputBaselinesBuilder_.isEmpty()) { - inputBaselinesBuilder_.dispose(); - inputBaselinesBuilder_ = null; - inputBaselines_ = other.inputBaselines_; - bitField0_ = (bitField0_ & ~0x00000001); - inputBaselinesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInputBaselinesFieldBuilder() - : null; - } else { - inputBaselinesBuilder_.addAllMessages(other.inputBaselines_); - } - } - } - if (!other.getInputTensorName().isEmpty()) { - inputTensorName_ = other.inputTensorName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.encoding_ != 0) { - setEncodingValue(other.getEncodingValue()); - } - if (!other.getModality().isEmpty()) { - modality_ = other.modality_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasFeatureValueDomain()) { - mergeFeatureValueDomain(other.getFeatureValueDomain()); - } - if (!other.getIndicesTensorName().isEmpty()) { - indicesTensorName_ = other.indicesTensorName_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getDenseShapeTensorName().isEmpty()) { - denseShapeTensorName_ = other.denseShapeTensorName_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.indexFeatureMapping_.isEmpty()) { - if (indexFeatureMapping_.isEmpty()) { - indexFeatureMapping_ = other.indexFeatureMapping_; - bitField0_ |= 0x00000080; - } else { - ensureIndexFeatureMappingIsMutable(); - indexFeatureMapping_.addAll(other.indexFeatureMapping_); - } - onChanged(); - } - if (!other.getEncodedTensorName().isEmpty()) { - encodedTensorName_ = other.encodedTensorName_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (encodedBaselinesBuilder_ == null) { - if (!other.encodedBaselines_.isEmpty()) { - if (encodedBaselines_.isEmpty()) { - encodedBaselines_ = other.encodedBaselines_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.addAll(other.encodedBaselines_); - } - onChanged(); - } - } else { - if (!other.encodedBaselines_.isEmpty()) { - if (encodedBaselinesBuilder_.isEmpty()) { - encodedBaselinesBuilder_.dispose(); - encodedBaselinesBuilder_ = null; - encodedBaselines_ = other.encodedBaselines_; - bitField0_ = (bitField0_ & ~0x00000200); - encodedBaselinesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetEncodedBaselinesFieldBuilder() - : null; - } else { - encodedBaselinesBuilder_.addAllMessages(other.encodedBaselines_); - } - } - } - if (other.hasVisualization()) { - mergeVisualization(other.getVisualization()); - } - if (!other.getGroupName().isEmpty()) { - groupName_ = other.groupName_; - bitField0_ |= 0x00000800; - 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.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(m); - } else { - inputBaselinesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - inputTensorName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - encoding_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - modality_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetFeatureValueDomainFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - indicesTensorName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - denseShapeTensorName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureIndexFeatureMappingIsMutable(); - indexFeatureMapping_.add(s); - break; - } // case 66 - case 74: - { - encodedTensorName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.add(m); - } else { - encodedBaselinesBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: - { - input.readMessage( - internalGetVisualizationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 90 - case 98: - { - groupName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 98 - 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 inputBaselines_ = - java.util.Collections.emptyList(); - - private void ensureInputBaselinesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inputBaselines_ = new java.util.ArrayList(inputBaselines_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - inputBaselinesBuilder_; - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List getInputBaselinesList() { - if (inputBaselinesBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputBaselines_); - } else { - return inputBaselinesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public int getInputBaselinesCount() { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.size(); - } else { - return inputBaselinesBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value getInputBaselines(int index) { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.get(index); - } else { - return inputBaselinesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder setInputBaselines(int index, com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.set(index, value); - onChanged(); - } else { - inputBaselinesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder setInputBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.set(index, builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.add(value); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(int index, com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.add(index, value); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(index, builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addAllInputBaselines( - java.lang.Iterable values) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputBaselines_); - onChanged(); - } else { - inputBaselinesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder clearInputBaselines() { - if (inputBaselinesBuilder_ == null) { - inputBaselines_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - inputBaselinesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder removeInputBaselines(int index) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.remove(index); - onChanged(); - } else { - inputBaselinesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder getInputBaselinesBuilder(int index) { - return internalGetInputBaselinesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index) { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.get(index); - } else { - return inputBaselinesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List - getInputBaselinesOrBuilderList() { - if (inputBaselinesBuilder_ != null) { - return inputBaselinesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputBaselines_); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder addInputBaselinesBuilder() { - return internalGetInputBaselinesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder addInputBaselinesBuilder(int index) { - return internalGetInputBaselinesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * If no baseline is specified, Vertex AI chooses the baseline for this
-       * feature. If multiple baselines are specified, Vertex AI returns the
-       * average attributions across them in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-       *
-       * For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
-       * of each baseline must match the shape of the input tensor. If a scalar is
-       * provided, we broadcast to the same shape as the input tensor.
-       *
-       * For custom images, the element of the baselines must be in the same
-       * format as the feature's input in the
-       * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
-       * schema of any single instance may be specified via Endpoint's
-       * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-       * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-       * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List getInputBaselinesBuilderList() { - return internalGetInputBaselinesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInputBaselinesFieldBuilder() { - if (inputBaselinesBuilder_ == null) { - inputBaselinesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - inputBaselines_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - inputBaselines_ = null; - } - return inputBaselinesBuilder_; - } - - private java.lang.Object inputTensorName_ = ""; - - /** - * - * - *
-       * Name of the input tensor for this feature. Required and is only
-       * applicable to Vertex AI-provided images for Tensorflow.
-       * 
- * - * string input_tensor_name = 2; - * - * @return The inputTensorName. - */ - public java.lang.String getInputTensorName() { - java.lang.Object ref = inputTensorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inputTensorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Name of the input tensor for this feature. Required and is only
-       * applicable to Vertex AI-provided images for Tensorflow.
-       * 
- * - * string input_tensor_name = 2; - * - * @return The bytes for inputTensorName. - */ - public com.google.protobuf.ByteString getInputTensorNameBytes() { - java.lang.Object ref = inputTensorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - inputTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Name of the input tensor for this feature. Required and is only
-       * applicable to Vertex AI-provided images for Tensorflow.
-       * 
- * - * string input_tensor_name = 2; - * - * @param value The inputTensorName to set. - * @return This builder for chaining. - */ - public Builder setInputTensorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - inputTensorName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the input tensor for this feature. Required and is only
-       * applicable to Vertex AI-provided images for Tensorflow.
-       * 
- * - * string input_tensor_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearInputTensorName() { - inputTensorName_ = getDefaultInstance().getInputTensorName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the input tensor for this feature. Required and is only
-       * applicable to Vertex AI-provided images for Tensorflow.
-       * 
- * - * string input_tensor_name = 2; - * - * @param value The bytes for inputTensorName to set. - * @return This builder for chaining. - */ - public Builder setInputTensorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - inputTensorName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int encoding_ = 0; - - /** - * - * - *
-       * Defines how the feature is encoded into the input tensor. Defaults to
-       * IDENTITY.
-       * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The enum numeric value on the wire for encoding. - */ - @java.lang.Override - public int getEncodingValue() { - return encoding_; - } - - /** - * - * - *
-       * Defines how the feature is encoded into the input tensor. Defaults to
-       * IDENTITY.
-       * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @param value The enum numeric value on the wire for encoding to set. - * @return This builder for chaining. - */ - public Builder setEncodingValue(int value) { - encoding_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Defines how the feature is encoded into the input tensor. Defaults to
-       * IDENTITY.
-       * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return The encoding. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding - getEncoding() { - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding result = - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding.forNumber( - encoding_); - return result == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding.UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * Defines how the feature is encoded into the input tensor. Defaults to
-       * IDENTITY.
-       * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @param value The encoding to set. - * @return This builder for chaining. - */ - public Builder setEncoding( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Encoding value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - encoding_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * Defines how the feature is encoded into the input tensor. Defaults to
-       * IDENTITY.
-       * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding encoding = 3; - * - * - * @return This builder for chaining. - */ - public Builder clearEncoding() { - bitField0_ = (bitField0_ & ~0x00000004); - encoding_ = 0; - onChanged(); - return this; - } - - private java.lang.Object modality_ = ""; - - /** - * - * - *
-       * Modality of the feature. Valid values are: numeric, image. Defaults to
-       * numeric.
-       * 
- * - * string modality = 4; - * - * @return The modality. - */ - public java.lang.String getModality() { - java.lang.Object ref = modality_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modality_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Modality of the feature. Valid values are: numeric, image. Defaults to
-       * numeric.
-       * 
- * - * string modality = 4; - * - * @return The bytes for modality. - */ - public com.google.protobuf.ByteString getModalityBytes() { - java.lang.Object ref = modality_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modality_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Modality of the feature. Valid values are: numeric, image. Defaults to
-       * numeric.
-       * 
- * - * string modality = 4; - * - * @param value The modality to set. - * @return This builder for chaining. - */ - public Builder setModality(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modality_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * Modality of the feature. Valid values are: numeric, image. Defaults to
-       * numeric.
-       * 
- * - * string modality = 4; - * - * @return This builder for chaining. - */ - public Builder clearModality() { - modality_ = getDefaultInstance().getModality(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-       * Modality of the feature. Valid values are: numeric, image. Defaults to
-       * numeric.
-       * 
- * - * string modality = 4; - * - * @param value The bytes for modality to set. - * @return This builder for chaining. - */ - public Builder setModalityBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modality_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - featureValueDomain_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder> - featureValueDomainBuilder_; - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return Whether the featureValueDomain field is set. - */ - public boolean hasFeatureValueDomain() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - * - * @return The featureValueDomain. - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - getFeatureValueDomain() { - if (featureValueDomainBuilder_ == null) { - return featureValueDomain_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance() - : featureValueDomain_; - } else { - return featureValueDomainBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public Builder setFeatureValueDomain( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - value) { - if (featureValueDomainBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - featureValueDomain_ = value; - } else { - featureValueDomainBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public Builder setFeatureValueDomain( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain.Builder - builderForValue) { - if (featureValueDomainBuilder_ == null) { - featureValueDomain_ = builderForValue.build(); - } else { - featureValueDomainBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public Builder mergeFeatureValueDomain( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - value) { - if (featureValueDomainBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && featureValueDomain_ != null - && featureValueDomain_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain.getDefaultInstance()) { - getFeatureValueDomainBuilder().mergeFrom(value); - } else { - featureValueDomain_ = value; - } - } else { - featureValueDomainBuilder_.mergeFrom(value); - } - if (featureValueDomain_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public Builder clearFeatureValueDomain() { - bitField0_ = (bitField0_ & ~0x00000010); - featureValueDomain_ = null; - if (featureValueDomainBuilder_ != null) { - featureValueDomainBuilder_.dispose(); - featureValueDomainBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder - getFeatureValueDomainBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetFeatureValueDomainFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder - getFeatureValueDomainOrBuilder() { - if (featureValueDomainBuilder_ != null) { - return featureValueDomainBuilder_.getMessageOrBuilder(); - } else { - return featureValueDomain_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .getDefaultInstance() - : featureValueDomain_; - } - } - - /** - * - * - *
-       * The domain details of the input feature value. Like min/max, original
-       * mean or standard deviation if normalized.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain feature_value_domain = 5; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder> - internalGetFeatureValueDomainFieldBuilder() { - if (featureValueDomainBuilder_ == null) { - featureValueDomainBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomain, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.FeatureValueDomain - .Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .FeatureValueDomainOrBuilder>( - getFeatureValueDomain(), getParentForChildren(), isClean()); - featureValueDomain_ = null; - } - return featureValueDomainBuilder_; - } - - private java.lang.Object indicesTensorName_ = ""; - - /** - * - * - *
-       * Specifies the index of the values of the input tensor.
-       * Required when the input tensor is a sparse representation. Refer to
-       * Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string indices_tensor_name = 6; - * - * @return The indicesTensorName. - */ - public java.lang.String getIndicesTensorName() { - java.lang.Object ref = indicesTensorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - indicesTensorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Specifies the index of the values of the input tensor.
-       * Required when the input tensor is a sparse representation. Refer to
-       * Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string indices_tensor_name = 6; - * - * @return The bytes for indicesTensorName. - */ - public com.google.protobuf.ByteString getIndicesTensorNameBytes() { - java.lang.Object ref = indicesTensorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indicesTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Specifies the index of the values of the input tensor.
-       * Required when the input tensor is a sparse representation. Refer to
-       * Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string indices_tensor_name = 6; - * - * @param value The indicesTensorName to set. - * @return This builder for chaining. - */ - public Builder setIndicesTensorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - indicesTensorName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-       * Specifies the index of the values of the input tensor.
-       * Required when the input tensor is a sparse representation. Refer to
-       * Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string indices_tensor_name = 6; - * - * @return This builder for chaining. - */ - public Builder clearIndicesTensorName() { - indicesTensorName_ = getDefaultInstance().getIndicesTensorName(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - /** - * - * - *
-       * Specifies the index of the values of the input tensor.
-       * Required when the input tensor is a sparse representation. Refer to
-       * Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string indices_tensor_name = 6; - * - * @param value The bytes for indicesTensorName to set. - * @return This builder for chaining. - */ - public Builder setIndicesTensorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - indicesTensorName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object denseShapeTensorName_ = ""; - - /** - * - * - *
-       * Specifies the shape of the values of the input if the input is a sparse
-       * representation. Refer to Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The denseShapeTensorName. - */ - public java.lang.String getDenseShapeTensorName() { - java.lang.Object ref = denseShapeTensorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - denseShapeTensorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Specifies the shape of the values of the input if the input is a sparse
-       * representation. Refer to Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string dense_shape_tensor_name = 7; - * - * @return The bytes for denseShapeTensorName. - */ - public com.google.protobuf.ByteString getDenseShapeTensorNameBytes() { - java.lang.Object ref = denseShapeTensorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - denseShapeTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Specifies the shape of the values of the input if the input is a sparse
-       * representation. Refer to Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string dense_shape_tensor_name = 7; - * - * @param value The denseShapeTensorName to set. - * @return This builder for chaining. - */ - public Builder setDenseShapeTensorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - denseShapeTensorName_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-       * Specifies the shape of the values of the input if the input is a sparse
-       * representation. Refer to Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string dense_shape_tensor_name = 7; - * - * @return This builder for chaining. - */ - public Builder clearDenseShapeTensorName() { - denseShapeTensorName_ = getDefaultInstance().getDenseShapeTensorName(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - /** - * - * - *
-       * Specifies the shape of the values of the input if the input is a sparse
-       * representation. Refer to Tensorflow documentation for more details:
-       * https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
-       * 
- * - * string dense_shape_tensor_name = 7; - * - * @param value The bytes for denseShapeTensorName to set. - * @return This builder for chaining. - */ - public Builder setDenseShapeTensorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - denseShapeTensorName_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList indexFeatureMapping_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureIndexFeatureMappingIsMutable() { - if (!indexFeatureMapping_.isModifiable()) { - indexFeatureMapping_ = new com.google.protobuf.LazyStringArrayList(indexFeatureMapping_); - } - bitField0_ |= 0x00000080; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @return A list containing the indexFeatureMapping. - */ - public com.google.protobuf.ProtocolStringList getIndexFeatureMappingList() { - indexFeatureMapping_.makeImmutable(); - return indexFeatureMapping_; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @return The count of indexFeatureMapping. - */ - public int getIndexFeatureMappingCount() { - return indexFeatureMapping_.size(); - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the element to return. - * @return The indexFeatureMapping at the given index. - */ - public java.lang.String getIndexFeatureMapping(int index) { - return indexFeatureMapping_.get(index); - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index of the value to return. - * @return The bytes of the indexFeatureMapping at the given index. - */ - public com.google.protobuf.ByteString getIndexFeatureMappingBytes(int index) { - return indexFeatureMapping_.getByteString(index); - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param index The index to set the value at. - * @param value The indexFeatureMapping to set. - * @return This builder for chaining. - */ - public Builder setIndexFeatureMapping(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIndexFeatureMappingIsMutable(); - indexFeatureMapping_.set(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param value The indexFeatureMapping to add. - * @return This builder for chaining. - */ - public Builder addIndexFeatureMapping(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIndexFeatureMappingIsMutable(); - indexFeatureMapping_.add(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param values The indexFeatureMapping to add. - * @return This builder for chaining. - */ - public Builder addAllIndexFeatureMapping(java.lang.Iterable values) { - ensureIndexFeatureMappingIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexFeatureMapping_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @return This builder for chaining. - */ - public Builder clearIndexFeatureMapping() { - indexFeatureMapping_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of feature names for each index in the input tensor.
-       * Required when the input
-       * [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
-       * is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
-       * 
- * - * repeated string index_feature_mapping = 8; - * - * @param value The bytes of the indexFeatureMapping to add. - * @return This builder for chaining. - */ - public Builder addIndexFeatureMappingBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIndexFeatureMappingIsMutable(); - indexFeatureMapping_.add(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object encodedTensorName_ = ""; - - /** - * - * - *
-       * Encoded tensor is a transformation of the input tensor. Must be provided
-       * if choosing
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-       * or [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-       * and the input tensor is not differentiable.
-       *
-       * An encoded tensor is generated if the input tensor is encoded by a lookup
-       * table.
-       * 
- * - * string encoded_tensor_name = 9; - * - * @return The encodedTensorName. - */ - public java.lang.String getEncodedTensorName() { - java.lang.Object ref = encodedTensorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - encodedTensorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Encoded tensor is a transformation of the input tensor. Must be provided
-       * if choosing
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-       * or [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-       * and the input tensor is not differentiable.
-       *
-       * An encoded tensor is generated if the input tensor is encoded by a lookup
-       * table.
-       * 
- * - * string encoded_tensor_name = 9; - * - * @return The bytes for encodedTensorName. - */ - public com.google.protobuf.ByteString getEncodedTensorNameBytes() { - java.lang.Object ref = encodedTensorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - encodedTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Encoded tensor is a transformation of the input tensor. Must be provided
-       * if choosing
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-       * or [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-       * and the input tensor is not differentiable.
-       *
-       * An encoded tensor is generated if the input tensor is encoded by a lookup
-       * table.
-       * 
- * - * string encoded_tensor_name = 9; - * - * @param value The encodedTensorName to set. - * @return This builder for chaining. - */ - public Builder setEncodedTensorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - encodedTensorName_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-       * Encoded tensor is a transformation of the input tensor. Must be provided
-       * if choosing
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-       * or [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-       * and the input tensor is not differentiable.
-       *
-       * An encoded tensor is generated if the input tensor is encoded by a lookup
-       * table.
-       * 
- * - * string encoded_tensor_name = 9; - * - * @return This builder for chaining. - */ - public Builder clearEncodedTensorName() { - encodedTensorName_ = getDefaultInstance().getEncodedTensorName(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - /** - * - * - *
-       * Encoded tensor is a transformation of the input tensor. Must be provided
-       * if choosing
-       * [Integrated Gradients
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
-       * or [XRAI
-       * attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
-       * and the input tensor is not differentiable.
-       *
-       * An encoded tensor is generated if the input tensor is encoded by a lookup
-       * table.
-       * 
- * - * string encoded_tensor_name = 9; - * - * @param value The bytes for encodedTensorName to set. - * @return This builder for chaining. - */ - public Builder setEncodedTensorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - encodedTensorName_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private java.util.List encodedBaselines_ = - java.util.Collections.emptyList(); - - private void ensureEncodedBaselinesIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - encodedBaselines_ = new java.util.ArrayList(encodedBaselines_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - encodedBaselinesBuilder_; - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public java.util.List getEncodedBaselinesList() { - if (encodedBaselinesBuilder_ == null) { - return java.util.Collections.unmodifiableList(encodedBaselines_); - } else { - return encodedBaselinesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public int getEncodedBaselinesCount() { - if (encodedBaselinesBuilder_ == null) { - return encodedBaselines_.size(); - } else { - return encodedBaselinesBuilder_.getCount(); - } - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public com.google.protobuf.Value getEncodedBaselines(int index) { - if (encodedBaselinesBuilder_ == null) { - return encodedBaselines_.get(index); - } else { - return encodedBaselinesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder setEncodedBaselines(int index, com.google.protobuf.Value value) { - if (encodedBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.set(index, value); - onChanged(); - } else { - encodedBaselinesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder setEncodedBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.set(index, builderForValue.build()); - onChanged(); - } else { - encodedBaselinesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder addEncodedBaselines(com.google.protobuf.Value value) { - if (encodedBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.add(value); - onChanged(); - } else { - encodedBaselinesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder addEncodedBaselines(int index, com.google.protobuf.Value value) { - if (encodedBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.add(index, value); - onChanged(); - } else { - encodedBaselinesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder addEncodedBaselines(com.google.protobuf.Value.Builder builderForValue) { - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.add(builderForValue.build()); - onChanged(); - } else { - encodedBaselinesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder addEncodedBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.add(index, builderForValue.build()); - onChanged(); - } else { - encodedBaselinesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder addAllEncodedBaselines( - java.lang.Iterable values) { - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, encodedBaselines_); - onChanged(); - } else { - encodedBaselinesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder clearEncodedBaselines() { - if (encodedBaselinesBuilder_ == null) { - encodedBaselines_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - encodedBaselinesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public Builder removeEncodedBaselines(int index) { - if (encodedBaselinesBuilder_ == null) { - ensureEncodedBaselinesIsMutable(); - encodedBaselines_.remove(index); - onChanged(); - } else { - encodedBaselinesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public com.google.protobuf.Value.Builder getEncodedBaselinesBuilder(int index) { - return internalGetEncodedBaselinesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public com.google.protobuf.ValueOrBuilder getEncodedBaselinesOrBuilder(int index) { - if (encodedBaselinesBuilder_ == null) { - return encodedBaselines_.get(index); - } else { - return encodedBaselinesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public java.util.List - getEncodedBaselinesOrBuilderList() { - if (encodedBaselinesBuilder_ != null) { - return encodedBaselinesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(encodedBaselines_); - } - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public com.google.protobuf.Value.Builder addEncodedBaselinesBuilder() { - return internalGetEncodedBaselinesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public com.google.protobuf.Value.Builder addEncodedBaselinesBuilder(int index) { - return internalGetEncodedBaselinesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * A list of baselines for the encoded tensor.
-       *
-       * The shape of each baseline should match the shape of the encoded tensor.
-       * If a scalar is provided, Vertex AI broadcasts to the same shape as the
-       * encoded tensor.
-       * 
- * - * repeated .google.protobuf.Value encoded_baselines = 10; - */ - public java.util.List getEncodedBaselinesBuilderList() { - return internalGetEncodedBaselinesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetEncodedBaselinesFieldBuilder() { - if (encodedBaselinesBuilder_ == null) { - encodedBaselinesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - encodedBaselines_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - encodedBaselines_ = null; - } - return encodedBaselinesBuilder_; - } - - private com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - visualization_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .VisualizationOrBuilder> - visualizationBuilder_; - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return Whether the visualization field is set. - */ - public boolean hasVisualization() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - * - * @return The visualization. - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - getVisualization() { - if (visualizationBuilder_ == null) { - return visualization_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance() - : visualization_; - } else { - return visualizationBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public Builder setVisualization( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization value) { - if (visualizationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - visualization_ = value; - } else { - visualizationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public Builder setVisualization( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Builder - builderForValue) { - if (visualizationBuilder_ == null) { - visualization_ = builderForValue.build(); - } else { - visualizationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public Builder mergeVisualization( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization value) { - if (visualizationBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && visualization_ != null - && visualization_ - != com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance()) { - getVisualizationBuilder().mergeFrom(value); - } else { - visualization_ = value; - } - } else { - visualizationBuilder_.mergeFrom(value); - } - if (visualization_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public Builder clearVisualization() { - bitField0_ = (bitField0_ & ~0x00000400); - visualization_ = null; - if (visualizationBuilder_ != null) { - visualizationBuilder_.dispose(); - visualizationBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Builder - getVisualizationBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetVisualizationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.VisualizationOrBuilder - getVisualizationOrBuilder() { - if (visualizationBuilder_ != null) { - return visualizationBuilder_.getMessageOrBuilder(); - } else { - return visualization_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .getDefaultInstance() - : visualization_; - } - } - - /** - * - * - *
-       * Visualization configurations for image explanation.
-       * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Visualization visualization = 11; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization.Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .VisualizationOrBuilder> - internalGetVisualizationFieldBuilder() { - if (visualizationBuilder_ == null) { - visualizationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Visualization - .Builder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .VisualizationOrBuilder>( - getVisualization(), getParentForChildren(), isClean()); - visualization_ = null; - } - return visualizationBuilder_; - } - - private java.lang.Object groupName_ = ""; - - /** - * - * - *
-       * Name of the group that the input belongs to. Features with the same group
-       * name will be treated as one feature when computing attributions. Features
-       * grouped together can have different shapes in value. If provided, there
-       * will be one single attribution generated in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-       * keyed by the group name.
-       * 
- * - * string group_name = 12; - * - * @return The groupName. - */ - public java.lang.String getGroupName() { - java.lang.Object ref = groupName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - groupName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Name of the group that the input belongs to. Features with the same group
-       * name will be treated as one feature when computing attributions. Features
-       * grouped together can have different shapes in value. If provided, there
-       * will be one single attribution generated in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-       * keyed by the group name.
-       * 
- * - * string group_name = 12; - * - * @return The bytes for groupName. - */ - public com.google.protobuf.ByteString getGroupNameBytes() { - java.lang.Object ref = groupName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - groupName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Name of the group that the input belongs to. Features with the same group
-       * name will be treated as one feature when computing attributions. Features
-       * grouped together can have different shapes in value. If provided, there
-       * will be one single attribution generated in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-       * keyed by the group name.
-       * 
- * - * string group_name = 12; - * - * @param value The groupName to set. - * @return This builder for chaining. - */ - public Builder setGroupName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - groupName_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the group that the input belongs to. Features with the same group
-       * name will be treated as one feature when computing attributions. Features
-       * grouped together can have different shapes in value. If provided, there
-       * will be one single attribution generated in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-       * keyed by the group name.
-       * 
- * - * string group_name = 12; - * - * @return This builder for chaining. - */ - public Builder clearGroupName() { - groupName_ = getDefaultInstance().getGroupName(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the group that the input belongs to. Features with the same group
-       * name will be treated as one feature when computing attributions. Features
-       * grouped together can have different shapes in value. If provided, there
-       * will be one single attribution generated in
-       * [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
-       * keyed by the group name.
-       * 
- * - * string group_name = 12; - * - * @param value The bytes for groupName to set. - * @return This builder for chaining. - */ - public Builder setGroupNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - groupName_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata) - private static final com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputMetadata 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.vertexai.api.ExplanationMetadata.InputMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface OutputMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return Whether the indexDisplayNameMapping field is set. - */ - boolean hasIndexDisplayNameMapping(); - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return The indexDisplayNameMapping. - */ - com.google.protobuf.Value getIndexDisplayNameMapping(); - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - com.google.protobuf.ValueOrBuilder getIndexDisplayNameMappingOrBuilder(); - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return Whether the displayNameMappingKey field is set. - */ - boolean hasDisplayNameMappingKey(); - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return The displayNameMappingKey. - */ - java.lang.String getDisplayNameMappingKey(); - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return The bytes for displayNameMappingKey. - */ - com.google.protobuf.ByteString getDisplayNameMappingKeyBytes(); - - /** - * - * - *
-     * Name of the output tensor. Required and is only applicable to Vertex
-     * AI provided images for Tensorflow.
-     * 
- * - * string output_tensor_name = 3; - * - * @return The outputTensorName. - */ - java.lang.String getOutputTensorName(); - - /** - * - * - *
-     * Name of the output tensor. Required and is only applicable to Vertex
-     * AI provided images for Tensorflow.
-     * 
- * - * string output_tensor_name = 3; - * - * @return The bytes for outputTensorName. - */ - com.google.protobuf.ByteString getOutputTensorNameBytes(); - - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.DisplayNameMappingCase - getDisplayNameMappingCase(); - } - - /** - * - * - *
-   * Metadata of the prediction output to be explained.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata} - */ - public static final class OutputMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata) - OutputMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "OutputMetadata"); - } - - // Use OutputMetadata.newBuilder() to construct. - private OutputMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private OutputMetadata() { - outputTensorName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder.class); - } - - private int displayNameMappingCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object displayNameMapping_; - - public enum DisplayNameMappingCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INDEX_DISPLAY_NAME_MAPPING(1), - DISPLAY_NAME_MAPPING_KEY(2), - DISPLAYNAMEMAPPING_NOT_SET(0); - private final int value; - - private DisplayNameMappingCase(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 DisplayNameMappingCase valueOf(int value) { - return forNumber(value); - } - - public static DisplayNameMappingCase forNumber(int value) { - switch (value) { - case 1: - return INDEX_DISPLAY_NAME_MAPPING; - case 2: - return DISPLAY_NAME_MAPPING_KEY; - case 0: - return DISPLAYNAMEMAPPING_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DisplayNameMappingCase getDisplayNameMappingCase() { - return DisplayNameMappingCase.forNumber(displayNameMappingCase_); - } - - public static final int INDEX_DISPLAY_NAME_MAPPING_FIELD_NUMBER = 1; - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return Whether the indexDisplayNameMapping field is set. - */ - @java.lang.Override - public boolean hasIndexDisplayNameMapping() { - return displayNameMappingCase_ == 1; - } - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return The indexDisplayNameMapping. - */ - @java.lang.Override - public com.google.protobuf.Value getIndexDisplayNameMapping() { - if (displayNameMappingCase_ == 1) { - return (com.google.protobuf.Value) displayNameMapping_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - - /** - * - * - *
-     * Static mapping between the index and display name.
-     *
-     * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-     * list of scores of all the classes in a pre-defined order for a
-     * multi-classification Model. It's not feasible if the outputs are
-     * non-deterministic, e.g. the Model produces top-k classes or sort the
-     * outputs by their values.
-     *
-     * The shape of the value must be an n-dimensional array of strings. The
-     * number of dimensions must match that of the outputs to be explained.
-     * The
-     * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-     * is populated by locating in the mapping with
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-     * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getIndexDisplayNameMappingOrBuilder() { - if (displayNameMappingCase_ == 1) { - return (com.google.protobuf.Value) displayNameMapping_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - - public static final int DISPLAY_NAME_MAPPING_KEY_FIELD_NUMBER = 2; - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return Whether the displayNameMappingKey field is set. - */ - public boolean hasDisplayNameMappingKey() { - return displayNameMappingCase_ == 2; - } - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return The displayNameMappingKey. - */ - public java.lang.String getDisplayNameMappingKey() { - java.lang.Object ref = ""; - if (displayNameMappingCase_ == 2) { - ref = displayNameMapping_; - } - 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 (displayNameMappingCase_ == 2) { - displayNameMapping_ = s; - } - return s; - } - } - - /** - * - * - *
-     * Specify a field name in the prediction to look for the display name.
-     *
-     * Use this if the prediction contains the display names for the outputs.
-     *
-     * The display names in the prediction must have the same shape of the
-     * outputs, so that it can be located by
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * for a specific output.
-     * 
- * - * string display_name_mapping_key = 2; - * - * @return The bytes for displayNameMappingKey. - */ - public com.google.protobuf.ByteString getDisplayNameMappingKeyBytes() { - java.lang.Object ref = ""; - if (displayNameMappingCase_ == 2) { - ref = displayNameMapping_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (displayNameMappingCase_ == 2) { - displayNameMapping_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_TENSOR_NAME_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputTensorName_ = ""; - - /** - * - * - *
-     * Name of the output tensor. Required and is only applicable to Vertex
-     * AI provided images for Tensorflow.
-     * 
- * - * string output_tensor_name = 3; - * - * @return The outputTensorName. - */ - @java.lang.Override - public java.lang.String getOutputTensorName() { - java.lang.Object ref = outputTensorName_; - 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(); - outputTensorName_ = s; - return s; - } - } - - /** - * - * - *
-     * Name of the output tensor. Required and is only applicable to Vertex
-     * AI provided images for Tensorflow.
-     * 
- * - * string output_tensor_name = 3; - * - * @return The bytes for outputTensorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputTensorNameBytes() { - java.lang.Object ref = outputTensorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputTensorName_ = 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 (displayNameMappingCase_ == 1) { - output.writeMessage(1, (com.google.protobuf.Value) displayNameMapping_); - } - if (displayNameMappingCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayNameMapping_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputTensorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, outputTensorName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (displayNameMappingCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.protobuf.Value) displayNameMapping_); - } - if (displayNameMappingCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayNameMapping_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputTensorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, outputTensorName_); - } - 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.vertexai.api.ExplanationMetadata.OutputMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata other = - (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) obj; - - if (!getOutputTensorName().equals(other.getOutputTensorName())) return false; - if (!getDisplayNameMappingCase().equals(other.getDisplayNameMappingCase())) return false; - switch (displayNameMappingCase_) { - case 1: - if (!getIndexDisplayNameMapping().equals(other.getIndexDisplayNameMapping())) - return false; - break; - case 2: - if (!getDisplayNameMappingKey().equals(other.getDisplayNameMappingKey())) 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) + OUTPUT_TENSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getOutputTensorName().hashCode(); - switch (displayNameMappingCase_) { - case 1: - hash = (37 * hash) + INDEX_DISPLAY_NAME_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getIndexDisplayNameMapping().hashCode(); - break; - case 2: - hash = (37 * hash) + DISPLAY_NAME_MAPPING_KEY_FIELD_NUMBER; - hash = (53 * hash) + getDisplayNameMappingKey().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata 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.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata 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.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadata.OutputMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Metadata of the prediction output to be explained.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata) - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (indexDisplayNameMappingBuilder_ != null) { - indexDisplayNameMappingBuilder_.clear(); - } - outputTensorName_ = ""; - displayNameMappingCase_ = 0; - displayNameMapping_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata build() { - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata result = - new com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.outputTensorName_ = outputTensorName_; - } - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata result) { - result.displayNameMappingCase_ = displayNameMappingCase_; - result.displayNameMapping_ = this.displayNameMapping_; - if (displayNameMappingCase_ == 1 && indexDisplayNameMappingBuilder_ != null) { - result.displayNameMapping_ = indexDisplayNameMappingBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) { - return mergeFrom( - (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata other) { - if (other - == com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - .getDefaultInstance()) return this; - if (!other.getOutputTensorName().isEmpty()) { - outputTensorName_ = other.outputTensorName_; - bitField0_ |= 0x00000004; - onChanged(); - } - switch (other.getDisplayNameMappingCase()) { - case INDEX_DISPLAY_NAME_MAPPING: - { - mergeIndexDisplayNameMapping(other.getIndexDisplayNameMapping()); - break; - } - case DISPLAY_NAME_MAPPING_KEY: - { - displayNameMappingCase_ = 2; - displayNameMapping_ = other.displayNameMapping_; - onChanged(); - break; - } - case DISPLAYNAMEMAPPING_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( - internalGetIndexDisplayNameMappingFieldBuilder().getBuilder(), - extensionRegistry); - displayNameMappingCase_ = 1; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - displayNameMappingCase_ = 2; - displayNameMapping_ = s; - break; - } // case 18 - case 26: - { - outputTensorName_ = 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 displayNameMappingCase_ = 0; - private java.lang.Object displayNameMapping_; - - public DisplayNameMappingCase getDisplayNameMappingCase() { - return DisplayNameMappingCase.forNumber(displayNameMappingCase_); - } - - public Builder clearDisplayNameMapping() { - displayNameMappingCase_ = 0; - displayNameMapping_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - indexDisplayNameMappingBuilder_; - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return Whether the indexDisplayNameMapping field is set. - */ - @java.lang.Override - public boolean hasIndexDisplayNameMapping() { - return displayNameMappingCase_ == 1; - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - * - * @return The indexDisplayNameMapping. - */ - @java.lang.Override - public com.google.protobuf.Value getIndexDisplayNameMapping() { - if (indexDisplayNameMappingBuilder_ == null) { - if (displayNameMappingCase_ == 1) { - return (com.google.protobuf.Value) displayNameMapping_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } else { - if (displayNameMappingCase_ == 1) { - return indexDisplayNameMappingBuilder_.getMessage(); - } - return com.google.protobuf.Value.getDefaultInstance(); - } - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - public Builder setIndexDisplayNameMapping(com.google.protobuf.Value value) { - if (indexDisplayNameMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - displayNameMapping_ = value; - onChanged(); - } else { - indexDisplayNameMappingBuilder_.setMessage(value); - } - displayNameMappingCase_ = 1; - return this; - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - public Builder setIndexDisplayNameMapping(com.google.protobuf.Value.Builder builderForValue) { - if (indexDisplayNameMappingBuilder_ == null) { - displayNameMapping_ = builderForValue.build(); - onChanged(); - } else { - indexDisplayNameMappingBuilder_.setMessage(builderForValue.build()); - } - displayNameMappingCase_ = 1; - return this; - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - public Builder mergeIndexDisplayNameMapping(com.google.protobuf.Value value) { - if (indexDisplayNameMappingBuilder_ == null) { - if (displayNameMappingCase_ == 1 - && displayNameMapping_ != com.google.protobuf.Value.getDefaultInstance()) { - displayNameMapping_ = - com.google.protobuf.Value.newBuilder( - (com.google.protobuf.Value) displayNameMapping_) - .mergeFrom(value) - .buildPartial(); - } else { - displayNameMapping_ = value; - } - onChanged(); - } else { - if (displayNameMappingCase_ == 1) { - indexDisplayNameMappingBuilder_.mergeFrom(value); - } else { - indexDisplayNameMappingBuilder_.setMessage(value); - } - } - displayNameMappingCase_ = 1; - return this; - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - public Builder clearIndexDisplayNameMapping() { - if (indexDisplayNameMappingBuilder_ == null) { - if (displayNameMappingCase_ == 1) { - displayNameMappingCase_ = 0; - displayNameMapping_ = null; - onChanged(); - } - } else { - if (displayNameMappingCase_ == 1) { - displayNameMappingCase_ = 0; - displayNameMapping_ = null; - } - indexDisplayNameMappingBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - public com.google.protobuf.Value.Builder getIndexDisplayNameMappingBuilder() { - return internalGetIndexDisplayNameMappingFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getIndexDisplayNameMappingOrBuilder() { - if ((displayNameMappingCase_ == 1) && (indexDisplayNameMappingBuilder_ != null)) { - return indexDisplayNameMappingBuilder_.getMessageOrBuilder(); - } else { - if (displayNameMappingCase_ == 1) { - return (com.google.protobuf.Value) displayNameMapping_; - } - return com.google.protobuf.Value.getDefaultInstance(); - } - } - - /** - * - * - *
-       * Static mapping between the index and display name.
-       *
-       * Use this if the outputs are a deterministic n-dimensional array, e.g. a
-       * list of scores of all the classes in a pre-defined order for a
-       * multi-classification Model. It's not feasible if the outputs are
-       * non-deterministic, e.g. the Model produces top-k classes or sort the
-       * outputs by their values.
-       *
-       * The shape of the value must be an n-dimensional array of strings. The
-       * number of dimensions must match that of the outputs to be explained.
-       * The
-       * [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
-       * is populated by locating in the mapping with
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
-       * 
- * - * .google.protobuf.Value index_display_name_mapping = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetIndexDisplayNameMappingFieldBuilder() { - if (indexDisplayNameMappingBuilder_ == null) { - if (!(displayNameMappingCase_ == 1)) { - displayNameMapping_ = com.google.protobuf.Value.getDefaultInstance(); - } - indexDisplayNameMappingBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - (com.google.protobuf.Value) displayNameMapping_, - getParentForChildren(), - isClean()); - displayNameMapping_ = null; - } - displayNameMappingCase_ = 1; - onChanged(); - return indexDisplayNameMappingBuilder_; - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @return Whether the displayNameMappingKey field is set. - */ - @java.lang.Override - public boolean hasDisplayNameMappingKey() { - return displayNameMappingCase_ == 2; - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @return The displayNameMappingKey. - */ - @java.lang.Override - public java.lang.String getDisplayNameMappingKey() { - java.lang.Object ref = ""; - if (displayNameMappingCase_ == 2) { - ref = displayNameMapping_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (displayNameMappingCase_ == 2) { - displayNameMapping_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @return The bytes for displayNameMappingKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameMappingKeyBytes() { - java.lang.Object ref = ""; - if (displayNameMappingCase_ == 2) { - ref = displayNameMapping_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (displayNameMappingCase_ == 2) { - displayNameMapping_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @param value The displayNameMappingKey to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameMappingKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - displayNameMappingCase_ = 2; - displayNameMapping_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @return This builder for chaining. - */ - public Builder clearDisplayNameMappingKey() { - if (displayNameMappingCase_ == 2) { - displayNameMappingCase_ = 0; - displayNameMapping_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Specify a field name in the prediction to look for the display name.
-       *
-       * Use this if the prediction contains the display names for the outputs.
-       *
-       * The display names in the prediction must have the same shape of the
-       * outputs, so that it can be located by
-       * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-       * for a specific output.
-       * 
- * - * string display_name_mapping_key = 2; - * - * @param value The bytes for displayNameMappingKey to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameMappingKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - displayNameMappingCase_ = 2; - displayNameMapping_ = value; - onChanged(); - return this; - } - - private java.lang.Object outputTensorName_ = ""; - - /** - * - * - *
-       * Name of the output tensor. Required and is only applicable to Vertex
-       * AI provided images for Tensorflow.
-       * 
- * - * string output_tensor_name = 3; - * - * @return The outputTensorName. - */ - public java.lang.String getOutputTensorName() { - java.lang.Object ref = outputTensorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputTensorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Name of the output tensor. Required and is only applicable to Vertex
-       * AI provided images for Tensorflow.
-       * 
- * - * string output_tensor_name = 3; - * - * @return The bytes for outputTensorName. - */ - public com.google.protobuf.ByteString getOutputTensorNameBytes() { - java.lang.Object ref = outputTensorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputTensorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Name of the output tensor. Required and is only applicable to Vertex
-       * AI provided images for Tensorflow.
-       * 
- * - * string output_tensor_name = 3; - * - * @param value The outputTensorName to set. - * @return This builder for chaining. - */ - public Builder setOutputTensorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputTensorName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the output tensor. Required and is only applicable to Vertex
-       * AI provided images for Tensorflow.
-       * 
- * - * string output_tensor_name = 3; - * - * @return This builder for chaining. - */ - public Builder clearOutputTensorName() { - outputTensorName_ = getDefaultInstance().getOutputTensorName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Name of the output tensor. Required and is only applicable to Vertex
-       * AI provided images for Tensorflow.
-       * 
- * - * string output_tensor_name = 3; - * - * @param value The bytes for outputTensorName to set. - * @return This builder for chaining. - */ - public Builder setOutputTensorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputTensorName_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata) - private static final com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputMetadata 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.vertexai.api.ExplanationMetadata.OutputMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int INPUTS_FIELD_NUMBER = 1; - - private static final class InputsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - .getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - inputs_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - internalGetInputs() { - if (inputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(InputsDefaultEntryHolder.defaultEntry); - } - return inputs_; - } - - public int getInputsCount() { - return internalGetInputs().getMap().size(); - } - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetInputs().getMap().containsKey(key); - } - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - getInputs() { - return getInputsMap(); - } - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - getInputsMap() { - return internalGetInputs().getMap(); - } - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetInputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata getInputsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetInputs().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int OUTPUTS_FIELD_NUMBER = 2; - - private static final class OutputsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - .getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - outputs_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - internalGetOutputs() { - if (outputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(OutputsDefaultEntryHolder.defaultEntry); - } - return outputs_; - } - - public int getOutputsCount() { - return internalGetOutputs().getMap().size(); - } - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsOutputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetOutputs().getMap().containsKey(key); - } - - /** Use {@link #getOutputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - getOutputs() { - return getOutputsMap(); - } - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - getOutputsMap() { - return internalGetOutputs().getMap(); - } - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - getOutputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - map = internalGetOutputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata getOutputsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - map = internalGetOutputs().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int FEATURE_ATTRIBUTIONS_SCHEMA_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object featureAttributionsSchemaUri_ = ""; - - /** - * - * - *
-   * Points to a YAML file stored on Google Cloud Storage describing the format
-   * of the [feature
-   * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-   * The schema is defined as an OpenAPI 3.0.2 [Schema
-   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-   * AutoML tabular Models always have this field populated by Vertex AI.
-   * Note: The URI given on output may be different, including the URI scheme,
-   * than the one given on input. The output URI will point to a location where
-   * the user only has a read access.
-   * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The featureAttributionsSchemaUri. - */ - @java.lang.Override - public java.lang.String getFeatureAttributionsSchemaUri() { - java.lang.Object ref = featureAttributionsSchemaUri_; - 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(); - featureAttributionsSchemaUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Points to a YAML file stored on Google Cloud Storage describing the format
-   * of the [feature
-   * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-   * The schema is defined as an OpenAPI 3.0.2 [Schema
-   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-   * AutoML tabular Models always have this field populated by Vertex AI.
-   * Note: The URI given on output may be different, including the URI scheme,
-   * than the one given on input. The output URI will point to a location where
-   * the user only has a read access.
-   * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The bytes for featureAttributionsSchemaUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFeatureAttributionsSchemaUriBytes() { - java.lang.Object ref = featureAttributionsSchemaUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - featureAttributionsSchemaUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LATENT_SPACE_SOURCE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object latentSpaceSource_ = ""; - - /** - * - * - *
-   * Name of the source to generate embeddings for example based explanations.
-   * 
- * - * string latent_space_source = 5; - * - * @return The latentSpaceSource. - */ - @java.lang.Override - public java.lang.String getLatentSpaceSource() { - java.lang.Object ref = latentSpaceSource_; - 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(); - latentSpaceSource_ = s; - return s; - } - } - - /** - * - * - *
-   * Name of the source to generate embeddings for example based explanations.
-   * 
- * - * string latent_space_source = 5; - * - * @return The bytes for latentSpaceSource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLatentSpaceSourceBytes() { - java.lang.Object ref = latentSpaceSource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - latentSpaceSource_ = 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 { - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetInputs(), InputsDefaultEntryHolder.defaultEntry, 1); - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetOutputs(), OutputsDefaultEntryHolder.defaultEntry, 2); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(featureAttributionsSchemaUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, featureAttributionsSchemaUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(latentSpaceSource_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, latentSpaceSource_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - entry : internalGetInputs().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - inputs__ = - InputsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, inputs__); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - entry : internalGetOutputs().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - outputs__ = - OutputsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, outputs__); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(featureAttributionsSchemaUri_)) { - size += - com.google.protobuf.GeneratedMessage.computeStringSize(3, featureAttributionsSchemaUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(latentSpaceSource_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, latentSpaceSource_); - } - 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.vertexai.api.ExplanationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadata other = - (com.google.cloud.vertexai.api.ExplanationMetadata) obj; - - if (!internalGetInputs().equals(other.internalGetInputs())) return false; - if (!internalGetOutputs().equals(other.internalGetOutputs())) return false; - if (!getFeatureAttributionsSchemaUri().equals(other.getFeatureAttributionsSchemaUri())) - return false; - if (!getLatentSpaceSource().equals(other.getLatentSpaceSource())) 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 (!internalGetInputs().getMap().isEmpty()) { - hash = (37 * hash) + INPUTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetInputs().hashCode(); - } - if (!internalGetOutputs().getMap().isEmpty()) { - hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetOutputs().hashCode(); - } - hash = (37 * hash) + FEATURE_ATTRIBUTIONS_SCHEMA_URI_FIELD_NUMBER; - hash = (53 * hash) + getFeatureAttributionsSchemaUri().hashCode(); - hash = (37 * hash) + LATENT_SPACE_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getLatentSpaceSource().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata 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.vertexai.api.ExplanationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata 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.vertexai.api.ExplanationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Metadata describing the Model's input and output for explanation.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadata) - com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetInputs(); - case 2: - return internalGetOutputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableInputs(); - case 2: - return internalGetMutableOutputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadata.class, - com.google.cloud.vertexai.api.ExplanationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplanationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableInputs().clear(); - internalGetMutableOutputs().clear(); - featureAttributionsSchemaUri_ = ""; - latentSpaceSource_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata build() { - com.google.cloud.vertexai.api.ExplanationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadata result = - new com.google.cloud.vertexai.api.ExplanationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplanationMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputs_ = internalGetInputs().build(InputsDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.outputs_ = internalGetOutputs().build(OutputsDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.featureAttributionsSchemaUri_ = featureAttributionsSchemaUri_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.latentSpaceSource_ = latentSpaceSource_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplanationMetadata other) { - if (other == com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance()) - return this; - internalGetMutableInputs().mergeFrom(other.internalGetInputs()); - bitField0_ |= 0x00000001; - internalGetMutableOutputs().mergeFrom(other.internalGetOutputs()); - bitField0_ |= 0x00000002; - if (!other.getFeatureAttributionsSchemaUri().isEmpty()) { - featureAttributionsSchemaUri_ = other.featureAttributionsSchemaUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getLatentSpaceSource().isEmpty()) { - latentSpaceSource_ = other.latentSpaceSource_; - 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: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - inputs__ = - input.readMessage( - InputsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableInputs() - .ensureBuilderMap() - .put(inputs__.getKey(), inputs__.getValue()); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - outputs__ = - input.readMessage( - OutputsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableOutputs() - .ensureBuilderMap() - .put(outputs__.getKey(), outputs__.getValue()); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - featureAttributionsSchemaUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 42: - { - latentSpaceSource_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - 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 static final class InputsConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> { - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata build( - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder val) { - if (val instanceof com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) { - return (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) val; - } - return ((com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder) val) - .build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - defaultEntry() { - return InputsDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final InputsConverter inputsConverter = new InputsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> - inputs_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> - internalGetInputs() { - if (inputs_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(inputsConverter); - } - return inputs_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> - internalGetMutableInputs() { - if (inputs_ == null) { - inputs_ = new com.google.protobuf.MapFieldBuilder<>(inputsConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return inputs_; - } - - public int getInputsCount() { - return internalGetInputs().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetInputs().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - getInputs() { - return getInputsMap(); - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - getInputsMap() { - return internalGetInputs().getImmutableMap(); - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata - getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> - map = internalGetMutableInputs().ensureBuilderMap(); - return map.containsKey(key) ? inputsConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata getInputsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> - map = internalGetMutableInputs().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return inputsConverter.build(map.get(key)); - } - - public Builder clearInputs() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableInputs().clear(); - return this; - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableInputs().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - getMutableInputs() { - bitField0_ |= 0x00000001; - return internalGetMutableInputs().ensureMessageMap(); - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putInputs( - java.lang.String key, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableInputs().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000001; - return this; - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putAllInputs( - java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - values) { - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableInputs().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - /** - * - * - *
-     * Required. Map from feature names to feature input metadata. Keys are the
-     * name of the features. Values are the specification of the feature.
-     *
-     * An empty InputMetadata is valid. It describes a text feature which has the
-     * name specified as the key in
-     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * The baseline of the empty feature is chosen by Vertex AI.
-     *
-     * For Vertex AI-provided Tensorflow images, the key can be any friendly
-     * name of the feature. Once specified,
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * are keyed by this key (if not grouped with another feature).
-     *
-     * For custom images, the key must match with the key in
-     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder - putInputsBuilderIfAbsent(java.lang.String key) { - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> - builderMap = internalGetMutableInputs().ensureBuilderMap(); - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder entry = - builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) { - entry = - ((com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder) entry; - } - - private static final class OutputsConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> { - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata build( - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder val) { - if (val instanceof com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) { - return (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) val; - } - return ((com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder) val) - .build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - defaultEntry() { - return OutputsDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final OutputsConverter outputsConverter = new OutputsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> - outputs_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> - internalGetOutputs() { - if (outputs_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(outputsConverter); - } - return outputs_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> - internalGetMutableOutputs() { - if (outputs_ == null) { - outputs_ = new com.google.protobuf.MapFieldBuilder<>(outputsConverter); - } - bitField0_ |= 0x00000002; - onChanged(); - return outputs_; - } - - public int getOutputsCount() { - return internalGetOutputs().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsOutputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetOutputs().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getOutputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - getOutputs() { - return getOutputsMap(); - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - getOutputsMap() { - return internalGetOutputs().getImmutableMap(); - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata - getOutputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> - map = internalGetMutableOutputs().ensureBuilderMap(); - return map.containsKey(key) ? outputsConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata getOutputsOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> - map = internalGetMutableOutputs().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return outputsConverter.build(map.get(key)); - } - - public Builder clearOutputs() { - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableOutputs().clear(); - return this; - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeOutputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableOutputs().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - getMutableOutputs() { - bitField0_ |= 0x00000002; - return internalGetMutableOutputs().ensureMessageMap(); - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putOutputs( - java.lang.String key, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableOutputs().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000002; - return this; - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putAllOutputs( - java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - values) { - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableOutputs().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000002; - return this; - } - - /** - * - * - *
-     * Required. Map from output names to output metadata.
-     *
-     * For Vertex AI-provided Tensorflow images, keys can be any user defined
-     * string that consists of any UTF-8 characters.
-     *
-     * For custom images, keys are the name of the output field in the prediction
-     * to be explained.
-     *
-     * Currently only one key is allowed.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder - putOutputsBuilderIfAbsent(java.lang.String key) { - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> - builderMap = internalGetMutableOutputs().ensureBuilderMap(); - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder entry = - builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) { - entry = - ((com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder) entry; - } - - private java.lang.Object featureAttributionsSchemaUri_ = ""; - - /** - * - * - *
-     * Points to a YAML file stored on Google Cloud Storage describing the format
-     * of the [feature
-     * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     * The schema is defined as an OpenAPI 3.0.2 [Schema
-     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-     * AutoML tabular Models always have this field populated by Vertex AI.
-     * Note: The URI given on output may be different, including the URI scheme,
-     * than the one given on input. The output URI will point to a location where
-     * the user only has a read access.
-     * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The featureAttributionsSchemaUri. - */ - public java.lang.String getFeatureAttributionsSchemaUri() { - java.lang.Object ref = featureAttributionsSchemaUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - featureAttributionsSchemaUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Points to a YAML file stored on Google Cloud Storage describing the format
-     * of the [feature
-     * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     * The schema is defined as an OpenAPI 3.0.2 [Schema
-     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-     * AutoML tabular Models always have this field populated by Vertex AI.
-     * Note: The URI given on output may be different, including the URI scheme,
-     * than the one given on input. The output URI will point to a location where
-     * the user only has a read access.
-     * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The bytes for featureAttributionsSchemaUri. - */ - public com.google.protobuf.ByteString getFeatureAttributionsSchemaUriBytes() { - java.lang.Object ref = featureAttributionsSchemaUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - featureAttributionsSchemaUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Points to a YAML file stored on Google Cloud Storage describing the format
-     * of the [feature
-     * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     * The schema is defined as an OpenAPI 3.0.2 [Schema
-     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-     * AutoML tabular Models always have this field populated by Vertex AI.
-     * Note: The URI given on output may be different, including the URI scheme,
-     * than the one given on input. The output URI will point to a location where
-     * the user only has a read access.
-     * 
- * - * string feature_attributions_schema_uri = 3; - * - * @param value The featureAttributionsSchemaUri to set. - * @return This builder for chaining. - */ - public Builder setFeatureAttributionsSchemaUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - featureAttributionsSchemaUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Points to a YAML file stored on Google Cloud Storage describing the format
-     * of the [feature
-     * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     * The schema is defined as an OpenAPI 3.0.2 [Schema
-     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-     * AutoML tabular Models always have this field populated by Vertex AI.
-     * Note: The URI given on output may be different, including the URI scheme,
-     * than the one given on input. The output URI will point to a location where
-     * the user only has a read access.
-     * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return This builder for chaining. - */ - public Builder clearFeatureAttributionsSchemaUri() { - featureAttributionsSchemaUri_ = getDefaultInstance().getFeatureAttributionsSchemaUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Points to a YAML file stored on Google Cloud Storage describing the format
-     * of the [feature
-     * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-     * The schema is defined as an OpenAPI 3.0.2 [Schema
-     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-     * AutoML tabular Models always have this field populated by Vertex AI.
-     * Note: The URI given on output may be different, including the URI scheme,
-     * than the one given on input. The output URI will point to a location where
-     * the user only has a read access.
-     * 
- * - * string feature_attributions_schema_uri = 3; - * - * @param value The bytes for featureAttributionsSchemaUri to set. - * @return This builder for chaining. - */ - public Builder setFeatureAttributionsSchemaUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - featureAttributionsSchemaUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object latentSpaceSource_ = ""; - - /** - * - * - *
-     * Name of the source to generate embeddings for example based explanations.
-     * 
- * - * string latent_space_source = 5; - * - * @return The latentSpaceSource. - */ - public java.lang.String getLatentSpaceSource() { - java.lang.Object ref = latentSpaceSource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - latentSpaceSource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Name of the source to generate embeddings for example based explanations.
-     * 
- * - * string latent_space_source = 5; - * - * @return The bytes for latentSpaceSource. - */ - public com.google.protobuf.ByteString getLatentSpaceSourceBytes() { - java.lang.Object ref = latentSpaceSource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - latentSpaceSource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Name of the source to generate embeddings for example based explanations.
-     * 
- * - * string latent_space_source = 5; - * - * @param value The latentSpaceSource to set. - * @return This builder for chaining. - */ - public Builder setLatentSpaceSource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - latentSpaceSource_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Name of the source to generate embeddings for example based explanations.
-     * 
- * - * string latent_space_source = 5; - * - * @return This builder for chaining. - */ - public Builder clearLatentSpaceSource() { - latentSpaceSource_ = getDefaultInstance().getLatentSpaceSource(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Name of the source to generate embeddings for example based explanations.
-     * 
- * - * string latent_space_source = 5; - * - * @param value The bytes for latentSpaceSource to set. - * @return This builder for chaining. - */ - public Builder setLatentSpaceSourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - latentSpaceSource_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadata) - private static final com.google.cloud.vertexai.api.ExplanationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationMetadata(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplanationMetadata 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.vertexai.api.ExplanationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java deleted file mode 100644 index 851ba65bf0cd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getInputsCount(); - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - boolean containsInputs(java.lang.String key); - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getInputs(); - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.Map - getInputsMap(); - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata defaultValue); - - /** - * - * - *
-   * Required. Map from feature names to feature input metadata. Keys are the
-   * name of the features. Values are the specification of the feature.
-   *
-   * An empty InputMetadata is valid. It describes a text feature which has the
-   * name specified as the key in
-   * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-   * The baseline of the empty feature is chosen by Vertex AI.
-   *
-   * For Vertex AI-provided Tensorflow images, the key can be any friendly
-   * name of the feature. Once specified,
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * are keyed by this key (if not grouped with another feature).
-   *
-   * For custom images, the key must match with the key in
-   * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata getInputsOrThrow( - java.lang.String key); - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getOutputsCount(); - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - boolean containsOutputs(java.lang.String key); - - /** Use {@link #getOutputsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getOutputs(); - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.Map - getOutputsMap(); - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata getOutputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata defaultValue); - - /** - * - * - *
-   * Required. Map from output names to output metadata.
-   *
-   * For Vertex AI-provided Tensorflow images, keys can be any user defined
-   * string that consists of any UTF-8 characters.
-   *
-   * For custom images, keys are the name of the output field in the prediction
-   * to be explained.
-   *
-   * Currently only one key is allowed.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata getOutputsOrThrow( - java.lang.String key); - - /** - * - * - *
-   * Points to a YAML file stored on Google Cloud Storage describing the format
-   * of the [feature
-   * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-   * The schema is defined as an OpenAPI 3.0.2 [Schema
-   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-   * AutoML tabular Models always have this field populated by Vertex AI.
-   * Note: The URI given on output may be different, including the URI scheme,
-   * than the one given on input. The output URI will point to a location where
-   * the user only has a read access.
-   * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The featureAttributionsSchemaUri. - */ - java.lang.String getFeatureAttributionsSchemaUri(); - - /** - * - * - *
-   * Points to a YAML file stored on Google Cloud Storage describing the format
-   * of the [feature
-   * attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
-   * The schema is defined as an OpenAPI 3.0.2 [Schema
-   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
-   * AutoML tabular Models always have this field populated by Vertex AI.
-   * Note: The URI given on output may be different, including the URI scheme,
-   * than the one given on input. The output URI will point to a location where
-   * the user only has a read access.
-   * 
- * - * string feature_attributions_schema_uri = 3; - * - * @return The bytes for featureAttributionsSchemaUri. - */ - com.google.protobuf.ByteString getFeatureAttributionsSchemaUriBytes(); - - /** - * - * - *
-   * Name of the source to generate embeddings for example based explanations.
-   * 
- * - * string latent_space_source = 5; - * - * @return The latentSpaceSource. - */ - java.lang.String getLatentSpaceSource(); - - /** - * - * - *
-   * Name of the source to generate embeddings for example based explanations.
-   * 
- * - * string latent_space_source = 5; - * - * @return The bytes for latentSpaceSource. - */ - com.google.protobuf.ByteString getLatentSpaceSourceBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java deleted file mode 100644 index 79cd32d5e57d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java +++ /dev/null @@ -1,2142 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata]
- * entries that can be overridden at [online
- * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadataOverride} - */ -@com.google.protobuf.Generated -public final class ExplanationMetadataOverride extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadataOverride) - ExplanationMetadataOverrideOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationMetadataOverride"); - } - - // Use ExplanationMetadataOverride.newBuilder() to construct. - private ExplanationMetadataOverride(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplanationMetadataOverride() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetInputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.class, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder.class); - } - - public interface InputMetadataOverrideOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - java.util.List getInputBaselinesList(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - com.google.protobuf.Value getInputBaselines(int index); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - int getInputBaselinesCount(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - java.util.List getInputBaselinesOrBuilderList(); - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index); - } - - /** - * - * - *
-   * The [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-   * entries to be overridden.
-   * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride} - */ - public static final class InputMetadataOverride extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride) - InputMetadataOverrideOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "InputMetadataOverride"); - } - - // Use InputMetadataOverride.newBuilder() to construct. - private InputMetadataOverride(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private InputMetadataOverride() { - inputBaselines_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.class, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .Builder.class); - } - - public static final int INPUT_BASELINES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List inputBaselines_; - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public java.util.List getInputBaselinesList() { - return inputBaselines_; - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public java.util.List - getInputBaselinesOrBuilderList() { - return inputBaselines_; - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public int getInputBaselinesCount() { - return inputBaselines_.size(); - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public com.google.protobuf.Value getInputBaselines(int index) { - return inputBaselines_.get(index); - } - - /** - * - * - *
-     * Baseline inputs for this feature.
-     *
-     * This overrides the `input_baseline` field of the
-     * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * object of the corresponding feature's input metadata. If it's not
-     * specified, the original baselines are not overridden.
-     * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index) { - return inputBaselines_.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 < inputBaselines_.size(); i++) { - output.writeMessage(1, inputBaselines_.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 < inputBaselines_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, inputBaselines_.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.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride other = - (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) obj; - - if (!getInputBaselinesList().equals(other.getInputBaselinesList())) 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 (getInputBaselinesCount() > 0) { - hash = (37 * hash) + INPUT_BASELINES_FIELD_NUMBER; - hash = (53 * hash) + getInputBaselinesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - 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.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - 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.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-     * entries to be overridden.
-     * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride) - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverrideOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .class, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (inputBaselinesBuilder_ == null) { - inputBaselines_ = java.util.Collections.emptyList(); - } else { - inputBaselines_ = null; - inputBaselinesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - build() { - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride result = - new com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride( - this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride result) { - if (inputBaselinesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - inputBaselines_ = java.util.Collections.unmodifiableList(inputBaselines_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inputBaselines_ = inputBaselines_; - } else { - result.inputBaselines_ = inputBaselinesBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) { - return mergeFrom( - (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride other) { - if (other - == com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .getDefaultInstance()) return this; - if (inputBaselinesBuilder_ == null) { - if (!other.inputBaselines_.isEmpty()) { - if (inputBaselines_.isEmpty()) { - inputBaselines_ = other.inputBaselines_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInputBaselinesIsMutable(); - inputBaselines_.addAll(other.inputBaselines_); - } - onChanged(); - } - } else { - if (!other.inputBaselines_.isEmpty()) { - if (inputBaselinesBuilder_.isEmpty()) { - inputBaselinesBuilder_.dispose(); - inputBaselinesBuilder_ = null; - inputBaselines_ = other.inputBaselines_; - bitField0_ = (bitField0_ & ~0x00000001); - inputBaselinesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInputBaselinesFieldBuilder() - : null; - } else { - inputBaselinesBuilder_.addAllMessages(other.inputBaselines_); - } - } - } - 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.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(m); - } else { - inputBaselinesBuilder_.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 inputBaselines_ = - java.util.Collections.emptyList(); - - private void ensureInputBaselinesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inputBaselines_ = new java.util.ArrayList(inputBaselines_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - inputBaselinesBuilder_; - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List getInputBaselinesList() { - if (inputBaselinesBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputBaselines_); - } else { - return inputBaselinesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public int getInputBaselinesCount() { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.size(); - } else { - return inputBaselinesBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value getInputBaselines(int index) { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.get(index); - } else { - return inputBaselinesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder setInputBaselines(int index, com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.set(index, value); - onChanged(); - } else { - inputBaselinesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder setInputBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.set(index, builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.add(value); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(int index, com.google.protobuf.Value value) { - if (inputBaselinesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputBaselinesIsMutable(); - inputBaselines_.add(index, value); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines(com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addInputBaselines( - int index, com.google.protobuf.Value.Builder builderForValue) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.add(index, builderForValue.build()); - onChanged(); - } else { - inputBaselinesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder addAllInputBaselines( - java.lang.Iterable values) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputBaselines_); - onChanged(); - } else { - inputBaselinesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder clearInputBaselines() { - if (inputBaselinesBuilder_ == null) { - inputBaselines_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - inputBaselinesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public Builder removeInputBaselines(int index) { - if (inputBaselinesBuilder_ == null) { - ensureInputBaselinesIsMutable(); - inputBaselines_.remove(index); - onChanged(); - } else { - inputBaselinesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder getInputBaselinesBuilder(int index) { - return internalGetInputBaselinesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.ValueOrBuilder getInputBaselinesOrBuilder(int index) { - if (inputBaselinesBuilder_ == null) { - return inputBaselines_.get(index); - } else { - return inputBaselinesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List - getInputBaselinesOrBuilderList() { - if (inputBaselinesBuilder_ != null) { - return inputBaselinesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputBaselines_); - } - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder addInputBaselinesBuilder() { - return internalGetInputBaselinesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public com.google.protobuf.Value.Builder addInputBaselinesBuilder(int index) { - return internalGetInputBaselinesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-       * Baseline inputs for this feature.
-       *
-       * This overrides the `input_baseline` field of the
-       * [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
-       * object of the corresponding feature's input metadata. If it's not
-       * specified, the original baselines are not overridden.
-       * 
- * - * repeated .google.protobuf.Value input_baselines = 1; - */ - public java.util.List getInputBaselinesBuilderList() { - return internalGetInputBaselinesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInputBaselinesFieldBuilder() { - if (inputBaselinesBuilder_ == null) { - inputBaselinesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - inputBaselines_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - inputBaselines_ = null; - } - return inputBaselinesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride) - private static final com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverride - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputMetadataOverride 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.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int INPUTS_FIELD_NUMBER = 1; - - private static final class InputsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverride.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - inputs_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - internalGetInputs() { - if (inputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(InputsDefaultEntryHolder.defaultEntry); - } - return inputs_; - } - - public int getInputsCount() { - return internalGetInputs().getMap().size(); - } - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetInputs().getMap().containsKey(key); - } - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputs() { - return getInputsMap(); - } - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputsMap() { - return internalGetInputs().getMap(); - } - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverride - getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - map = internalGetInputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getInputsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - map = internalGetInputs().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 { - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetInputs(), InputsDefaultEntryHolder.defaultEntry, 1); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - entry : internalGetInputs().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - inputs__ = - InputsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, inputs__); - } - 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.vertexai.api.ExplanationMetadataOverride)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationMetadataOverride other = - (com.google.cloud.vertexai.api.ExplanationMetadataOverride) obj; - - if (!internalGetInputs().equals(other.internalGetInputs())) 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 (!internalGetInputs().getMap().isEmpty()) { - hash = (37 * hash) + INPUTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetInputs().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride 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.vertexai.api.ExplanationMetadataOverride parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride 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.vertexai.api.ExplanationMetadataOverride parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationMetadataOverride 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata]
-   * entries that can be overridden at [online
-   * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationMetadataOverride} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationMetadataOverride) - com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetInputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 1: - return internalGetMutableInputs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.class, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplanationMetadataOverride.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - internalGetMutableInputs().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride build() { - com.google.cloud.vertexai.api.ExplanationMetadataOverride result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride buildPartial() { - com.google.cloud.vertexai.api.ExplanationMetadataOverride result = - new com.google.cloud.vertexai.api.ExplanationMetadataOverride(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplanationMetadataOverride result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputs_ = internalGetInputs().build(InputsDefaultEntryHolder.defaultEntry); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationMetadataOverride) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationMetadataOverride) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplanationMetadataOverride other) { - if (other == com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance()) - return this; - internalGetMutableInputs().mergeFrom(other.internalGetInputs()); - bitField0_ |= 0x00000001; - 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.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverride> - inputs__ = - input.readMessage( - InputsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableInputs() - .ensureBuilderMap() - .put(inputs__.getKey(), inputs__.getValue()); - 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 static final class InputsConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> { - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride build( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverrideOrBuilder - val) { - if (val - instanceof - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) { - return (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) - val; - } - return ((com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .Builder) - val) - .build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - defaultEntry() { - return InputsDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final InputsConverter inputsConverter = new InputsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> - inputs_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> - internalGetInputs() { - if (inputs_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(inputsConverter); - } - return inputs_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> - internalGetMutableInputs() { - if (inputs_ == null) { - inputs_ = new com.google.protobuf.MapFieldBuilder<>(inputsConverter); - } - bitField0_ |= 0x00000001; - onChanged(); - return inputs_; - } - - public int getInputsCount() { - return internalGetInputs().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetInputs().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputs() { - return getInputsMap(); - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputsMap() { - return internalGetInputs().getImmutableMap(); - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverride - getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder> - map = internalGetMutableInputs().ensureBuilderMap(); - return map.containsKey(key) ? inputsConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getInputsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder> - map = internalGetMutableInputs().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return inputsConverter.build(map.get(key)); - } - - public Builder clearInputs() { - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableInputs().clear(); - return this; - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeInputs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableInputs().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getMutableInputs() { - bitField0_ |= 0x00000001; - return internalGetMutableInputs().ensureMessageMap(); - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putInputs( - java.lang.String key, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableInputs().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000001; - return this; - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putAllInputs( - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - values) { - for (java.util.Map.Entry< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableInputs().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000001; - return this; - } - - /** - * - * - *
-     * Required. Overrides the [input
-     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-     * features. The key is the name of the feature to be overridden. The keys
-     * specified here must exist in the input metadata to be overridden. If a
-     * feature is not specified here, the corresponding feature's input metadata
-     * is not overridden.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder - putInputsBuilderIfAbsent(java.lang.String key) { - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride - .InputMetadataOverrideOrBuilder> - builderMap = internalGetMutableInputs().ensureBuilderMap(); - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverrideOrBuilder - entry = builderMap.get(key); - if (entry == null) { - entry = - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .newBuilder(); - builderMap.put(key, entry); - } - if (entry - instanceof - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) { - entry = - ((com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) - entry) - .toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - .Builder) - entry; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationMetadataOverride) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationMetadataOverride) - private static final com.google.cloud.vertexai.api.ExplanationMetadataOverride DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationMetadataOverride(); - } - - public static com.google.cloud.vertexai.api.ExplanationMetadataOverride getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplanationMetadataOverride 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.vertexai.api.ExplanationMetadataOverride getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java deleted file mode 100644 index 53fb79111520..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationMetadataOverrideOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationMetadataOverride) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getInputsCount(); - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - boolean containsInputs(java.lang.String key); - - /** Use {@link #getInputsMap()} instead. */ - @java.lang.Deprecated - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputs(); - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.Map< - java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - getInputsMap(); - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - getInputsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride - defaultValue); - - /** - * - * - *
-   * Required. Overrides the [input
-   * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
-   * features. The key is the name of the feature to be overridden. The keys
-   * specified here must exist in the input metadata to be overridden. If a
-   * feature is not specified here, the corresponding feature's input metadata
-   * is not overridden.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride getInputsOrThrow( - java.lang.String key); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java deleted file mode 100644 index c8b4cd85f979..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ExplanationMetadataProto extends com.google.protobuf.GeneratedFile { - private ExplanationMetadataProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationMetadataProto"); - } - - 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_vertexai_v1_ExplanationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_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" - + "3google/cloud/vertexai/v1/explanation_m" - + "etadata.proto\022\030google.cloud.vertexai.v1\032" - + "\037google/api/field_behavior.proto\032\034google/protobuf/struct.proto\"\271\022\n" - + "\023ExplanationMetadata\022N\n" - + "\006inputs\030\001 \003(\01329.google.cloud.ve" - + "rtexai.v1.ExplanationMetadata.InputsEntryB\003\340A\002\022P\n" - + "\007outputs\030\002 \003(\0132:.google.cloud.v" - + "ertexai.v1.ExplanationMetadata.OutputsEntryB\003\340A\002\022\'\n" - + "\037feature_attributions_schema_uri\030\003 \001(\t\022\033\n" - + "\023latent_space_source\030\005 \001(\t\032\266\r\n\r" - + "InputMetadata\022/\n" - + "\017input_baselines\030\001 \003(\0132\026.google.protobuf.Value\022\031\n" - + "\021input_tensor_name\030\002 \001(\t\022V\n" - + "\010encoding\030\003 \001(\0162D.google." - + "cloud.vertexai.v1.ExplanationMetadata.InputMetadata.Encoding\022\020\n" - + "\010modality\030\004 \001(\t\022l\n" - + "\024feature_value_domain\030\005 \001(\0132N.google.cl" - + "oud.vertexai.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain\022\033\n" - + "\023indices_tensor_name\030\006 \001(\t\022\037\n" - + "\027dense_shape_tensor_name\030\007 \001(\t\022\035\n" - + "\025index_feature_mapping\030\010 \003(\t\022\033\n" - + "\023encoded_tensor_name\030\t \001(\t\0221\n" - + "\021encoded_baselines\030\n" - + " \003(\0132\026.google.protobuf.Value\022`\n\r" - + "visualization\030\013 \001(\0132I.google.cloud." - + "vertexai.v1.ExplanationMetadata.InputMetadata.Visualization\022\022\n\n" - + "group_name\030\014 \001(\t\032j\n" - + "\022FeatureValueDomain\022\021\n" - + "\tmin_value\030\001 \001(\002\022\021\n" - + "\tmax_value\030\002 \001(\002\022\025\n\r" - + "original_mean\030\003 \001(\002\022\027\n" - + "\017original_stddev\030\004 \001(\002\032\316\006\n\r" - + "Visualization\022\\\n" - + "\004type\030\001 \001(\0162N.google.cloud.verte" - + "xai.v1.ExplanationMetadata.InputMetadata.Visualization.Type\022d\n" - + "\010polarity\030\002 \001(\0162R.google.cloud.vertexai.v1.ExplanationMeta" - + "data.InputMetadata.Visualization.Polarity\022e\n" - + "\tcolor_map\030\003 \001(\0162R.google.cloud.vert" - + "exai.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap\022\037\n" - + "\027clip_percent_upperbound\030\004 \001(\002\022\037\n" - + "\027clip_percent_lowerbound\030\005 \001(\002\022k\n" - + "\014overlay_type\030\006 \001(\0162U.google.cloud.vertexai.v1.ExplanationMetadata." - + "InputMetadata.Visualization.OverlayType\"6\n" - + "\004Type\022\024\n" - + "\020TYPE_UNSPECIFIED\020\000\022\n\n" - + "\006PIXELS\020\001\022\014\n" - + "\010OUTLINES\020\002\"J\n" - + "\010Polarity\022\030\n" - + "\024POLARITY_UNSPECIFIED\020\000\022\014\n" - + "\010POSITIVE\020\001\022\014\n" - + "\010NEGATIVE\020\002\022\010\n" - + "\004BOTH\020\003\"{\n" - + "\010ColorMap\022\031\n" - + "\025COLOR_MAP_UNSPECIFIED\020\000\022\016\n\n" - + "PINK_GREEN\020\001\022\013\n" - + "\007VIRIDIS\020\002\022\007\n" - + "\003RED\020\003\022\t\n" - + "\005GREEN\020\004\022\r\n" - + "\tRED_GREEN\020\006\022\024\n" - + "\020PINK_WHITE_GREEN\020\005\"b\n" - + "\013OverlayType\022\034\n" - + "\030OVERLAY_TYPE_UNSPECIFIED\020\000\022\010\n" - + "\004NONE\020\001\022\014\n" - + "\010ORIGINAL\020\002\022\r\n" - + "\tGRAYSCALE\020\003\022\016\n\n" - + "MASK_BLACK\020\004\"\240\001\n" - + "\010Encoding\022\030\n" - + "\024ENCODING_UNSPECIFIED\020\000\022\014\n" - + "\010IDENTITY\020\001\022\023\n" - + "\017BAG_OF_FEATURES\020\002\022\032\n" - + "\026BAG_OF_FEATURES_SPARSE\020\003\022\r\n" - + "\tINDICATOR\020\004\022\026\n" - + "\022COMBINED_EMBEDDING\020\005\022\024\n" - + "\020CONCAT_EMBEDDING\020\006\032\246\001\n" - + "\016OutputMetadata\022<\n" - + "\032index_display_name_mapping\030\001" - + " \001(\0132\026.google.protobuf.ValueH\000\022\"\n" - + "\030display_name_mapping_key\030\002 \001(\tH\000\022\032\n" - + "\022output_tensor_name\030\003 \001(\tB\026\n" - + "\024display_name_mapping\032j\n" - + "\013InputsEntry\022\013\n" - + "\003key\030\001 \001(\t\022J\n" - + "\005value\030\002" - + " \001(\0132;.google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata:\0028\001\032l\n" - + "\014OutputsEntry\022\013\n" - + "\003key\030\001 \001(\t\022K\n" - + "\005value\030\002 \001(\013" - + "2<.google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata:\0028\001B\325\001\n" - + "\035com.google.cloud.vertexai.apiB\030ExplanationMetadat" - + "aProtoP\001Z>cloud.google.com/go/aiplatform" - + "/apiv1/aiplatformpb;aiplatformpb\252\002\032Googl" - + "e.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIP" - + "latform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor, - new java.lang.String[] { - "Inputs", "Outputs", "FeatureAttributionsSchemaUri", "LatentSpaceSource", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor, - new java.lang.String[] { - "InputBaselines", - "InputTensorName", - "Encoding", - "Modality", - "FeatureValueDomain", - "IndicesTensorName", - "DenseShapeTensorName", - "IndexFeatureMapping", - "EncodedTensorName", - "EncodedBaselines", - "Visualization", - "GroupName", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor - .getNestedType(0); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_FeatureValueDomain_descriptor, - new java.lang.String[] { - "MinValue", "MaxValue", "OriginalMean", "OriginalStddev", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_descriptor - .getNestedType(1); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputMetadata_Visualization_descriptor, - new java.lang.String[] { - "Type", - "Polarity", - "ColorMap", - "ClipPercentUpperbound", - "ClipPercentLowerbound", - "OverlayType", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputMetadata_descriptor, - new java.lang.String[] { - "IndexDisplayNameMapping", - "DisplayNameMappingKey", - "OutputTensorName", - "DisplayNameMapping", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor.getNestedType(2); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_InputsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_descriptor.getNestedType(3); - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadata_OutputsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java deleted file mode 100644 index abd5b9026c37..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Explanation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getAttributionsList(); - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Attribution getAttributions(int index); - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getAttributionsCount(); - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getAttributionsOrBuilderList(); - - /** - * - * - *
-   * Output only. Feature attributions grouped by predicted outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * By default, we provide Shapley values for the predicted class. However,
-   * you can configure the explanation request to generate Shapley values for
-   * any other classes too. For example, if a model predicts a probability of
-   * `0.4` for approving a loan application, the model's decision is to reject
-   * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
-   * Shapley values would be computed for rejection decision and not approval,
-   * even though the latter might be the positive class.
-   *
-   * If users set
-   * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
-   * the attributions are sorted by
-   * [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * in descending order. If
-   * [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
-   * is specified, the attributions are stored by
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * in the same order as they appear in the output_indices.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.AttributionOrBuilder getAttributionsOrBuilder(int index); - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getNeighborsList(); - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Neighbor getNeighbors(int index); - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getNeighborsCount(); - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getNeighborsOrBuilderList(); - - /** - * - * - *
-   * Output only. List of the nearest neighbors for example-based explanations.
-   *
-   * For models deployed with the examples explanations feature enabled, the
-   * attributions field is empty and instead the neighbors field is populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Neighbor neighbors = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.NeighborOrBuilder getNeighborsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java deleted file mode 100644 index 25d82559ec89..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java +++ /dev/null @@ -1,2477 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Parameters to configure explaining for Model's predictions.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationParameters} - */ -@com.google.protobuf.Generated -public final class ExplanationParameters extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationParameters) - ExplanationParametersOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationParameters"); - } - - // Use ExplanationParameters.newBuilder() to construct. - private ExplanationParameters(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplanationParameters() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationParameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationParameters.class, - com.google.cloud.vertexai.api.ExplanationParameters.Builder.class); - } - - private int bitField0_; - private int methodCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object method_; - - public enum MethodCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SAMPLED_SHAPLEY_ATTRIBUTION(1), - INTEGRATED_GRADIENTS_ATTRIBUTION(2), - XRAI_ATTRIBUTION(3), - EXAMPLES(7), - METHOD_NOT_SET(0); - private final int value; - - private MethodCase(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 MethodCase valueOf(int value) { - return forNumber(value); - } - - public static MethodCase forNumber(int value) { - switch (value) { - case 1: - return SAMPLED_SHAPLEY_ATTRIBUTION; - case 2: - return INTEGRATED_GRADIENTS_ATTRIBUTION; - case 3: - return XRAI_ATTRIBUTION; - case 7: - return EXAMPLES; - case 0: - return METHOD_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MethodCase getMethodCase() { - return MethodCase.forNumber(methodCase_); - } - - public static final int SAMPLED_SHAPLEY_ATTRIBUTION_FIELD_NUMBER = 1; - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return Whether the sampledShapleyAttribution field is set. - */ - @java.lang.Override - public boolean hasSampledShapleyAttribution() { - return methodCase_ == 1; - } - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return The sampledShapleyAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttribution getSampledShapleyAttribution() { - if (methodCase_ == 1) { - return (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_; - } - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder - getSampledShapleyAttributionOrBuilder() { - if (methodCase_ == 1) { - return (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_; - } - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - - public static final int INTEGRATED_GRADIENTS_ATTRIBUTION_FIELD_NUMBER = 2; - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return Whether the integratedGradientsAttribution field is set. - */ - @java.lang.Override - public boolean hasIntegratedGradientsAttribution() { - return methodCase_ == 2; - } - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return The integratedGradientsAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution - getIntegratedGradientsAttribution() { - if (methodCase_ == 2) { - return (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_; - } - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder - getIntegratedGradientsAttributionOrBuilder() { - if (methodCase_ == 2) { - return (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_; - } - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - - public static final int XRAI_ATTRIBUTION_FIELD_NUMBER = 3; - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return Whether the xraiAttribution field is set. - */ - @java.lang.Override - public boolean hasXraiAttribution() { - return methodCase_ == 3; - } - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return The xraiAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttribution getXraiAttribution() { - if (methodCase_ == 3) { - return (com.google.cloud.vertexai.api.XraiAttribution) method_; - } - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttributionOrBuilder getXraiAttributionOrBuilder() { - if (methodCase_ == 3) { - return (com.google.cloud.vertexai.api.XraiAttribution) method_; - } - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - - public static final int EXAMPLES_FIELD_NUMBER = 7; - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return Whether the examples field is set. - */ - @java.lang.Override - public boolean hasExamples() { - return methodCase_ == 7; - } - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return The examples. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples getExamples() { - if (methodCase_ == 7) { - return (com.google.cloud.vertexai.api.Examples) method_; - } - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOrBuilder getExamplesOrBuilder() { - if (methodCase_ == 7) { - return (com.google.cloud.vertexai.api.Examples) method_; - } - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - - public static final int TOP_K_FIELD_NUMBER = 4; - private int topK_ = 0; - - /** - * - * - *
-   * If populated, returns attributions for top K indices of outputs
-   * (defaults to 1). Only applies to Models that predicts more than one outputs
-   * (e,g, multi-class Models). When set to -1, returns explanations for all
-   * outputs.
-   * 
- * - * int32 top_k = 4; - * - * @return The topK. - */ - @java.lang.Override - public int getTopK() { - return topK_; - } - - public static final int OUTPUT_INDICES_FIELD_NUMBER = 5; - private com.google.protobuf.ListValue outputIndices_; - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return Whether the outputIndices field is set. - */ - @java.lang.Override - public boolean hasOutputIndices() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return The outputIndices. - */ - @java.lang.Override - public com.google.protobuf.ListValue getOutputIndices() { - return outputIndices_ == null - ? com.google.protobuf.ListValue.getDefaultInstance() - : outputIndices_; - } - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - @java.lang.Override - public com.google.protobuf.ListValueOrBuilder getOutputIndicesOrBuilder() { - return outputIndices_ == null - ? com.google.protobuf.ListValue.getDefaultInstance() - : outputIndices_; - } - - 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 (methodCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_); - } - if (methodCase_ == 2) { - output.writeMessage( - 2, (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_); - } - if (methodCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.XraiAttribution) method_); - } - if (topK_ != 0) { - output.writeInt32(4, topK_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getOutputIndices()); - } - if (methodCase_ == 7) { - output.writeMessage(7, (com.google.cloud.vertexai.api.Examples) method_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (methodCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_); - } - if (methodCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_); - } - if (methodCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.XraiAttribution) method_); - } - if (topK_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, topK_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOutputIndices()); - } - if (methodCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.vertexai.api.Examples) method_); - } - 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.vertexai.api.ExplanationParameters)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationParameters other = - (com.google.cloud.vertexai.api.ExplanationParameters) obj; - - if (getTopK() != other.getTopK()) return false; - if (hasOutputIndices() != other.hasOutputIndices()) return false; - if (hasOutputIndices()) { - if (!getOutputIndices().equals(other.getOutputIndices())) return false; - } - if (!getMethodCase().equals(other.getMethodCase())) return false; - switch (methodCase_) { - case 1: - if (!getSampledShapleyAttribution().equals(other.getSampledShapleyAttribution())) - return false; - break; - case 2: - if (!getIntegratedGradientsAttribution().equals(other.getIntegratedGradientsAttribution())) - return false; - break; - case 3: - if (!getXraiAttribution().equals(other.getXraiAttribution())) return false; - break; - case 7: - if (!getExamples().equals(other.getExamples())) 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) + TOP_K_FIELD_NUMBER; - hash = (53 * hash) + getTopK(); - if (hasOutputIndices()) { - hash = (37 * hash) + OUTPUT_INDICES_FIELD_NUMBER; - hash = (53 * hash) + getOutputIndices().hashCode(); - } - switch (methodCase_) { - case 1: - hash = (37 * hash) + SAMPLED_SHAPLEY_ATTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getSampledShapleyAttribution().hashCode(); - break; - case 2: - hash = (37 * hash) + INTEGRATED_GRADIENTS_ATTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getIntegratedGradientsAttribution().hashCode(); - break; - case 3: - hash = (37 * hash) + XRAI_ATTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + getXraiAttribution().hashCode(); - break; - case 7: - hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; - hash = (53 * hash) + getExamples().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters 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.vertexai.api.ExplanationParameters parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters 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.vertexai.api.ExplanationParameters parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationParameters 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Parameters to configure explaining for Model's predictions.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationParameters} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationParameters) - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationParameters_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationParameters.class, - com.google.cloud.vertexai.api.ExplanationParameters.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplanationParameters.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetOutputIndicesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (sampledShapleyAttributionBuilder_ != null) { - sampledShapleyAttributionBuilder_.clear(); - } - if (integratedGradientsAttributionBuilder_ != null) { - integratedGradientsAttributionBuilder_.clear(); - } - if (xraiAttributionBuilder_ != null) { - xraiAttributionBuilder_.clear(); - } - if (examplesBuilder_ != null) { - examplesBuilder_.clear(); - } - topK_ = 0; - outputIndices_ = null; - if (outputIndicesBuilder_ != null) { - outputIndicesBuilder_.dispose(); - outputIndicesBuilder_ = null; - } - methodCase_ = 0; - method_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParameters getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParameters build() { - com.google.cloud.vertexai.api.ExplanationParameters result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParameters buildPartial() { - com.google.cloud.vertexai.api.ExplanationParameters result = - new com.google.cloud.vertexai.api.ExplanationParameters(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplanationParameters result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.topK_ = topK_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.outputIndices_ = - outputIndicesBuilder_ == null ? outputIndices_ : outputIndicesBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.ExplanationParameters result) { - result.methodCase_ = methodCase_; - result.method_ = this.method_; - if (methodCase_ == 1 && sampledShapleyAttributionBuilder_ != null) { - result.method_ = sampledShapleyAttributionBuilder_.build(); - } - if (methodCase_ == 2 && integratedGradientsAttributionBuilder_ != null) { - result.method_ = integratedGradientsAttributionBuilder_.build(); - } - if (methodCase_ == 3 && xraiAttributionBuilder_ != null) { - result.method_ = xraiAttributionBuilder_.build(); - } - if (methodCase_ == 7 && examplesBuilder_ != null) { - result.method_ = examplesBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationParameters) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationParameters) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplanationParameters other) { - if (other == com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance()) - return this; - if (other.getTopK() != 0) { - setTopK(other.getTopK()); - } - if (other.hasOutputIndices()) { - mergeOutputIndices(other.getOutputIndices()); - } - switch (other.getMethodCase()) { - case SAMPLED_SHAPLEY_ATTRIBUTION: - { - mergeSampledShapleyAttribution(other.getSampledShapleyAttribution()); - break; - } - case INTEGRATED_GRADIENTS_ATTRIBUTION: - { - mergeIntegratedGradientsAttribution(other.getIntegratedGradientsAttribution()); - break; - } - case XRAI_ATTRIBUTION: - { - mergeXraiAttribution(other.getXraiAttribution()); - break; - } - case EXAMPLES: - { - mergeExamples(other.getExamples()); - break; - } - case METHOD_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( - internalGetSampledShapleyAttributionFieldBuilder().getBuilder(), - extensionRegistry); - methodCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetIntegratedGradientsAttributionFieldBuilder().getBuilder(), - extensionRegistry); - methodCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetXraiAttributionFieldBuilder().getBuilder(), extensionRegistry); - methodCase_ = 3; - break; - } // case 26 - case 32: - { - topK_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 32 - case 42: - { - input.readMessage( - internalGetOutputIndicesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 58: - { - input.readMessage( - internalGetExamplesFieldBuilder().getBuilder(), extensionRegistry); - methodCase_ = 7; - 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 methodCase_ = 0; - private java.lang.Object method_; - - public MethodCase getMethodCase() { - return MethodCase.forNumber(methodCase_); - } - - public Builder clearMethod() { - methodCase_ = 0; - method_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SampledShapleyAttribution, - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder, - com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder> - sampledShapleyAttributionBuilder_; - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return Whether the sampledShapleyAttribution field is set. - */ - @java.lang.Override - public boolean hasSampledShapleyAttribution() { - return methodCase_ == 1; - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return The sampledShapleyAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttribution getSampledShapleyAttribution() { - if (sampledShapleyAttributionBuilder_ == null) { - if (methodCase_ == 1) { - return (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_; - } - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } else { - if (methodCase_ == 1) { - return sampledShapleyAttributionBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - public Builder setSampledShapleyAttribution( - com.google.cloud.vertexai.api.SampledShapleyAttribution value) { - if (sampledShapleyAttributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - method_ = value; - onChanged(); - } else { - sampledShapleyAttributionBuilder_.setMessage(value); - } - methodCase_ = 1; - return this; - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - public Builder setSampledShapleyAttribution( - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder builderForValue) { - if (sampledShapleyAttributionBuilder_ == null) { - method_ = builderForValue.build(); - onChanged(); - } else { - sampledShapleyAttributionBuilder_.setMessage(builderForValue.build()); - } - methodCase_ = 1; - return this; - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - public Builder mergeSampledShapleyAttribution( - com.google.cloud.vertexai.api.SampledShapleyAttribution value) { - if (sampledShapleyAttributionBuilder_ == null) { - if (methodCase_ == 1 - && method_ - != com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance()) { - method_ = - com.google.cloud.vertexai.api.SampledShapleyAttribution.newBuilder( - (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_) - .mergeFrom(value) - .buildPartial(); - } else { - method_ = value; - } - onChanged(); - } else { - if (methodCase_ == 1) { - sampledShapleyAttributionBuilder_.mergeFrom(value); - } else { - sampledShapleyAttributionBuilder_.setMessage(value); - } - } - methodCase_ = 1; - return this; - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - public Builder clearSampledShapleyAttribution() { - if (sampledShapleyAttributionBuilder_ == null) { - if (methodCase_ == 1) { - methodCase_ = 0; - method_ = null; - onChanged(); - } - } else { - if (methodCase_ == 1) { - methodCase_ = 0; - method_ = null; - } - sampledShapleyAttributionBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - public com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder - getSampledShapleyAttributionBuilder() { - return internalGetSampledShapleyAttributionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder - getSampledShapleyAttributionOrBuilder() { - if ((methodCase_ == 1) && (sampledShapleyAttributionBuilder_ != null)) { - return sampledShapleyAttributionBuilder_.getMessageOrBuilder(); - } else { - if (methodCase_ == 1) { - return (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_; - } - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that approximates Shapley values for features that
-     * contribute to the label being predicted. A sampling strategy is used to
-     * approximate the value rather than considering all subsets of features.
-     * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-     * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SampledShapleyAttribution, - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder, - com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder> - internalGetSampledShapleyAttributionFieldBuilder() { - if (sampledShapleyAttributionBuilder_ == null) { - if (!(methodCase_ == 1)) { - method_ = com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - sampledShapleyAttributionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SampledShapleyAttribution, - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder, - com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder>( - (com.google.cloud.vertexai.api.SampledShapleyAttribution) method_, - getParentForChildren(), - isClean()); - method_ = null; - } - methodCase_ = 1; - onChanged(); - return sampledShapleyAttributionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.IntegratedGradientsAttribution, - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder, - com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder> - integratedGradientsAttributionBuilder_; - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return Whether the integratedGradientsAttribution field is set. - */ - @java.lang.Override - public boolean hasIntegratedGradientsAttribution() { - return methodCase_ == 2; - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return The integratedGradientsAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution - getIntegratedGradientsAttribution() { - if (integratedGradientsAttributionBuilder_ == null) { - if (methodCase_ == 2) { - return (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_; - } - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } else { - if (methodCase_ == 2) { - return integratedGradientsAttributionBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - public Builder setIntegratedGradientsAttribution( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution value) { - if (integratedGradientsAttributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - method_ = value; - onChanged(); - } else { - integratedGradientsAttributionBuilder_.setMessage(value); - } - methodCase_ = 2; - return this; - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - public Builder setIntegratedGradientsAttribution( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder builderForValue) { - if (integratedGradientsAttributionBuilder_ == null) { - method_ = builderForValue.build(); - onChanged(); - } else { - integratedGradientsAttributionBuilder_.setMessage(builderForValue.build()); - } - methodCase_ = 2; - return this; - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - public Builder mergeIntegratedGradientsAttribution( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution value) { - if (integratedGradientsAttributionBuilder_ == null) { - if (methodCase_ == 2 - && method_ - != com.google.cloud.vertexai.api.IntegratedGradientsAttribution - .getDefaultInstance()) { - method_ = - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.newBuilder( - (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_) - .mergeFrom(value) - .buildPartial(); - } else { - method_ = value; - } - onChanged(); - } else { - if (methodCase_ == 2) { - integratedGradientsAttributionBuilder_.mergeFrom(value); - } else { - integratedGradientsAttributionBuilder_.setMessage(value); - } - } - methodCase_ = 2; - return this; - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - public Builder clearIntegratedGradientsAttribution() { - if (integratedGradientsAttributionBuilder_ == null) { - if (methodCase_ == 2) { - methodCase_ = 0; - method_ = null; - onChanged(); - } - } else { - if (methodCase_ == 2) { - methodCase_ = 0; - method_ = null; - } - integratedGradientsAttributionBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder - getIntegratedGradientsAttributionBuilder() { - return internalGetIntegratedGradientsAttributionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder - getIntegratedGradientsAttributionOrBuilder() { - if ((methodCase_ == 2) && (integratedGradientsAttributionBuilder_ != null)) { - return integratedGradientsAttributionBuilder_.getMessageOrBuilder(); - } else { - if (methodCase_ == 2) { - return (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_; - } - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that computes Aumann-Shapley values taking
-     * advantage of the model's fully differentiable structure. Refer to this
-     * paper for more details: https://arxiv.org/abs/1703.01365
-     * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.IntegratedGradientsAttribution, - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder, - com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder> - internalGetIntegratedGradientsAttributionFieldBuilder() { - if (integratedGradientsAttributionBuilder_ == null) { - if (!(methodCase_ == 2)) { - method_ = - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - integratedGradientsAttributionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.IntegratedGradientsAttribution, - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder, - com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder>( - (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) method_, - getParentForChildren(), - isClean()); - method_ = null; - } - methodCase_ = 2; - onChanged(); - return integratedGradientsAttributionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.XraiAttribution, - com.google.cloud.vertexai.api.XraiAttribution.Builder, - com.google.cloud.vertexai.api.XraiAttributionOrBuilder> - xraiAttributionBuilder_; - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return Whether the xraiAttribution field is set. - */ - @java.lang.Override - public boolean hasXraiAttribution() { - return methodCase_ == 3; - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return The xraiAttribution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttribution getXraiAttribution() { - if (xraiAttributionBuilder_ == null) { - if (methodCase_ == 3) { - return (com.google.cloud.vertexai.api.XraiAttribution) method_; - } - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } else { - if (methodCase_ == 3) { - return xraiAttributionBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - public Builder setXraiAttribution(com.google.cloud.vertexai.api.XraiAttribution value) { - if (xraiAttributionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - method_ = value; - onChanged(); - } else { - xraiAttributionBuilder_.setMessage(value); - } - methodCase_ = 3; - return this; - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - public Builder setXraiAttribution( - com.google.cloud.vertexai.api.XraiAttribution.Builder builderForValue) { - if (xraiAttributionBuilder_ == null) { - method_ = builderForValue.build(); - onChanged(); - } else { - xraiAttributionBuilder_.setMessage(builderForValue.build()); - } - methodCase_ = 3; - return this; - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - public Builder mergeXraiAttribution(com.google.cloud.vertexai.api.XraiAttribution value) { - if (xraiAttributionBuilder_ == null) { - if (methodCase_ == 3 - && method_ != com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance()) { - method_ = - com.google.cloud.vertexai.api.XraiAttribution.newBuilder( - (com.google.cloud.vertexai.api.XraiAttribution) method_) - .mergeFrom(value) - .buildPartial(); - } else { - method_ = value; - } - onChanged(); - } else { - if (methodCase_ == 3) { - xraiAttributionBuilder_.mergeFrom(value); - } else { - xraiAttributionBuilder_.setMessage(value); - } - } - methodCase_ = 3; - return this; - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - public Builder clearXraiAttribution() { - if (xraiAttributionBuilder_ == null) { - if (methodCase_ == 3) { - methodCase_ = 0; - method_ = null; - onChanged(); - } - } else { - if (methodCase_ == 3) { - methodCase_ = 0; - method_ = null; - } - xraiAttributionBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - public com.google.cloud.vertexai.api.XraiAttribution.Builder getXraiAttributionBuilder() { - return internalGetXraiAttributionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttributionOrBuilder getXraiAttributionOrBuilder() { - if ((methodCase_ == 3) && (xraiAttributionBuilder_ != null)) { - return xraiAttributionBuilder_.getMessageOrBuilder(); - } else { - if (methodCase_ == 3) { - return (com.google.cloud.vertexai.api.XraiAttribution) method_; - } - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - } - - /** - * - * - *
-     * An attribution method that redistributes Integrated Gradients
-     * attribution to segmented regions, taking advantage of the model's fully
-     * differentiable structure. Refer to this paper for
-     * more details: https://arxiv.org/abs/1906.02825
-     *
-     * XRAI currently performs better on natural images, like a picture of a
-     * house or an animal. If the images are taken in artificial environments,
-     * like a lab or manufacturing line, or from diagnostic equipment, like
-     * x-rays or quality-control cameras, use Integrated Gradients instead.
-     * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.XraiAttribution, - com.google.cloud.vertexai.api.XraiAttribution.Builder, - com.google.cloud.vertexai.api.XraiAttributionOrBuilder> - internalGetXraiAttributionFieldBuilder() { - if (xraiAttributionBuilder_ == null) { - if (!(methodCase_ == 3)) { - method_ = com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - xraiAttributionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.XraiAttribution, - com.google.cloud.vertexai.api.XraiAttribution.Builder, - com.google.cloud.vertexai.api.XraiAttributionOrBuilder>( - (com.google.cloud.vertexai.api.XraiAttribution) method_, - getParentForChildren(), - isClean()); - method_ = null; - } - methodCase_ = 3; - onChanged(); - return xraiAttributionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples, - com.google.cloud.vertexai.api.Examples.Builder, - com.google.cloud.vertexai.api.ExamplesOrBuilder> - examplesBuilder_; - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return Whether the examples field is set. - */ - @java.lang.Override - public boolean hasExamples() { - return methodCase_ == 7; - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return The examples. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Examples getExamples() { - if (examplesBuilder_ == null) { - if (methodCase_ == 7) { - return (com.google.cloud.vertexai.api.Examples) method_; - } - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } else { - if (methodCase_ == 7) { - return examplesBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - public Builder setExamples(com.google.cloud.vertexai.api.Examples value) { - if (examplesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - method_ = value; - onChanged(); - } else { - examplesBuilder_.setMessage(value); - } - methodCase_ = 7; - return this; - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - public Builder setExamples(com.google.cloud.vertexai.api.Examples.Builder builderForValue) { - if (examplesBuilder_ == null) { - method_ = builderForValue.build(); - onChanged(); - } else { - examplesBuilder_.setMessage(builderForValue.build()); - } - methodCase_ = 7; - return this; - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - public Builder mergeExamples(com.google.cloud.vertexai.api.Examples value) { - if (examplesBuilder_ == null) { - if (methodCase_ == 7 - && method_ != com.google.cloud.vertexai.api.Examples.getDefaultInstance()) { - method_ = - com.google.cloud.vertexai.api.Examples.newBuilder( - (com.google.cloud.vertexai.api.Examples) method_) - .mergeFrom(value) - .buildPartial(); - } else { - method_ = value; - } - onChanged(); - } else { - if (methodCase_ == 7) { - examplesBuilder_.mergeFrom(value); - } else { - examplesBuilder_.setMessage(value); - } - } - methodCase_ = 7; - return this; - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - public Builder clearExamples() { - if (examplesBuilder_ == null) { - if (methodCase_ == 7) { - methodCase_ = 0; - method_ = null; - onChanged(); - } - } else { - if (methodCase_ == 7) { - methodCase_ = 0; - method_ = null; - } - examplesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - public com.google.cloud.vertexai.api.Examples.Builder getExamplesBuilder() { - return internalGetExamplesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOrBuilder getExamplesOrBuilder() { - if ((methodCase_ == 7) && (examplesBuilder_ != null)) { - return examplesBuilder_.getMessageOrBuilder(); - } else { - if (methodCase_ == 7) { - return (com.google.cloud.vertexai.api.Examples) method_; - } - return com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Example-based explanations that returns the nearest neighbors from the
-     * provided dataset.
-     * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples, - com.google.cloud.vertexai.api.Examples.Builder, - com.google.cloud.vertexai.api.ExamplesOrBuilder> - internalGetExamplesFieldBuilder() { - if (examplesBuilder_ == null) { - if (!(methodCase_ == 7)) { - method_ = com.google.cloud.vertexai.api.Examples.getDefaultInstance(); - } - examplesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Examples, - com.google.cloud.vertexai.api.Examples.Builder, - com.google.cloud.vertexai.api.ExamplesOrBuilder>( - (com.google.cloud.vertexai.api.Examples) method_, - getParentForChildren(), - isClean()); - method_ = null; - } - methodCase_ = 7; - onChanged(); - return examplesBuilder_; - } - - private int topK_; - - /** - * - * - *
-     * If populated, returns attributions for top K indices of outputs
-     * (defaults to 1). Only applies to Models that predicts more than one outputs
-     * (e,g, multi-class Models). When set to -1, returns explanations for all
-     * outputs.
-     * 
- * - * int32 top_k = 4; - * - * @return The topK. - */ - @java.lang.Override - public int getTopK() { - return topK_; - } - - /** - * - * - *
-     * If populated, returns attributions for top K indices of outputs
-     * (defaults to 1). Only applies to Models that predicts more than one outputs
-     * (e,g, multi-class Models). When set to -1, returns explanations for all
-     * outputs.
-     * 
- * - * int32 top_k = 4; - * - * @param value The topK to set. - * @return This builder for chaining. - */ - public Builder setTopK(int value) { - - topK_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, returns attributions for top K indices of outputs
-     * (defaults to 1). Only applies to Models that predicts more than one outputs
-     * (e,g, multi-class Models). When set to -1, returns explanations for all
-     * outputs.
-     * 
- * - * int32 top_k = 4; - * - * @return This builder for chaining. - */ - public Builder clearTopK() { - bitField0_ = (bitField0_ & ~0x00000010); - topK_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ListValue outputIndices_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.ListValue, - com.google.protobuf.ListValue.Builder, - com.google.protobuf.ListValueOrBuilder> - outputIndicesBuilder_; - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return Whether the outputIndices field is set. - */ - public boolean hasOutputIndices() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return The outputIndices. - */ - public com.google.protobuf.ListValue getOutputIndices() { - if (outputIndicesBuilder_ == null) { - return outputIndices_ == null - ? com.google.protobuf.ListValue.getDefaultInstance() - : outputIndices_; - } else { - return outputIndicesBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public Builder setOutputIndices(com.google.protobuf.ListValue value) { - if (outputIndicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputIndices_ = value; - } else { - outputIndicesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public Builder setOutputIndices(com.google.protobuf.ListValue.Builder builderForValue) { - if (outputIndicesBuilder_ == null) { - outputIndices_ = builderForValue.build(); - } else { - outputIndicesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public Builder mergeOutputIndices(com.google.protobuf.ListValue value) { - if (outputIndicesBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && outputIndices_ != null - && outputIndices_ != com.google.protobuf.ListValue.getDefaultInstance()) { - getOutputIndicesBuilder().mergeFrom(value); - } else { - outputIndices_ = value; - } - } else { - outputIndicesBuilder_.mergeFrom(value); - } - if (outputIndices_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public Builder clearOutputIndices() { - bitField0_ = (bitField0_ & ~0x00000020); - outputIndices_ = null; - if (outputIndicesBuilder_ != null) { - outputIndicesBuilder_.dispose(); - outputIndicesBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public com.google.protobuf.ListValue.Builder getOutputIndicesBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetOutputIndicesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - public com.google.protobuf.ListValueOrBuilder getOutputIndicesOrBuilder() { - if (outputIndicesBuilder_ != null) { - return outputIndicesBuilder_.getMessageOrBuilder(); - } else { - return outputIndices_ == null - ? com.google.protobuf.ListValue.getDefaultInstance() - : outputIndices_; - } - } - - /** - * - * - *
-     * If populated, only returns attributions that have
-     * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * contained in output_indices. It must be an ndarray of integers, with the
-     * same shape of the output it's explaining.
-     *
-     * If not populated, returns attributions for
-     * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-     * outputs. If neither top_k nor output_indices is populated, returns the
-     * argmax index of the outputs.
-     *
-     * Only applicable to Models that predict multiple outputs (e,g, multi-class
-     * Models that predict multiple classes).
-     * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.ListValue, - com.google.protobuf.ListValue.Builder, - com.google.protobuf.ListValueOrBuilder> - internalGetOutputIndicesFieldBuilder() { - if (outputIndicesBuilder_ == null) { - outputIndicesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.ListValue, - com.google.protobuf.ListValue.Builder, - com.google.protobuf.ListValueOrBuilder>( - getOutputIndices(), getParentForChildren(), isClean()); - outputIndices_ = null; - } - return outputIndicesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationParameters) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationParameters) - private static final com.google.cloud.vertexai.api.ExplanationParameters DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationParameters(); - } - - public static com.google.cloud.vertexai.api.ExplanationParameters getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplanationParameters 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.vertexai.api.ExplanationParameters getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java deleted file mode 100644 index c645e6c38947..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationParametersOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationParameters) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return Whether the sampledShapleyAttribution field is set. - */ - boolean hasSampledShapleyAttribution(); - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - * - * @return The sampledShapleyAttribution. - */ - com.google.cloud.vertexai.api.SampledShapleyAttribution getSampledShapleyAttribution(); - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * Refer to this paper for model details: https://arxiv.org/abs/1306.4265.
-   * 
- * - * .google.cloud.vertexai.v1.SampledShapleyAttribution sampled_shapley_attribution = 1; - * - */ - com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder - getSampledShapleyAttributionOrBuilder(); - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return Whether the integratedGradientsAttribution field is set. - */ - boolean hasIntegratedGradientsAttribution(); - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - * - * @return The integratedGradientsAttribution. - */ - com.google.cloud.vertexai.api.IntegratedGradientsAttribution getIntegratedGradientsAttribution(); - - /** - * - * - *
-   * An attribution method that computes Aumann-Shapley values taking
-   * advantage of the model's fully differentiable structure. Refer to this
-   * paper for more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * - * .google.cloud.vertexai.v1.IntegratedGradientsAttribution integrated_gradients_attribution = 2; - * - */ - com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder - getIntegratedGradientsAttributionOrBuilder(); - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return Whether the xraiAttribution field is set. - */ - boolean hasXraiAttribution(); - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - * - * @return The xraiAttribution. - */ - com.google.cloud.vertexai.api.XraiAttribution getXraiAttribution(); - - /** - * - * - *
-   * An attribution method that redistributes Integrated Gradients
-   * attribution to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1906.02825
-   *
-   * XRAI currently performs better on natural images, like a picture of a
-   * house or an animal. If the images are taken in artificial environments,
-   * like a lab or manufacturing line, or from diagnostic equipment, like
-   * x-rays or quality-control cameras, use Integrated Gradients instead.
-   * 
- * - * .google.cloud.vertexai.v1.XraiAttribution xrai_attribution = 3; - */ - com.google.cloud.vertexai.api.XraiAttributionOrBuilder getXraiAttributionOrBuilder(); - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return Whether the examples field is set. - */ - boolean hasExamples(); - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - * - * @return The examples. - */ - com.google.cloud.vertexai.api.Examples getExamples(); - - /** - * - * - *
-   * Example-based explanations that returns the nearest neighbors from the
-   * provided dataset.
-   * 
- * - * .google.cloud.vertexai.v1.Examples examples = 7; - */ - com.google.cloud.vertexai.api.ExamplesOrBuilder getExamplesOrBuilder(); - - /** - * - * - *
-   * If populated, returns attributions for top K indices of outputs
-   * (defaults to 1). Only applies to Models that predicts more than one outputs
-   * (e,g, multi-class Models). When set to -1, returns explanations for all
-   * outputs.
-   * 
- * - * int32 top_k = 4; - * - * @return The topK. - */ - int getTopK(); - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return Whether the outputIndices field is set. - */ - boolean hasOutputIndices(); - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - * - * @return The outputIndices. - */ - com.google.protobuf.ListValue getOutputIndices(); - - /** - * - * - *
-   * If populated, only returns attributions that have
-   * [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * contained in output_indices. It must be an ndarray of integers, with the
-   * same shape of the output it's explaining.
-   *
-   * If not populated, returns attributions for
-   * [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
-   * outputs. If neither top_k nor output_indices is populated, returns the
-   * argmax index of the outputs.
-   *
-   * Only applicable to Models that predict multiple outputs (e,g, multi-class
-   * Models that predict multiple classes).
-   * 
- * - * .google.protobuf.ListValue output_indices = 5; - */ - com.google.protobuf.ListValueOrBuilder getOutputIndicesOrBuilder(); - - com.google.cloud.vertexai.api.ExplanationParameters.MethodCase getMethodCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java deleted file mode 100644 index 46499c8e9567..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ExplanationProto extends com.google.protobuf.GeneratedFile { - private ExplanationProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationProto"); - } - - 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_vertexai_v1_Explanation_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Explanation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ModelExplanation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Attribution_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Attribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Neighbor_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Neighbor_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationParameters_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_XraiAttribution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SmoothGradConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Examples_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Examples_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Presets_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Presets_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExamplesOverride_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_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/vertexai/v1/explanation.p" - + "roto\022\030google.cloud.vertexai.v1\032\037google/a" - + "pi/field_behavior.proto\0323google/cloud/vertexai/v1/explanation_metadata.proto\032!go" - + "ogle/cloud/vertexai/v1/io.proto\032\034google/protobuf/struct.proto\"\213\001\n" - + "\013Explanation\022@\n" - + "\014attributions\030\001" - + " \003(\0132%.google.cloud.vertexai.v1.AttributionB\003\340A\003\022:\n" - + "\tneighbors\030\002 \003(\0132\".google.cloud.vertexai.v1.NeighborB\003\340A\003\"Y\n" - + "\020ModelExplanation\022E\n" - + "\021mean_attributions\030\001" - + " \003(\0132%.google.cloud.vertexai.v1.AttributionB\003\340A\003\"\211\002\n" - + "\013Attribution\022\"\n" - + "\025baseline_output_value\030\001 \001(\001B\003\340A\003\022\"\n" - + "\025instance_output_value\030\002 \001(\001B\003\340A\003\0229\n" - + "\024feature_attributions\030\003" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\003\022\031\n" - + "\014output_index\030\004 \003(\005B\003\340A\003\022 \n" - + "\023output_display_name\030\005 \001(\tB\003\340A\003\022 \n" - + "\023approximation_error\030\006 \001(\001B\003\340A\003\022\030\n" - + "\013output_name\030\007 \001(\tB\003\340A\003\"D\n" - + "\010Neighbor\022\030\n" - + "\013neighbor_id\030\001 \001(\tB\003\340A\003\022\036\n" - + "\021neighbor_distance\030\002 \001(\001B\003\340A\003\"\241\001\n" - + "\017ExplanationSpec\022H\n\n" - + "parameters\030\001 \001(\0132/.googl" - + "e.cloud.vertexai.v1.ExplanationParametersB\003\340A\002\022D\n" - + "\010metadata\030\002" - + " \001(\0132-.google.cloud.vertexai.v1.ExplanationMetadataB\003\340A\001\"\245\003\n" - + "\025ExplanationParameters\022Z\n" - + "\033sampled_shapley_attribution\030\001" - + " \001(\01323.google.cloud.vertexai.v1.SampledShapleyAttributionH\000\022d\n" - + " integrated_gradients_attribution\030\002 \001(\01328.g" - + "oogle.cloud.vertexai.v1.IntegratedGradientsAttributionH\000\022E\n" - + "\020xrai_attribution\030\003 \001" - + "(\0132).google.cloud.vertexai.v1.XraiAttributionH\000\0226\n" - + "\010examples\030\007 \001(\0132\".google.cloud.vertexai.v1.ExamplesH\000\022\r\n" - + "\005top_k\030\004 \001(\005\0222\n" - + "\016output_indices\030\005 \001(\0132\032.google.protobuf.ListValueB\010\n" - + "\006method\"4\n" - + "\031SampledShapleyAttribution\022\027\n\n" - + "path_count\030\001 \001(\005B\003\340A\002\"\315\001\n" - + "\036IntegratedGradientsAttribution\022\027\n\n" - + "step_count\030\001 \001(\005B\003\340A\002\022F\n" - + "\022smooth_grad_config\030\002 \001" - + "(\0132*.google.cloud.vertexai.v1.SmoothGradConfig\022J\n" - + "\024blur_baseline_config\030\003 \001(\0132,.g" - + "oogle.cloud.vertexai.v1.BlurBaselineConfig\"\276\001\n" - + "\017XraiAttribution\022\027\n\n" - + "step_count\030\001 \001(\005B\003\340A\002\022F\n" - + "\022smooth_grad_config\030\002 \001(\0132*.go" - + "ogle.cloud.vertexai.v1.SmoothGradConfig\022J\n" - + "\024blur_baseline_config\030\003" - + " \001(\0132,.google.cloud.vertexai.v1.BlurBaselineConfig\"\247\001\n" - + "\020SmoothGradConfig\022\025\n" - + "\013noise_sigma\030\001 \001(\002H\000\022J\n" - + "\023feature_noise_sigma\030\002" - + " \001(\0132+.google.cloud.vertexai.v1.FeatureNoiseSigmaH\000\022\032\n" - + "\022noisy_sample_count\030\003 \001(\005B\024\n" - + "\022GradientNoiseSigma\"\237\001\n" - + "\021FeatureNoiseSigma\022U\n" - + "\013noise_sigma\030\001" - + " \003(\0132@.google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature\0323\n" - + "\024NoiseSigmaForFeature\022\014\n" - + "\004name\030\001 \001(\t\022\r\n" - + "\005sigma\030\002 \001(\002\",\n" - + "\022BlurBaselineConfig\022\026\n" - + "\016max_blur_sigma\030\001 \001(\002\"\332\003\n" - + "\010Examples\022Q\n" - + "\022example_gcs_source\030\005" - + " \001(\01323.google.cloud.vertexai.v1.Examples.ExampleGcsSourceH\000\022@\n" - + "\036nearest_neighbor_search_config\030\002" - + " \001(\0132\026.google.protobuf.ValueH\001\0224\n" - + "\007presets\030\004 \001(\0132!.google.cloud.vertexai.v1.PresetsH\001\022\026\n" - + "\016neighbor_count\030\003 \001(\005\032\326\001\n" - + "\020ExampleGcsSource\022S\n" - + "\013data_format\030\001 \001(\0162>.google.cloud.vertexai." - + "v1.Examples.ExampleGcsSource.DataFormat\0227\n\n" - + "gcs_source\030\002 \001(\0132#.google.cloud.vertexai.v1.GcsSource\"4\n\n" - + "DataFormat\022\033\n" - + "\027DATA_FORMAT_UNSPECIFIED\020\000\022\t\n" - + "\005JSONL\020\001B\010\n" - + "\006sourceB\010\n" - + "\006config\"\366\001\n" - + "\007Presets\022;\n" - + "\005query\030\001 \001(\0162\'." - + "google.cloud.vertexai.v1.Presets.QueryH\000\210\001\001\022<\n" - + "\010modality\030\002 \001(\0162*.google.cloud.vertexai.v1.Presets.Modality\"\036\n" - + "\005Query\022\013\n" - + "\007PRECISE\020\000\022\010\n" - + "\004FAST\020\001\"F\n" - + "\010Modality\022\030\n" - + "\024MODALITY_UNSPECIFIED\020\000\022\t\n" - + "\005IMAGE\020\001\022\010\n" - + "\004TEXT\020\002\022\013\n" - + "\007TABULAR\020\003B\010\n" - + "\006_query\"\356\001\n" - + "\027ExplanationSpecOverride\022C\n\n" - + "parameters\030\001 \001(\0132/.google.cloud.vertexai.v1.ExplanationParameters\022G\n" - + "\010metadata\030\002" - + " \001(\01325.google.cloud.vertexai.v1.ExplanationMetadataOverride\022E\n" - + "\021examples_override\030\003" - + " \001(\0132*.google.cloud.vertexai.v1.ExamplesOverride\"\273\002\n" - + "\033ExplanationMetadataOverride\022V\n" - + "\006inputs\030\001 \003(\0132A.google.cl" - + "oud.vertexai.v1.ExplanationMetadataOverride.InputsEntryB\003\340A\002\032H\n" - + "\025InputMetadataOverride\022/\n" - + "\017input_baselines\030\001 \003(\0132\026.google.protobuf.Value\032z\n" - + "\013InputsEntry\022\013\n" - + "\003key\030\001 \001(\t\022Z\n" - + "\005value\030\002 \001(\0132K.google.cloud.vertexa" - + "i.v1.ExplanationMetadataOverride.InputMetadataOverride:\0028\001\"\302\002\n" - + "\020ExamplesOverride\022\026\n" - + "\016neighbor_count\030\001 \001(\005\022\026\n" - + "\016crowding_count\030\002 \001(\005\022M\n" - + "\014restrictions\030\003 \003(\01327.google.c" - + "loud.vertexai.v1.ExamplesRestrictionsNamespace\022\031\n" - + "\021return_embeddings\030\004 \001(\010\022J\n" - + "\013data_format\030\005" - + " \001(\01625.google.cloud.vertexai.v1.ExamplesOverride.DataFormat\"H\n\n" - + "DataFormat\022\033\n" - + "\027DATA_FORMAT_UNSPECIFIED\020\000\022\r\n" - + "\tINSTANCES\020\001\022\016\n\n" - + "EMBEDDINGS\020\002\"T\n" - + "\035ExamplesRestrictionsNamespace\022\026\n" - + "\016namespace_name\030\001 \001(\t\022\r\n" - + "\005allow\030\002 \003(\t\022\014\n" - + "\004deny\030\003 \003(\tB\315\001\n" - + "\035com.google.cloud.vertexai.apiB\020ExplanationProt" - + "oP\001Z>cloud.google.com/go/aiplatform/apiv" - + "1/aiplatformpb;aiplatformpb\252\002\032Google.Clo" - + "ud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfo" - + "rm\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vertexai.api.ExplanationMetadataProto.getDescriptor(), - com.google.cloud.vertexai.api.IoProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_Explanation_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_Explanation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Explanation_descriptor, - new java.lang.String[] { - "Attributions", "Neighbors", - }); - internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_ModelExplanation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor, - new java.lang.String[] { - "MeanAttributions", - }); - internal_static_google_cloud_vertexai_v1_Attribution_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_Attribution_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Attribution_descriptor, - new java.lang.String[] { - "BaselineOutputValue", - "InstanceOutputValue", - "FeatureAttributions", - "OutputIndex", - "OutputDisplayName", - "ApproximationError", - "OutputName", - }); - internal_static_google_cloud_vertexai_v1_Neighbor_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_Neighbor_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Neighbor_descriptor, - new java.lang.String[] { - "NeighborId", "NeighborDistance", - }); - internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_ExplanationSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor, - new java.lang.String[] { - "Parameters", "Metadata", - }); - internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_ExplanationParameters_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationParameters_descriptor, - new java.lang.String[] { - "SampledShapleyAttribution", - "IntegratedGradientsAttribution", - "XraiAttribution", - "Examples", - "TopK", - "OutputIndices", - "Method", - }); - internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor, - new java.lang.String[] { - "PathCount", - }); - internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor, - new java.lang.String[] { - "StepCount", "SmoothGradConfig", "BlurBaselineConfig", - }); - internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_XraiAttribution_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor, - new java.lang.String[] { - "StepCount", "SmoothGradConfig", "BlurBaselineConfig", - }); - internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_SmoothGradConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor, - new java.lang.String[] { - "NoiseSigma", "FeatureNoiseSigma", "NoisySampleCount", "GradientNoiseSigma", - }); - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor, - new java.lang.String[] { - "NoiseSigma", - }); - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor = - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor, - new java.lang.String[] { - "Name", "Sigma", - }); - internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_BlurBaselineConfig_descriptor, - new java.lang.String[] { - "MaxBlurSigma", - }); - internal_static_google_cloud_vertexai_v1_Examples_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_Examples_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Examples_descriptor, - new java.lang.String[] { - "ExampleGcsSource", - "NearestNeighborSearchConfig", - "Presets", - "NeighborCount", - "Source", - "Config", - }); - internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor = - internal_static_google_cloud_vertexai_v1_Examples_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Examples_ExampleGcsSource_descriptor, - new java.lang.String[] { - "DataFormat", "GcsSource", - }); - internal_static_google_cloud_vertexai_v1_Presets_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_Presets_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Presets_descriptor, - new java.lang.String[] { - "Query", "Modality", - }); - internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor = - getDescriptor().getMessageType(14); - internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor, - new java.lang.String[] { - "Parameters", "Metadata", "ExamplesOverride", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor = - getDescriptor().getMessageType(15); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor, - new java.lang.String[] { - "Inputs", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor - .getNestedType(0); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputMetadataOverride_descriptor, - new java.lang.String[] { - "InputBaselines", - }); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_descriptor - .getNestedType(1); - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplanationMetadataOverride_InputsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor = - getDescriptor().getMessageType(16); - internal_static_google_cloud_vertexai_v1_ExamplesOverride_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExamplesOverride_descriptor, - new java.lang.String[] { - "NeighborCount", "CrowdingCount", "Restrictions", "ReturnEmbeddings", "DataFormat", - }); - internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor = - getDescriptor().getMessageType(17); - internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExamplesRestrictionsNamespace_descriptor, - new java.lang.String[] { - "NamespaceName", "Allow", "Deny", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vertexai.api.ExplanationMetadataProto.getDescriptor(); - com.google.cloud.vertexai.api.IoProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java deleted file mode 100644 index 5b94dfb0d84e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java +++ /dev/null @@ -1,1030 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specification of Model explanation.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationSpec} - */ -@com.google.protobuf.Generated -public final class ExplanationSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationSpec) - ExplanationSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationSpec"); - } - - // Use ExplanationSpec.newBuilder() to construct. - private ExplanationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplanationSpec() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationSpec.class, - com.google.cloud.vertexai.api.ExplanationSpec.Builder.class); - } - - private int bitField0_; - public static final int PARAMETERS_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.ExplanationParameters parameters_; - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParameters getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - - public static final int METADATA_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.ExplanationMetadata metadata_; - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadata getMetadata() { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance() - : metadata_; - } - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance() - : metadata_; - } - - 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.writeMessage(1, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getMetadata()); - } - 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.computeMessageSize(1, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); - } - 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.vertexai.api.ExplanationSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationSpec other = - (com.google.cloud.vertexai.api.ExplanationSpec) obj; - - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) 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 (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec 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.vertexai.api.ExplanationSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec 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.vertexai.api.ExplanationSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specification of Model explanation.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationSpec) - com.google.cloud.vertexai.api.ExplanationSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationSpec.class, - com.google.cloud.vertexai.api.ExplanationSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplanationSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetParametersFieldBuilder(); - internalGetMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpec build() { - com.google.cloud.vertexai.api.ExplanationSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpec buildPartial() { - com.google.cloud.vertexai.api.ExplanationSpec result = - new com.google.cloud.vertexai.api.ExplanationSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplanationSpec result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationSpec) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplanationSpec other) { - if (other == com.google.cloud.vertexai.api.ExplanationSpec.getDefaultInstance()) return this; - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - 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( - internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetMetadataFieldBuilder().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.vertexai.api.ExplanationParameters parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.ExplanationParameters getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setParameters(com.google.cloud.vertexai.api.ExplanationParameters value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setParameters( - com.google.cloud.vertexai.api.ExplanationParameters.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.ExplanationParameters value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && parameters_ != null - && parameters_ - != com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ExplanationParameters.Builder getParametersBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * Required. Parameters that configure explaining of the Model's predictions.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.cloud.vertexai.api.ExplanationMetadata metadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder> - metadataBuilder_; - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metadata. - */ - public com.google.cloud.vertexai.api.ExplanationMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance() - : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetadata(com.google.cloud.vertexai.api.ExplanationMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetadata( - com.google.cloud.vertexai.api.ExplanationMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeMetadata(com.google.cloud.vertexai.api.ExplanationMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && metadata_ != null - && metadata_ - != com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadata.getDefaultInstance() - : metadata_; - } - } - - /** - * - * - *
-     * Optional. Metadata describing the Model's input and output for explanation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder> - internalGetMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadata, - com.google.cloud.vertexai.api.ExplanationMetadata.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationSpec) - private static final com.google.cloud.vertexai.api.ExplanationSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationSpec(); - } - - public static com.google.cloud.vertexai.api.ExplanationSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplanationSpec 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.vertexai.api.ExplanationSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java deleted file mode 100644 index 783b7eabc64b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.ExplanationParameters getParameters(); - - /** - * - * - *
-   * Required. Parameters that configure explaining of the Model's predictions.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder(); - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metadata. - */ - com.google.cloud.vertexai.api.ExplanationMetadata getMetadata(); - - /** - * - * - *
-   * Optional. Metadata describing the Model's input and output for explanation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ExplanationMetadataOrBuilder getMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java deleted file mode 100644 index b428f5a27f01..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java +++ /dev/null @@ -1,1297 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries
- * that can be overridden at [online
- * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationSpecOverride} - */ -@com.google.protobuf.Generated -public final class ExplanationSpecOverride extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ExplanationSpecOverride) - ExplanationSpecOverrideOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExplanationSpecOverride"); - } - - // Use ExplanationSpecOverride.newBuilder() to construct. - private ExplanationSpecOverride(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExplanationSpecOverride() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationSpecOverride.class, - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder.class); - } - - private int bitField0_; - public static final int PARAMETERS_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.ExplanationParameters parameters_; - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParameters getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - - public static final int METADATA_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.ExplanationMetadataOverride metadata_; - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return The metadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverride getMetadata() { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance() - : metadata_; - } - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder getMetadataOrBuilder() { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance() - : metadata_; - } - - public static final int EXAMPLES_OVERRIDE_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.ExamplesOverride examplesOverride_; - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return Whether the examplesOverride field is set. - */ - @java.lang.Override - public boolean hasExamplesOverride() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return The examplesOverride. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverride getExamplesOverride() { - return examplesOverride_ == null - ? com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance() - : examplesOverride_; - } - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder getExamplesOverrideOrBuilder() { - return examplesOverride_ == null - ? com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance() - : examplesOverride_; - } - - 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.writeMessage(1, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getMetadata()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(3, getExamplesOverride()); - } - 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.computeMessageSize(1, getParameters()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExamplesOverride()); - } - 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.vertexai.api.ExplanationSpecOverride)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ExplanationSpecOverride other = - (com.google.cloud.vertexai.api.ExplanationSpecOverride) obj; - - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) return false; - } - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) return false; - } - if (hasExamplesOverride() != other.hasExamplesOverride()) return false; - if (hasExamplesOverride()) { - if (!getExamplesOverride().equals(other.getExamplesOverride())) 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 (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (hasExamplesOverride()) { - hash = (37 * hash) + EXAMPLES_OVERRIDE_FIELD_NUMBER; - hash = (53 * hash) + getExamplesOverride().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride 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.vertexai.api.ExplanationSpecOverride parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride 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.vertexai.api.ExplanationSpecOverride parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ExplanationSpecOverride 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries
-   * that can be overridden at [online
-   * explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ExplanationSpecOverride} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ExplanationSpecOverride) - com.google.cloud.vertexai.api.ExplanationSpecOverrideOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ExplanationSpecOverride.class, - com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ExplanationSpecOverride.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetParametersFieldBuilder(); - internalGetMetadataFieldBuilder(); - internalGetExamplesOverrideFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - examplesOverride_ = null; - if (examplesOverrideBuilder_ != null) { - examplesOverrideBuilder_.dispose(); - examplesOverrideBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOverride getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOverride build() { - com.google.cloud.vertexai.api.ExplanationSpecOverride result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ExplanationSpecOverride buildPartial() { - com.google.cloud.vertexai.api.ExplanationSpecOverride result = - new com.google.cloud.vertexai.api.ExplanationSpecOverride(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ExplanationSpecOverride result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.examplesOverride_ = - examplesOverrideBuilder_ == null ? examplesOverride_ : examplesOverrideBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ExplanationSpecOverride) { - return mergeFrom((com.google.cloud.vertexai.api.ExplanationSpecOverride) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ExplanationSpecOverride other) { - if (other == com.google.cloud.vertexai.api.ExplanationSpecOverride.getDefaultInstance()) - return this; - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.hasExamplesOverride()) { - mergeExamplesOverride(other.getExamplesOverride()); - } - 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( - internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetExamplesOverrideFieldBuilder().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.vertexai.api.ExplanationParameters parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.ExplanationParameters getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public Builder setParameters(com.google.cloud.vertexai.api.ExplanationParameters value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public Builder setParameters( - com.google.cloud.vertexai.api.ExplanationParameters.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.ExplanationParameters value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && parameters_ != null - && parameters_ - != com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public com.google.cloud.vertexai.api.ExplanationParameters.Builder getParametersBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.ExplanationParameters.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters to be overridden. Note that the
-     * attribution method cannot be changed. If not specified,
-     * no parameter is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationParameters, - com.google.cloud.vertexai.api.ExplanationParameters.Builder, - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.cloud.vertexai.api.ExplanationMetadataOverride metadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder> - metadataBuilder_; - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return The metadata. - */ - public com.google.cloud.vertexai.api.ExplanationMetadataOverride getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance() - : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public Builder setMetadata(com.google.cloud.vertexai.api.ExplanationMetadataOverride value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public Builder setMetadata( - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public Builder mergeMetadata(com.google.cloud.vertexai.api.ExplanationMetadataOverride value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && metadata_ != null - && metadata_ - != com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - public com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder - getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null - ? com.google.cloud.vertexai.api.ExplanationMetadataOverride.getDefaultInstance() - : metadata_; - } - } - - /** - * - * - *
-     * The metadata to be overridden. If not specified, no metadata is overridden.
-     * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder> - internalGetMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExplanationMetadataOverride, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.Builder, - com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private com.google.cloud.vertexai.api.ExamplesOverride examplesOverride_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExamplesOverride, - com.google.cloud.vertexai.api.ExamplesOverride.Builder, - com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder> - examplesOverrideBuilder_; - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return Whether the examplesOverride field is set. - */ - public boolean hasExamplesOverride() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return The examplesOverride. - */ - public com.google.cloud.vertexai.api.ExamplesOverride getExamplesOverride() { - if (examplesOverrideBuilder_ == null) { - return examplesOverride_ == null - ? com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance() - : examplesOverride_; - } else { - return examplesOverrideBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public Builder setExamplesOverride(com.google.cloud.vertexai.api.ExamplesOverride value) { - if (examplesOverrideBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - examplesOverride_ = value; - } else { - examplesOverrideBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public Builder setExamplesOverride( - com.google.cloud.vertexai.api.ExamplesOverride.Builder builderForValue) { - if (examplesOverrideBuilder_ == null) { - examplesOverride_ = builderForValue.build(); - } else { - examplesOverrideBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public Builder mergeExamplesOverride(com.google.cloud.vertexai.api.ExamplesOverride value) { - if (examplesOverrideBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && examplesOverride_ != null - && examplesOverride_ - != com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance()) { - getExamplesOverrideBuilder().mergeFrom(value); - } else { - examplesOverride_ = value; - } - } else { - examplesOverrideBuilder_.mergeFrom(value); - } - if (examplesOverride_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public Builder clearExamplesOverride() { - bitField0_ = (bitField0_ & ~0x00000004); - examplesOverride_ = null; - if (examplesOverrideBuilder_ != null) { - examplesOverrideBuilder_.dispose(); - examplesOverrideBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public com.google.cloud.vertexai.api.ExamplesOverride.Builder getExamplesOverrideBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetExamplesOverrideFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - public com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder getExamplesOverrideOrBuilder() { - if (examplesOverrideBuilder_ != null) { - return examplesOverrideBuilder_.getMessageOrBuilder(); - } else { - return examplesOverride_ == null - ? com.google.cloud.vertexai.api.ExamplesOverride.getDefaultInstance() - : examplesOverride_; - } - } - - /** - * - * - *
-     * The example-based explanations parameter overrides.
-     * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExamplesOverride, - com.google.cloud.vertexai.api.ExamplesOverride.Builder, - com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder> - internalGetExamplesOverrideFieldBuilder() { - if (examplesOverrideBuilder_ == null) { - examplesOverrideBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExamplesOverride, - com.google.cloud.vertexai.api.ExamplesOverride.Builder, - com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder>( - getExamplesOverride(), getParentForChildren(), isClean()); - examplesOverride_ = null; - } - return examplesOverrideBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ExplanationSpecOverride) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ExplanationSpecOverride) - private static final com.google.cloud.vertexai.api.ExplanationSpecOverride DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ExplanationSpecOverride(); - } - - public static com.google.cloud.vertexai.api.ExplanationSpecOverride getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExplanationSpecOverride 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.vertexai.api.ExplanationSpecOverride getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java deleted file mode 100644 index 20f242792111..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ExplanationSpecOverrideOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ExplanationSpecOverride) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.ExplanationParameters getParameters(); - - /** - * - * - *
-   * The parameters to be overridden. Note that the
-   * attribution method cannot be changed. If not specified,
-   * no parameter is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationParameters parameters = 1; - */ - com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParametersOrBuilder(); - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - * - * @return The metadata. - */ - com.google.cloud.vertexai.api.ExplanationMetadataOverride getMetadata(); - - /** - * - * - *
-   * The metadata to be overridden. If not specified, no metadata is overridden.
-   * 
- * - * .google.cloud.vertexai.v1.ExplanationMetadataOverride metadata = 2; - */ - com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder getMetadataOrBuilder(); - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return Whether the examplesOverride field is set. - */ - boolean hasExamplesOverride(); - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - * - * @return The examplesOverride. - */ - com.google.cloud.vertexai.api.ExamplesOverride getExamplesOverride(); - - /** - * - * - *
-   * The example-based explanations parameter overrides.
-   * 
- * - * .google.cloud.vertexai.v1.ExamplesOverride examples_override = 3; - */ - com.google.cloud.vertexai.api.ExamplesOverrideOrBuilder getExamplesOverrideOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfig.java deleted file mode 100644 index e0d35cb1aaff..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfig.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for faster model deployment.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FasterDeploymentConfig} - */ -@com.google.protobuf.Generated -public final class FasterDeploymentConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FasterDeploymentConfig) - FasterDeploymentConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FasterDeploymentConfig"); - } - - // Use FasterDeploymentConfig.newBuilder() to construct. - private FasterDeploymentConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FasterDeploymentConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FasterDeploymentConfig.class, - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder.class); - } - - public static final int FAST_TRYOUT_ENABLED_FIELD_NUMBER = 2; - private boolean fastTryoutEnabled_ = false; - - /** - * - * - *
-   * If true, enable fast tryout feature for this deployed model.
-   * 
- * - * bool fast_tryout_enabled = 2; - * - * @return The fastTryoutEnabled. - */ - @java.lang.Override - public boolean getFastTryoutEnabled() { - return fastTryoutEnabled_; - } - - 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 (fastTryoutEnabled_ != false) { - output.writeBool(2, fastTryoutEnabled_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fastTryoutEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, fastTryoutEnabled_); - } - 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.vertexai.api.FasterDeploymentConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FasterDeploymentConfig other = - (com.google.cloud.vertexai.api.FasterDeploymentConfig) obj; - - if (getFastTryoutEnabled() != other.getFastTryoutEnabled()) 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) + FAST_TRYOUT_ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFastTryoutEnabled()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig 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.vertexai.api.FasterDeploymentConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig 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.vertexai.api.FasterDeploymentConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FasterDeploymentConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for faster model deployment.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FasterDeploymentConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FasterDeploymentConfig) - com.google.cloud.vertexai.api.FasterDeploymentConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FasterDeploymentConfig.class, - com.google.cloud.vertexai.api.FasterDeploymentConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FasterDeploymentConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fastTryoutEnabled_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_FasterDeploymentConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FasterDeploymentConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FasterDeploymentConfig build() { - com.google.cloud.vertexai.api.FasterDeploymentConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FasterDeploymentConfig buildPartial() { - com.google.cloud.vertexai.api.FasterDeploymentConfig result = - new com.google.cloud.vertexai.api.FasterDeploymentConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FasterDeploymentConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fastTryoutEnabled_ = fastTryoutEnabled_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FasterDeploymentConfig) { - return mergeFrom((com.google.cloud.vertexai.api.FasterDeploymentConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FasterDeploymentConfig other) { - if (other == com.google.cloud.vertexai.api.FasterDeploymentConfig.getDefaultInstance()) - return this; - if (other.getFastTryoutEnabled() != false) { - setFastTryoutEnabled(other.getFastTryoutEnabled()); - } - 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: - { - fastTryoutEnabled_ = input.readBool(); - bitField0_ |= 0x00000001; - 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 fastTryoutEnabled_; - - /** - * - * - *
-     * If true, enable fast tryout feature for this deployed model.
-     * 
- * - * bool fast_tryout_enabled = 2; - * - * @return The fastTryoutEnabled. - */ - @java.lang.Override - public boolean getFastTryoutEnabled() { - return fastTryoutEnabled_; - } - - /** - * - * - *
-     * If true, enable fast tryout feature for this deployed model.
-     * 
- * - * bool fast_tryout_enabled = 2; - * - * @param value The fastTryoutEnabled to set. - * @return This builder for chaining. - */ - public Builder setFastTryoutEnabled(boolean value) { - - fastTryoutEnabled_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, enable fast tryout feature for this deployed model.
-     * 
- * - * bool fast_tryout_enabled = 2; - * - * @return This builder for chaining. - */ - public Builder clearFastTryoutEnabled() { - bitField0_ = (bitField0_ & ~0x00000001); - fastTryoutEnabled_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FasterDeploymentConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FasterDeploymentConfig) - private static final com.google.cloud.vertexai.api.FasterDeploymentConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FasterDeploymentConfig(); - } - - public static com.google.cloud.vertexai.api.FasterDeploymentConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FasterDeploymentConfig 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.vertexai.api.FasterDeploymentConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfigOrBuilder.java deleted file mode 100644 index b7e8b29a7f47..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FasterDeploymentConfigOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FasterDeploymentConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FasterDeploymentConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * If true, enable fast tryout feature for this deployed model.
-   * 
- * - * bool fast_tryout_enabled = 2; - * - * @return The fastTryoutEnabled. - */ - boolean getFastTryoutEnabled(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java deleted file mode 100644 index 327672fa8c08..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java +++ /dev/null @@ -1,1778 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Noise sigma by features. Noise sigma represents the standard deviation of the
- * gaussian kernel that will be used to add noise to interpolated inputs prior
- * to computing gradients.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FeatureNoiseSigma} - */ -@com.google.protobuf.Generated -public final class FeatureNoiseSigma extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FeatureNoiseSigma) - FeatureNoiseSigmaOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FeatureNoiseSigma"); - } - - // Use FeatureNoiseSigma.newBuilder() to construct. - private FeatureNoiseSigma(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FeatureNoiseSigma() { - noiseSigma_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FeatureNoiseSigma.class, - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder.class); - } - - public interface NoiseSigmaForFeatureOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The name of the input feature for which noise sigma is provided. The
-     * features are defined in
-     * [explanation metadata
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-     * The name of the input feature for which noise sigma is provided. The
-     * features are defined in
-     * [explanation metadata
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-     * This represents the standard deviation of the Gaussian kernel that will
-     * be used to add noise to the feature prior to computing gradients. Similar
-     * to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * but represents the noise added to the current feature. Defaults to 0.1.
-     * 
- * - * float sigma = 2; - * - * @return The sigma. - */ - float getSigma(); - } - - /** - * - * - *
-   * Noise sigma for a single feature.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature} - */ - public static final class NoiseSigmaForFeature extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature) - NoiseSigmaForFeatureOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "NoiseSigmaForFeature"); - } - - // Use NoiseSigmaForFeature.newBuilder() to construct. - private NoiseSigmaForFeature(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private NoiseSigmaForFeature() { - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.class, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-     * The name of the input feature for which noise sigma is provided. The
-     * features are defined in
-     * [explanation metadata
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * 
- * - * 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; - } - } - - /** - * - * - *
-     * The name of the input feature for which noise sigma is provided. The
-     * features are defined in
-     * [explanation metadata
-     * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-     * 
- * - * 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 SIGMA_FIELD_NUMBER = 2; - private float sigma_ = 0F; - - /** - * - * - *
-     * This represents the standard deviation of the Gaussian kernel that will
-     * be used to add noise to the feature prior to computing gradients. Similar
-     * to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * but represents the noise added to the current feature. Defaults to 0.1.
-     * 
- * - * float sigma = 2; - * - * @return The sigma. - */ - @java.lang.Override - public float getSigma() { - return sigma_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (java.lang.Float.floatToRawIntBits(sigma_) != 0) { - output.writeFloat(2, sigma_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (java.lang.Float.floatToRawIntBits(sigma_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, sigma_); - } - 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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature other = - (com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature) obj; - - if (!getName().equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getSigma()) - != java.lang.Float.floatToIntBits(other.getSigma())) 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) + SIGMA_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getSigma()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature 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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature 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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Noise sigma for a single feature.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature) - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.class, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - sigma_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_NoiseSigmaForFeature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature build() { - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature buildPartial() { - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature result = - new com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.sigma_ = sigma_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature) { - return mergeFrom( - (com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature other) { - if (other - == com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (java.lang.Float.floatToRawIntBits(other.getSigma()) != 0) { - setSigma(other.getSigma()); - } - 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 21: - { - sigma_ = 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 name_ = ""; - - /** - * - * - *
-       * The name of the input feature for which noise sigma is provided. The
-       * features are defined in
-       * [explanation metadata
-       * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-       * 
- * - * 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; - } - } - - /** - * - * - *
-       * The name of the input feature for which noise sigma is provided. The
-       * features are defined in
-       * [explanation metadata
-       * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-       * 
- * - * 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; - } - } - - /** - * - * - *
-       * The name of the input feature for which noise sigma is provided. The
-       * features are defined in
-       * [explanation metadata
-       * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-       * 
- * - * 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; - } - - /** - * - * - *
-       * The name of the input feature for which noise sigma is provided. The
-       * features are defined in
-       * [explanation metadata
-       * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-       * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of the input feature for which noise sigma is provided. The
-       * features are defined in
-       * [explanation metadata
-       * inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
-       * 
- * - * 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 float sigma_; - - /** - * - * - *
-       * This represents the standard deviation of the Gaussian kernel that will
-       * be used to add noise to the feature prior to computing gradients. Similar
-       * to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-       * but represents the noise added to the current feature. Defaults to 0.1.
-       * 
- * - * float sigma = 2; - * - * @return The sigma. - */ - @java.lang.Override - public float getSigma() { - return sigma_; - } - - /** - * - * - *
-       * This represents the standard deviation of the Gaussian kernel that will
-       * be used to add noise to the feature prior to computing gradients. Similar
-       * to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-       * but represents the noise added to the current feature. Defaults to 0.1.
-       * 
- * - * float sigma = 2; - * - * @param value The sigma to set. - * @return This builder for chaining. - */ - public Builder setSigma(float value) { - - sigma_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * This represents the standard deviation of the Gaussian kernel that will
-       * be used to add noise to the feature prior to computing gradients. Similar
-       * to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-       * but represents the noise added to the current feature. Defaults to 0.1.
-       * 
- * - * float sigma = 2; - * - * @return This builder for chaining. - */ - public Builder clearSigma() { - bitField0_ = (bitField0_ & ~0x00000002); - sigma_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature) - private static final com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature(); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NoiseSigmaForFeature 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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int NOISE_SIGMA_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - noiseSigma_; - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - @java.lang.Override - public java.util.List - getNoiseSigmaList() { - return noiseSigma_; - } - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder> - getNoiseSigmaOrBuilderList() { - return noiseSigma_; - } - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - @java.lang.Override - public int getNoiseSigmaCount() { - return noiseSigma_.size(); - } - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature getNoiseSigma( - int index) { - return noiseSigma_.get(index); - } - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder - getNoiseSigmaOrBuilder(int index) { - return noiseSigma_.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 < noiseSigma_.size(); i++) { - output.writeMessage(1, noiseSigma_.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 < noiseSigma_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, noiseSigma_.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.vertexai.api.FeatureNoiseSigma)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FeatureNoiseSigma other = - (com.google.cloud.vertexai.api.FeatureNoiseSigma) obj; - - if (!getNoiseSigmaList().equals(other.getNoiseSigmaList())) 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 (getNoiseSigmaCount() > 0) { - hash = (37 * hash) + NOISE_SIGMA_FIELD_NUMBER; - hash = (53 * hash) + getNoiseSigmaList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma 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.vertexai.api.FeatureNoiseSigma parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma 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.vertexai.api.FeatureNoiseSigma parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FeatureNoiseSigma 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Noise sigma by features. Noise sigma represents the standard deviation of the
-   * gaussian kernel that will be used to add noise to interpolated inputs prior
-   * to computing gradients.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FeatureNoiseSigma} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FeatureNoiseSigma) - com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FeatureNoiseSigma.class, - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FeatureNoiseSigma.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (noiseSigmaBuilder_ == null) { - noiseSigma_ = java.util.Collections.emptyList(); - } else { - noiseSigma_ = null; - noiseSigmaBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_FeatureNoiseSigma_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma build() { - com.google.cloud.vertexai.api.FeatureNoiseSigma result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma buildPartial() { - com.google.cloud.vertexai.api.FeatureNoiseSigma result = - new com.google.cloud.vertexai.api.FeatureNoiseSigma(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.FeatureNoiseSigma result) { - if (noiseSigmaBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - noiseSigma_ = java.util.Collections.unmodifiableList(noiseSigma_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.noiseSigma_ = noiseSigma_; - } else { - result.noiseSigma_ = noiseSigmaBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.FeatureNoiseSigma result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FeatureNoiseSigma) { - return mergeFrom((com.google.cloud.vertexai.api.FeatureNoiseSigma) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FeatureNoiseSigma other) { - if (other == com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance()) - return this; - if (noiseSigmaBuilder_ == null) { - if (!other.noiseSigma_.isEmpty()) { - if (noiseSigma_.isEmpty()) { - noiseSigma_ = other.noiseSigma_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNoiseSigmaIsMutable(); - noiseSigma_.addAll(other.noiseSigma_); - } - onChanged(); - } - } else { - if (!other.noiseSigma_.isEmpty()) { - if (noiseSigmaBuilder_.isEmpty()) { - noiseSigmaBuilder_.dispose(); - noiseSigmaBuilder_ = null; - noiseSigma_ = other.noiseSigma_; - bitField0_ = (bitField0_ & ~0x00000001); - noiseSigmaBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetNoiseSigmaFieldBuilder() - : null; - } else { - noiseSigmaBuilder_.addAllMessages(other.noiseSigma_); - } - } - } - 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.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature m = - input.readMessage( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - .parser(), - extensionRegistry); - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - noiseSigma_.add(m); - } else { - noiseSigmaBuilder_.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 - noiseSigma_ = java.util.Collections.emptyList(); - - private void ensureNoiseSigmaIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - noiseSigma_ = - new java.util.ArrayList< - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature>(noiseSigma_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder> - noiseSigmaBuilder_; - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public java.util.List - getNoiseSigmaList() { - if (noiseSigmaBuilder_ == null) { - return java.util.Collections.unmodifiableList(noiseSigma_); - } else { - return noiseSigmaBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public int getNoiseSigmaCount() { - if (noiseSigmaBuilder_ == null) { - return noiseSigma_.size(); - } else { - return noiseSigmaBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature getNoiseSigma( - int index) { - if (noiseSigmaBuilder_ == null) { - return noiseSigma_.get(index); - } else { - return noiseSigmaBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder setNoiseSigma( - int index, com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature value) { - if (noiseSigmaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNoiseSigmaIsMutable(); - noiseSigma_.set(index, value); - onChanged(); - } else { - noiseSigmaBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder setNoiseSigma( - int index, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - builderForValue) { - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - noiseSigma_.set(index, builderForValue.build()); - onChanged(); - } else { - noiseSigmaBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder addNoiseSigma( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature value) { - if (noiseSigmaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNoiseSigmaIsMutable(); - noiseSigma_.add(value); - onChanged(); - } else { - noiseSigmaBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder addNoiseSigma( - int index, com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature value) { - if (noiseSigmaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNoiseSigmaIsMutable(); - noiseSigma_.add(index, value); - onChanged(); - } else { - noiseSigmaBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder addNoiseSigma( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - builderForValue) { - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - noiseSigma_.add(builderForValue.build()); - onChanged(); - } else { - noiseSigmaBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder addNoiseSigma( - int index, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - builderForValue) { - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - noiseSigma_.add(index, builderForValue.build()); - onChanged(); - } else { - noiseSigmaBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder addAllNoiseSigma( - java.lang.Iterable< - ? extends com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature> - values) { - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, noiseSigma_); - onChanged(); - } else { - noiseSigmaBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder clearNoiseSigma() { - if (noiseSigmaBuilder_ == null) { - noiseSigma_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - noiseSigmaBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public Builder removeNoiseSigma(int index) { - if (noiseSigmaBuilder_ == null) { - ensureNoiseSigmaIsMutable(); - noiseSigma_.remove(index); - onChanged(); - } else { - noiseSigmaBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - getNoiseSigmaBuilder(int index) { - return internalGetNoiseSigmaFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder - getNoiseSigmaOrBuilder(int index) { - if (noiseSigmaBuilder_ == null) { - return noiseSigma_.get(index); - } else { - return noiseSigmaBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder> - getNoiseSigmaOrBuilderList() { - if (noiseSigmaBuilder_ != null) { - return noiseSigmaBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(noiseSigma_); - } - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - addNoiseSigmaBuilder() { - return internalGetNoiseSigmaFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - .getDefaultInstance()); - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder - addNoiseSigmaBuilder(int index) { - return internalGetNoiseSigmaFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature - .getDefaultInstance()); - } - - /** - * - * - *
-     * Noise sigma per feature. No noise is added to features that are not set.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - public java.util.List< - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder> - getNoiseSigmaBuilderList() { - return internalGetNoiseSigmaFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder> - internalGetNoiseSigmaFieldBuilder() { - if (noiseSigmaBuilder_ == null) { - noiseSigmaBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder>( - noiseSigma_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - noiseSigma_ = null; - } - return noiseSigmaBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FeatureNoiseSigma) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FeatureNoiseSigma) - private static final com.google.cloud.vertexai.api.FeatureNoiseSigma DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FeatureNoiseSigma(); - } - - public static com.google.cloud.vertexai.api.FeatureNoiseSigma getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FeatureNoiseSigma 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.vertexai.api.FeatureNoiseSigma getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java deleted file mode 100644 index 0938fa37c688..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FeatureNoiseSigmaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FeatureNoiseSigma) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - java.util.List - getNoiseSigmaList(); - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeature getNoiseSigma(int index); - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - int getNoiseSigmaCount(); - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - java.util.List< - ? extends com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder> - getNoiseSigmaOrBuilderList(); - - /** - * - * - *
-   * Noise sigma per feature. No noise is added to features that are not set.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FeatureNoiseSigma.NoiseSigmaForFeature noise_sigma = 1; - * - */ - com.google.cloud.vertexai.api.FeatureNoiseSigma.NoiseSigmaForFeatureOrBuilder - getNoiseSigmaOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java deleted file mode 100644 index 81218e09ec5d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java +++ /dev/null @@ -1,783 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * URI based data.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FileData} - */ -@com.google.protobuf.Generated -public final class FileData extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FileData) - FileDataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FileData"); - } - - // Use FileData.newBuilder() to construct. - private FileData(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FileData() { - mimeType_ = ""; - fileUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_FileData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_FileData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FileData.class, - com.google.cloud.vertexai.api.FileData.Builder.class); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object mimeType_ = ""; - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - public static final int FILE_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object fileUri_ = ""; - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - @java.lang.Override - public java.lang.String getFileUri() { - java.lang.Object ref = fileUri_; - 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(); - fileUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFileUriBytes() { - java.lang.Object ref = fileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileUri_ = 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.GeneratedMessage.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, fileUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, fileUri_); - } - 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.vertexai.api.FileData)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FileData other = (com.google.cloud.vertexai.api.FileData) obj; - - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getFileUri().equals(other.getFileUri())) 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) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFileUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FileData parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileData 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.vertexai.api.FileData parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileData 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.vertexai.api.FileData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileData parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileData parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileData parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileData parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileData parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileData parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FileData 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * URI based data.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FileData} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FileData) - com.google.cloud.vertexai.api.FileDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_FileData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_FileData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FileData.class, - com.google.cloud.vertexai.api.FileData.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FileData.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mimeType_ = ""; - fileUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_FileData_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileData getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileData build() { - com.google.cloud.vertexai.api.FileData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileData buildPartial() { - com.google.cloud.vertexai.api.FileData result = - new com.google.cloud.vertexai.api.FileData(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FileData result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mimeType_ = mimeType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fileUri_ = fileUri_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FileData) { - return mergeFrom((com.google.cloud.vertexai.api.FileData) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FileData other) { - if (other == com.google.cloud.vertexai.api.FileData.getDefaultInstance()) return this; - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFileUri().isEmpty()) { - fileUri_ = other.fileUri_; - 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: - { - mimeType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - fileUri_ = 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 mimeType_ = ""; - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object fileUri_ = ""; - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - public java.lang.String getFileUri() { - java.lang.Object ref = fileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - public com.google.protobuf.ByteString getFileUriBytes() { - java.lang.Object ref = fileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The fileUri to set. - * @return This builder for chaining. - */ - public Builder setFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - fileUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFileUri() { - fileUri_ = getDefaultInstance().getFileUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for fileUri to set. - * @return This builder for chaining. - */ - public Builder setFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - fileUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FileData) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FileData) - private static final com.google.cloud.vertexai.api.FileData DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FileData(); - } - - public static com.google.cloud.vertexai.api.FileData getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileData 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.vertexai.api.FileData getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java deleted file mode 100644 index 80a3a0ea1ddc..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FileDataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FileData) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - java.lang.String getFileUri(); - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - com.google.protobuf.ByteString getFileUriBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatus.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatus.java deleted file mode 100644 index 8d602e6ed3b6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatus.java +++ /dev/null @@ -1,934 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * RagFile status.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FileStatus} - */ -@com.google.protobuf.Generated -public final class FileStatus extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FileStatus) - FileStatusOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FileStatus"); - } - - // Use FileStatus.newBuilder() to construct. - private FileStatus(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FileStatus() { - state_ = 0; - errorStatus_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_FileStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_FileStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FileStatus.class, - com.google.cloud.vertexai.api.FileStatus.Builder.class); - } - - /** - * - * - *
-   * RagFile state.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.FileStatus.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * RagFile state is unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * RagFile resource has been created and indexed successfully.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - /** - * - * - *
-     * RagFile resource is in a problematic state.
-     * See `error_message` field for details.
-     * 
- * - * ERROR = 2; - */ - ERROR(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "State"); - } - - /** - * - * - *
-     * RagFile state is unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * RagFile resource has been created and indexed successfully.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - - /** - * - * - *
-     * RagFile resource is in a problematic state.
-     * See `error_message` field for details.
-     * 
- * - * ERROR = 2; - */ - public static final int ERROR_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 ACTIVE; - case 2: - return ERROR; - 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.FileStatus.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.vertexai.v1.FileStatus.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_ = 0; - - /** - * - * - *
-   * Output only. RagFile state.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.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. RagFile state.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus.State getState() { - com.google.cloud.vertexai.api.FileStatus.State result = - com.google.cloud.vertexai.api.FileStatus.State.forNumber(state_); - return result == null ? com.google.cloud.vertexai.api.FileStatus.State.UNRECOGNIZED : result; - } - - public static final int ERROR_STATUS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object errorStatus_ = ""; - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - @java.lang.Override - public java.lang.String getErrorStatus() { - java.lang.Object ref = errorStatus_; - 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(); - errorStatus_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - @java.lang.Override - public com.google.protobuf.ByteString getErrorStatusBytes() { - java.lang.Object ref = errorStatus_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorStatus_ = 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 (state_ != com.google.cloud.vertexai.api.FileStatus.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorStatus_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, errorStatus_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vertexai.api.FileStatus.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorStatus_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorStatus_); - } - 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.vertexai.api.FileStatus)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FileStatus other = (com.google.cloud.vertexai.api.FileStatus) obj; - - if (state_ != other.state_) return false; - if (!getErrorStatus().equals(other.getErrorStatus())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + ERROR_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getErrorStatus().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileStatus 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.vertexai.api.FileStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileStatus 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.vertexai.api.FileStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileStatus parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FileStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FileStatus 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * RagFile status.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FileStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FileStatus) - com.google.cloud.vertexai.api.FileStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_FileStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_FileStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FileStatus.class, - com.google.cloud.vertexai.api.FileStatus.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FileStatus.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - state_ = 0; - errorStatus_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_FileStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FileStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus build() { - com.google.cloud.vertexai.api.FileStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus buildPartial() { - com.google.cloud.vertexai.api.FileStatus result = - new com.google.cloud.vertexai.api.FileStatus(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FileStatus result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.errorStatus_ = errorStatus_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FileStatus) { - return mergeFrom((com.google.cloud.vertexai.api.FileStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FileStatus other) { - if (other == com.google.cloud.vertexai.api.FileStatus.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getErrorStatus().isEmpty()) { - errorStatus_ = other.errorStatus_; - 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: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - errorStatus_ = 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 state_ = 0; - - /** - * - * - *
-     * Output only. RagFile state.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.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. RagFile state.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagFile state.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus.State getState() { - com.google.cloud.vertexai.api.FileStatus.State result = - com.google.cloud.vertexai.api.FileStatus.State.forNumber(state_); - return result == null ? com.google.cloud.vertexai.api.FileStatus.State.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Output only. RagFile state.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vertexai.api.FileStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - state_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagFile state.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000001); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object errorStatus_ = ""; - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - public java.lang.String getErrorStatus() { - java.lang.Object ref = errorStatus_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - errorStatus_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - public com.google.protobuf.ByteString getErrorStatusBytes() { - java.lang.Object ref = errorStatus_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - errorStatus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The errorStatus to set. - * @return This builder for chaining. - */ - public Builder setErrorStatus(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - errorStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearErrorStatus() { - errorStatus_ = getDefaultInstance().getErrorStatus(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Only when the `state` field is ERROR.
-     * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for errorStatus to set. - * @return This builder for chaining. - */ - public Builder setErrorStatusBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - errorStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FileStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FileStatus) - private static final com.google.cloud.vertexai.api.FileStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FileStatus(); - } - - public static com.google.cloud.vertexai.api.FileStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileStatus 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.vertexai.api.FileStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatusOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatusOrBuilder.java deleted file mode 100644 index 081ca72f1a40..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileStatusOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FileStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FileStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. RagFile state.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - - /** - * - * - *
-   * Output only. RagFile state.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.vertexai.api.FileStatus.State getState(); - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorStatus. - */ - java.lang.String getErrorStatus(); - - /** - * - * - *
-   * Output only. Only when the `state` field is ERROR.
-   * 
- * - * string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorStatus. - */ - com.google.protobuf.ByteString getErrorStatusBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java deleted file mode 100644 index 9e6bcebb7c5a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java +++ /dev/null @@ -1,1614 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A predicted [FunctionCall] returned from the model that contains a string
- * representing the [FunctionDeclaration.name] and a structured JSON object
- * containing the parameters and their values.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionCall} - */ -@com.google.protobuf.Generated -public final class FunctionCall extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionCall) - FunctionCallOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionCall"); - } - - // Use FunctionCall.newBuilder() to construct. - private FunctionCall(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionCall() { - name_ = ""; - partialArgs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCall_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionCall.class, - com.google.cloud.vertexai.api.FunctionCall.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Optional. The name of the function to call.
-   * Matches [FunctionDeclaration.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. The name of the function to call.
-   * Matches [FunctionDeclaration.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 ARGS_FIELD_NUMBER = 2; - private com.google.protobuf.Struct args_; - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the args field is set. - */ - @java.lang.Override - public boolean hasArgs() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The args. - */ - @java.lang.Override - public com.google.protobuf.Struct getArgs() { - return args_ == null ? com.google.protobuf.Struct.getDefaultInstance() : args_; - } - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getArgsOrBuilder() { - return args_ == null ? com.google.protobuf.Struct.getDefaultInstance() : args_; - } - - public static final int PARTIAL_ARGS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List partialArgs_; - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getPartialArgsList() { - return partialArgs_; - } - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getPartialArgsOrBuilderList() { - return partialArgs_; - } - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getPartialArgsCount() { - return partialArgs_.size(); - } - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PartialArg getPartialArgs(int index) { - return partialArgs_.get(index); - } - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PartialArgOrBuilder getPartialArgsOrBuilder(int index) { - return partialArgs_.get(index); - } - - public static final int WILL_CONTINUE_FIELD_NUMBER = 5; - private boolean willContinue_ = false; - - /** - * - * - *
-   * Optional. Whether this is the last part of the FunctionCall.
-   * If true, another partial message for the current FunctionCall is expected
-   * to follow.
-   * 
- * - * bool will_continue = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - @java.lang.Override - public boolean getWillContinue() { - return willContinue_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getArgs()); - } - for (int i = 0; i < partialArgs_.size(); i++) { - output.writeMessage(4, partialArgs_.get(i)); - } - if (willContinue_ != false) { - output.writeBool(5, willContinue_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getArgs()); - } - for (int i = 0; i < partialArgs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, partialArgs_.get(i)); - } - if (willContinue_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, willContinue_); - } - 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.vertexai.api.FunctionCall)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionCall other = - (com.google.cloud.vertexai.api.FunctionCall) obj; - - if (!getName().equals(other.getName())) return false; - if (hasArgs() != other.hasArgs()) return false; - if (hasArgs()) { - if (!getArgs().equals(other.getArgs())) return false; - } - if (!getPartialArgsList().equals(other.getPartialArgsList())) return false; - if (getWillContinue() != other.getWillContinue()) 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 (hasArgs()) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgs().hashCode(); - } - if (getPartialArgsCount() > 0) { - hash = (37 * hash) + PARTIAL_ARGS_FIELD_NUMBER; - hash = (53 * hash) + getPartialArgsList().hashCode(); - } - hash = (37 * hash) + WILL_CONTINUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWillContinue()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCall 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.vertexai.api.FunctionCall parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCall 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.vertexai.api.FunctionCall parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCall parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionCall 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A predicted [FunctionCall] returned from the model that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing the parameters and their values.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionCall} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionCall) - com.google.cloud.vertexai.api.FunctionCallOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCall_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionCall.class, - com.google.cloud.vertexai.api.FunctionCall.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionCall.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetArgsFieldBuilder(); - internalGetPartialArgsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - args_ = null; - if (argsBuilder_ != null) { - argsBuilder_.dispose(); - argsBuilder_ = null; - } - if (partialArgsBuilder_ == null) { - partialArgs_ = java.util.Collections.emptyList(); - } else { - partialArgs_ = null; - partialArgsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - willContinue_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCall getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCall build() { - com.google.cloud.vertexai.api.FunctionCall result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCall buildPartial() { - com.google.cloud.vertexai.api.FunctionCall result = - new com.google.cloud.vertexai.api.FunctionCall(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.FunctionCall result) { - if (partialArgsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialArgs_ = java.util.Collections.unmodifiableList(partialArgs_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialArgs_ = partialArgs_; - } else { - result.partialArgs_ = partialArgsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionCall result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.args_ = argsBuilder_ == null ? args_ : argsBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.willContinue_ = willContinue_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionCall) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionCall) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionCall other) { - if (other == com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasArgs()) { - mergeArgs(other.getArgs()); - } - if (partialArgsBuilder_ == null) { - if (!other.partialArgs_.isEmpty()) { - if (partialArgs_.isEmpty()) { - partialArgs_ = other.partialArgs_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialArgsIsMutable(); - partialArgs_.addAll(other.partialArgs_); - } - onChanged(); - } - } else { - if (!other.partialArgs_.isEmpty()) { - if (partialArgsBuilder_.isEmpty()) { - partialArgsBuilder_.dispose(); - partialArgsBuilder_ = null; - partialArgs_ = other.partialArgs_; - bitField0_ = (bitField0_ & ~0x00000004); - partialArgsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPartialArgsFieldBuilder() - : null; - } else { - partialArgsBuilder_.addAllMessages(other.partialArgs_); - } - } - } - if (other.getWillContinue() != false) { - setWillContinue(other.getWillContinue()); - } - 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(internalGetArgsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - com.google.cloud.vertexai.api.PartialArg m = - input.readMessage( - com.google.cloud.vertexai.api.PartialArg.parser(), extensionRegistry); - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - partialArgs_.add(m); - } else { - partialArgsBuilder_.addMessage(m); - } - break; - } // case 34 - case 40: - { - willContinue_ = 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 java.lang.Object name_ = ""; - - /** - * - * - *
-     * Optional. The name of the function to call.
-     * Matches [FunctionDeclaration.name].
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The name of the function to call.
-     * Matches [FunctionDeclaration.name].
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The name of the function to call.
-     * Matches [FunctionDeclaration.name].
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - /** - * - * - *
-     * Optional. The name of the function to call.
-     * Matches [FunctionDeclaration.name].
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the function to call.
-     * Matches [FunctionDeclaration.name].
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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.Struct args_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - argsBuilder_; - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the args field is set. - */ - public boolean hasArgs() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The args. - */ - public com.google.protobuf.Struct getArgs() { - if (argsBuilder_ == null) { - return args_ == null ? com.google.protobuf.Struct.getDefaultInstance() : args_; - } else { - return argsBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setArgs(com.google.protobuf.Struct value) { - if (argsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - args_ = value; - } else { - argsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setArgs(com.google.protobuf.Struct.Builder builderForValue) { - if (argsBuilder_ == null) { - args_ = builderForValue.build(); - } else { - argsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeArgs(com.google.protobuf.Struct value) { - if (argsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && args_ != null - && args_ != com.google.protobuf.Struct.getDefaultInstance()) { - getArgsBuilder().mergeFrom(value); - } else { - args_ = value; - } - } else { - argsBuilder_.mergeFrom(value); - } - if (args_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearArgs() { - bitField0_ = (bitField0_ & ~0x00000002); - args_ = null; - if (argsBuilder_ != null) { - argsBuilder_.dispose(); - argsBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Struct.Builder getArgsBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetArgsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.StructOrBuilder getArgsOrBuilder() { - if (argsBuilder_ != null) { - return argsBuilder_.getMessageOrBuilder(); - } else { - return args_ == null ? com.google.protobuf.Struct.getDefaultInstance() : args_; - } - } - - /** - * - * - *
-     * Optional. The function parameters and values in JSON object format.
-     * See [FunctionDeclaration.parameters] for parameter details.
-     * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetArgsFieldBuilder() { - if (argsBuilder_ == null) { - argsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>(getArgs(), getParentForChildren(), isClean()); - args_ = null; - } - return argsBuilder_; - } - - private java.util.List partialArgs_ = - java.util.Collections.emptyList(); - - private void ensurePartialArgsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialArgs_ = - new java.util.ArrayList(partialArgs_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PartialArg, - com.google.cloud.vertexai.api.PartialArg.Builder, - com.google.cloud.vertexai.api.PartialArgOrBuilder> - partialArgsBuilder_; - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getPartialArgsList() { - if (partialArgsBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialArgs_); - } else { - return partialArgsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getPartialArgsCount() { - if (partialArgsBuilder_ == null) { - return partialArgs_.size(); - } else { - return partialArgsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PartialArg getPartialArgs(int index) { - if (partialArgsBuilder_ == null) { - return partialArgs_.get(index); - } else { - return partialArgsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPartialArgs(int index, com.google.cloud.vertexai.api.PartialArg value) { - if (partialArgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialArgsIsMutable(); - partialArgs_.set(index, value); - onChanged(); - } else { - partialArgsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPartialArgs( - int index, com.google.cloud.vertexai.api.PartialArg.Builder builderForValue) { - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - partialArgs_.set(index, builderForValue.build()); - onChanged(); - } else { - partialArgsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPartialArgs(com.google.cloud.vertexai.api.PartialArg value) { - if (partialArgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialArgsIsMutable(); - partialArgs_.add(value); - onChanged(); - } else { - partialArgsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPartialArgs(int index, com.google.cloud.vertexai.api.PartialArg value) { - if (partialArgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialArgsIsMutable(); - partialArgs_.add(index, value); - onChanged(); - } else { - partialArgsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPartialArgs( - com.google.cloud.vertexai.api.PartialArg.Builder builderForValue) { - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - partialArgs_.add(builderForValue.build()); - onChanged(); - } else { - partialArgsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPartialArgs( - int index, com.google.cloud.vertexai.api.PartialArg.Builder builderForValue) { - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - partialArgs_.add(index, builderForValue.build()); - onChanged(); - } else { - partialArgsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllPartialArgs( - java.lang.Iterable values) { - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialArgs_); - onChanged(); - } else { - partialArgsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPartialArgs() { - if (partialArgsBuilder_ == null) { - partialArgs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialArgsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removePartialArgs(int index) { - if (partialArgsBuilder_ == null) { - ensurePartialArgsIsMutable(); - partialArgs_.remove(index); - onChanged(); - } else { - partialArgsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PartialArg.Builder getPartialArgsBuilder(int index) { - return internalGetPartialArgsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PartialArgOrBuilder getPartialArgsOrBuilder(int index) { - if (partialArgsBuilder_ == null) { - return partialArgs_.get(index); - } else { - return partialArgsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPartialArgsOrBuilderList() { - if (partialArgsBuilder_ != null) { - return partialArgsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialArgs_); - } - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PartialArg.Builder addPartialArgsBuilder() { - return internalGetPartialArgsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.PartialArg.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PartialArg.Builder addPartialArgsBuilder(int index) { - return internalGetPartialArgsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.PartialArg.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The partial argument value of the function call.
-     * If provided, represents the arguments/fields that are streamed
-     * incrementally.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPartialArgsBuilderList() { - return internalGetPartialArgsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PartialArg, - com.google.cloud.vertexai.api.PartialArg.Builder, - com.google.cloud.vertexai.api.PartialArgOrBuilder> - internalGetPartialArgsFieldBuilder() { - if (partialArgsBuilder_ == null) { - partialArgsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PartialArg, - com.google.cloud.vertexai.api.PartialArg.Builder, - com.google.cloud.vertexai.api.PartialArgOrBuilder>( - partialArgs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - partialArgs_ = null; - } - return partialArgsBuilder_; - } - - private boolean willContinue_; - - /** - * - * - *
-     * Optional. Whether this is the last part of the FunctionCall.
-     * If true, another partial message for the current FunctionCall is expected
-     * to follow.
-     * 
- * - * bool will_continue = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - @java.lang.Override - public boolean getWillContinue() { - return willContinue_; - } - - /** - * - * - *
-     * Optional. Whether this is the last part of the FunctionCall.
-     * If true, another partial message for the current FunctionCall is expected
-     * to follow.
-     * 
- * - * bool will_continue = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The willContinue to set. - * @return This builder for chaining. - */ - public Builder setWillContinue(boolean value) { - - willContinue_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Whether this is the last part of the FunctionCall.
-     * If true, another partial message for the current FunctionCall is expected
-     * to follow.
-     * 
- * - * bool will_continue = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearWillContinue() { - bitField0_ = (bitField0_ & ~0x00000008); - willContinue_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionCall) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionCall) - private static final com.google.cloud.vertexai.api.FunctionCall DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionCall(); - } - - public static com.google.cloud.vertexai.api.FunctionCall getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionCall 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.vertexai.api.FunctionCall getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java deleted file mode 100644 index 42e9490a2dd8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionCallOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionCall) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The name of the function to call.
-   * Matches [FunctionDeclaration.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Optional. The name of the function to call.
-   * Matches [FunctionDeclaration.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the args field is set. - */ - boolean hasArgs(); - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The args. - */ - com.google.protobuf.Struct getArgs(); - - /** - * - * - *
-   * Optional. The function parameters and values in JSON object format.
-   * See [FunctionDeclaration.parameters] for parameter details.
-   * 
- * - * .google.protobuf.Struct args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.StructOrBuilder getArgsOrBuilder(); - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getPartialArgsList(); - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.PartialArg getPartialArgs(int index); - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPartialArgsCount(); - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getPartialArgsOrBuilderList(); - - /** - * - * - *
-   * Optional. The partial argument value of the function call.
-   * If provided, represents the arguments/fields that are streamed
-   * incrementally.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PartialArg partial_args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.PartialArgOrBuilder getPartialArgsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Whether this is the last part of the FunctionCall.
-   * If true, another partial message for the current FunctionCall is expected
-   * to follow.
-   * 
- * - * bool will_continue = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - boolean getWillContinue(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfig.java deleted file mode 100644 index b937cefc129f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfig.java +++ /dev/null @@ -1,1224 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Function calling config.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionCallingConfig} - */ -@com.google.protobuf.Generated -public final class FunctionCallingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionCallingConfig) - FunctionCallingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionCallingConfig"); - } - - // Use FunctionCallingConfig.newBuilder() to construct. - private FunctionCallingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionCallingConfig() { - mode_ = 0; - allowedFunctionNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionCallingConfig.class, - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder.class); - } - - /** - * - * - *
-   * Function calling mode.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.FunctionCallingConfig.Mode} - */ - public enum Mode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified function calling mode. This value should not be used.
-     * 
- * - * MODE_UNSPECIFIED = 0; - */ - MODE_UNSPECIFIED(0), - /** - * - * - *
-     * Default model behavior, model decides to predict either function calls
-     * or natural language response.
-     * 
- * - * AUTO = 1; - */ - AUTO(1), - /** - * - * - *
-     * Model is constrained to always predicting function calls only.
-     * If "allowed_function_names" are set, the predicted function calls will be
-     * limited to any one of "allowed_function_names", else the predicted
-     * function calls will be any one of the provided "function_declarations".
-     * 
- * - * ANY = 2; - */ - ANY(2), - /** - * - * - *
-     * Model will not predict any function calls. Model behavior is same as when
-     * not passing any function declarations.
-     * 
- * - * NONE = 3; - */ - NONE(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Mode"); - } - - /** - * - * - *
-     * Unspecified function calling mode. This value should not be used.
-     * 
- * - * MODE_UNSPECIFIED = 0; - */ - public static final int MODE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Default model behavior, model decides to predict either function calls
-     * or natural language response.
-     * 
- * - * AUTO = 1; - */ - public static final int AUTO_VALUE = 1; - - /** - * - * - *
-     * Model is constrained to always predicting function calls only.
-     * If "allowed_function_names" are set, the predicted function calls will be
-     * limited to any one of "allowed_function_names", else the predicted
-     * function calls will be any one of the provided "function_declarations".
-     * 
- * - * ANY = 2; - */ - public static final int ANY_VALUE = 2; - - /** - * - * - *
-     * Model will not predict any function calls. Model behavior is same as when
-     * not passing any function declarations.
-     * 
- * - * NONE = 3; - */ - public static final int NONE_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 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 AUTO; - case 2: - return ANY; - case 3: - return NONE; - 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.FunctionCallingConfig.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.vertexai.v1.FunctionCallingConfig.Mode) - } - - public static final int MODE_FIELD_NUMBER = 1; - private int mode_ = 0; - - /** - * - * - *
-   * Optional. Function calling mode.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for mode. - */ - @java.lang.Override - public int getModeValue() { - return mode_; - } - - /** - * - * - *
-   * Optional. Function calling mode.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The mode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig.Mode getMode() { - com.google.cloud.vertexai.api.FunctionCallingConfig.Mode result = - com.google.cloud.vertexai.api.FunctionCallingConfig.Mode.forNumber(mode_); - return result == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.Mode.UNRECOGNIZED - : result; - } - - public static final int ALLOWED_FUNCTION_NAMES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList allowedFunctionNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the allowedFunctionNames. - */ - public com.google.protobuf.ProtocolStringList getAllowedFunctionNamesList() { - return allowedFunctionNames_; - } - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of allowedFunctionNames. - */ - public int getAllowedFunctionNamesCount() { - return allowedFunctionNames_.size(); - } - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The allowedFunctionNames at the given index. - */ - public java.lang.String getAllowedFunctionNames(int index) { - return allowedFunctionNames_.get(index); - } - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the allowedFunctionNames at the given index. - */ - public com.google.protobuf.ByteString getAllowedFunctionNamesBytes(int index) { - return allowedFunctionNames_.getByteString(index); - } - - public static final int STREAM_FUNCTION_CALL_ARGUMENTS_FIELD_NUMBER = 4; - private boolean streamFunctionCallArguments_ = false; - - /** - * - * - *
-   * Optional. When set to true, arguments of a single function call will be
-   * streamed out in multiple parts/contents/responses. Partial parameter
-   * results will be returned in the [FunctionCall.partial_args] field.
-   * 
- * - * bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The streamFunctionCallArguments. - */ - @java.lang.Override - public boolean getStreamFunctionCallArguments() { - return streamFunctionCallArguments_; - } - - 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.vertexai.api.FunctionCallingConfig.Mode.MODE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, mode_); - } - for (int i = 0; i < allowedFunctionNames_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, allowedFunctionNames_.getRaw(i)); - } - if (streamFunctionCallArguments_ != false) { - output.writeBool(4, streamFunctionCallArguments_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (mode_ - != com.google.cloud.vertexai.api.FunctionCallingConfig.Mode.MODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); - } - { - int dataSize = 0; - for (int i = 0; i < allowedFunctionNames_.size(); i++) { - dataSize += computeStringSizeNoTag(allowedFunctionNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getAllowedFunctionNamesList().size(); - } - if (streamFunctionCallArguments_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(4, streamFunctionCallArguments_); - } - 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.vertexai.api.FunctionCallingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionCallingConfig other = - (com.google.cloud.vertexai.api.FunctionCallingConfig) obj; - - if (mode_ != other.mode_) return false; - if (!getAllowedFunctionNamesList().equals(other.getAllowedFunctionNamesList())) return false; - if (getStreamFunctionCallArguments() != other.getStreamFunctionCallArguments()) 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_; - if (getAllowedFunctionNamesCount() > 0) { - hash = (37 * hash) + ALLOWED_FUNCTION_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getAllowedFunctionNamesList().hashCode(); - } - hash = (37 * hash) + STREAM_FUNCTION_CALL_ARGUMENTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStreamFunctionCallArguments()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig 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.vertexai.api.FunctionCallingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig 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.vertexai.api.FunctionCallingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionCallingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Function calling config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionCallingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionCallingConfig) - com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionCallingConfig.class, - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionCallingConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mode_ = 0; - allowedFunctionNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - streamFunctionCallArguments_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig build() { - com.google.cloud.vertexai.api.FunctionCallingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig buildPartial() { - com.google.cloud.vertexai.api.FunctionCallingConfig result = - new com.google.cloud.vertexai.api.FunctionCallingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionCallingConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mode_ = mode_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - allowedFunctionNames_.makeImmutable(); - result.allowedFunctionNames_ = allowedFunctionNames_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.streamFunctionCallArguments_ = streamFunctionCallArguments_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionCallingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionCallingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionCallingConfig other) { - if (other == com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance()) - return this; - if (other.mode_ != 0) { - setModeValue(other.getModeValue()); - } - if (!other.allowedFunctionNames_.isEmpty()) { - if (allowedFunctionNames_.isEmpty()) { - allowedFunctionNames_ = other.allowedFunctionNames_; - bitField0_ |= 0x00000002; - } else { - ensureAllowedFunctionNamesIsMutable(); - allowedFunctionNames_.addAll(other.allowedFunctionNames_); - } - onChanged(); - } - if (other.getStreamFunctionCallArguments() != false) { - setStreamFunctionCallArguments(other.getStreamFunctionCallArguments()); - } - 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 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureAllowedFunctionNamesIsMutable(); - allowedFunctionNames_.add(s); - break; - } // case 18 - case 32: - { - streamFunctionCallArguments_ = input.readBool(); - bitField0_ |= 0x00000004; - 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 int mode_ = 0; - - /** - * - * - *
-     * Optional. Function calling mode.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for mode. - */ - @java.lang.Override - public int getModeValue() { - return mode_; - } - - /** - * - * - *
-     * Optional. Function calling mode.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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; - } - - /** - * - * - *
-     * Optional. Function calling mode.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The mode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig.Mode getMode() { - com.google.cloud.vertexai.api.FunctionCallingConfig.Mode result = - com.google.cloud.vertexai.api.FunctionCallingConfig.Mode.forNumber(mode_); - return result == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.Mode.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Optional. Function calling mode.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The mode to set. - * @return This builder for chaining. - */ - public Builder setMode(com.google.cloud.vertexai.api.FunctionCallingConfig.Mode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - mode_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function calling mode.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearMode() { - bitField0_ = (bitField0_ & ~0x00000001); - mode_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList allowedFunctionNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureAllowedFunctionNamesIsMutable() { - if (!allowedFunctionNames_.isModifiable()) { - allowedFunctionNames_ = new com.google.protobuf.LazyStringArrayList(allowedFunctionNames_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the allowedFunctionNames. - */ - public com.google.protobuf.ProtocolStringList getAllowedFunctionNamesList() { - allowedFunctionNames_.makeImmutable(); - return allowedFunctionNames_; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of allowedFunctionNames. - */ - public int getAllowedFunctionNamesCount() { - return allowedFunctionNames_.size(); - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The allowedFunctionNames at the given index. - */ - public java.lang.String getAllowedFunctionNames(int index) { - return allowedFunctionNames_.get(index); - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the allowedFunctionNames at the given index. - */ - public com.google.protobuf.ByteString getAllowedFunctionNamesBytes(int index) { - return allowedFunctionNames_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The allowedFunctionNames to set. - * @return This builder for chaining. - */ - public Builder setAllowedFunctionNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAllowedFunctionNamesIsMutable(); - allowedFunctionNames_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The allowedFunctionNames to add. - * @return This builder for chaining. - */ - public Builder addAllowedFunctionNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAllowedFunctionNamesIsMutable(); - allowedFunctionNames_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The allowedFunctionNames to add. - * @return This builder for chaining. - */ - public Builder addAllAllowedFunctionNames(java.lang.Iterable values) { - ensureAllowedFunctionNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedFunctionNames_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearAllowedFunctionNames() { - allowedFunctionNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function names to call. Only set when the Mode is ANY. Function
-     * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-     * will predict a function call from the set of function names provided.
-     * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the allowedFunctionNames to add. - * @return This builder for chaining. - */ - public Builder addAllowedFunctionNamesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAllowedFunctionNamesIsMutable(); - allowedFunctionNames_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private boolean streamFunctionCallArguments_; - - /** - * - * - *
-     * Optional. When set to true, arguments of a single function call will be
-     * streamed out in multiple parts/contents/responses. Partial parameter
-     * results will be returned in the [FunctionCall.partial_args] field.
-     * 
- * - * bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The streamFunctionCallArguments. - */ - @java.lang.Override - public boolean getStreamFunctionCallArguments() { - return streamFunctionCallArguments_; - } - - /** - * - * - *
-     * Optional. When set to true, arguments of a single function call will be
-     * streamed out in multiple parts/contents/responses. Partial parameter
-     * results will be returned in the [FunctionCall.partial_args] field.
-     * 
- * - * bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The streamFunctionCallArguments to set. - * @return This builder for chaining. - */ - public Builder setStreamFunctionCallArguments(boolean value) { - - streamFunctionCallArguments_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. When set to true, arguments of a single function call will be
-     * streamed out in multiple parts/contents/responses. Partial parameter
-     * results will be returned in the [FunctionCall.partial_args] field.
-     * 
- * - * bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearStreamFunctionCallArguments() { - bitField0_ = (bitField0_ & ~0x00000004); - streamFunctionCallArguments_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionCallingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionCallingConfig) - private static final com.google.cloud.vertexai.api.FunctionCallingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionCallingConfig(); - } - - public static com.google.cloud.vertexai.api.FunctionCallingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionCallingConfig 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.vertexai.api.FunctionCallingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfigOrBuilder.java deleted file mode 100644 index 40efdf6fda7d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallingConfigOrBuilder.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionCallingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionCallingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Function calling mode.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for mode. - */ - int getModeValue(); - - /** - * - * - *
-   * Optional. Function calling mode.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The mode. - */ - com.google.cloud.vertexai.api.FunctionCallingConfig.Mode getMode(); - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the allowedFunctionNames. - */ - java.util.List getAllowedFunctionNamesList(); - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of allowedFunctionNames. - */ - int getAllowedFunctionNamesCount(); - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The allowedFunctionNames at the given index. - */ - java.lang.String getAllowedFunctionNames(int index); - - /** - * - * - *
-   * Optional. Function names to call. Only set when the Mode is ANY. Function
-   * names should match [FunctionDeclaration.name]. With mode set to ANY, model
-   * will predict a function call from the set of function names provided.
-   * 
- * - * repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the allowedFunctionNames at the given index. - */ - com.google.protobuf.ByteString getAllowedFunctionNamesBytes(int index); - - /** - * - * - *
-   * Optional. When set to true, arguments of a single function call will be
-   * streamed out in multiple parts/contents/responses. Partial parameter
-   * results will be returned in the [FunctionCall.partial_args] field.
-   * 
- * - * bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The streamFunctionCallArguments. - */ - boolean getStreamFunctionCallArguments(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java deleted file mode 100644 index 1fa0c066e0e3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java +++ /dev/null @@ -1,2476 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Structured representation of a function declaration as defined by the
- * [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included
- * in this declaration are the function name, description, parameters and
- * response type. This FunctionDeclaration is a representation of a block of
- * code that can be used as a `Tool` by the model and executed by the client.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionDeclaration} - */ -@com.google.protobuf.Generated -public final class FunctionDeclaration extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionDeclaration) - FunctionDeclarationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionDeclaration"); - } - - // Use FunctionDeclaration.newBuilder() to construct. - private FunctionDeclaration(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionDeclaration() { - name_ = ""; - description_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionDeclaration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionDeclaration.class, - com.google.cloud.vertexai.api.FunctionDeclaration.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-   * maximum length of 64.
-   * 
- * - * 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. The name of the function to call.
-   * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-   * maximum length of 64.
-   * 
- * - * 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 DESCRIPTION_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - - /** - * - * - *
-   * Optional. Description and purpose of the function.
-   * Model uses it to decide how and whether to call the function.
-   * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Description and purpose of the function.
-   * Model uses it to decide how and whether to call the function.
-   * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMETERS_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.Schema parameters_; - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SchemaOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : parameters_; - } - - public static final int PARAMETERS_JSON_SCHEMA_FIELD_NUMBER = 5; - private com.google.protobuf.Value parametersJsonSchema_; - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parametersJsonSchema field is set. - */ - @java.lang.Override - public boolean hasParametersJsonSchema() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parametersJsonSchema. - */ - @java.lang.Override - public com.google.protobuf.Value getParametersJsonSchema() { - return parametersJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : parametersJsonSchema_; - } - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getParametersJsonSchemaOrBuilder() { - return parametersJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : parametersJsonSchema_; - } - - public static final int RESPONSE_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.Schema response_; - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the response field is set. - */ - @java.lang.Override - public boolean hasResponse() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The response. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getResponse() { - return response_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : response_; - } - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SchemaOrBuilder getResponseOrBuilder() { - return response_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : response_; - } - - public static final int RESPONSE_JSON_SCHEMA_FIELD_NUMBER = 6; - private com.google.protobuf.Value responseJsonSchema_; - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - @java.lang.Override - public boolean hasResponseJsonSchema() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - @java.lang.Override - public com.google.protobuf.Value getResponseJsonSchema() { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder() { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getParameters()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getResponse()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getParametersJsonSchema()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(6, getResponseJsonSchema()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResponse()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getParametersJsonSchema()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getResponseJsonSchema()); - } - 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.vertexai.api.FunctionDeclaration)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionDeclaration other = - (com.google.cloud.vertexai.api.FunctionDeclaration) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) return false; - } - if (hasParametersJsonSchema() != other.hasParametersJsonSchema()) return false; - if (hasParametersJsonSchema()) { - if (!getParametersJsonSchema().equals(other.getParametersJsonSchema())) return false; - } - if (hasResponse() != other.hasResponse()) return false; - if (hasResponse()) { - if (!getResponse().equals(other.getResponse())) return false; - } - if (hasResponseJsonSchema() != other.hasResponseJsonSchema()) return false; - if (hasResponseJsonSchema()) { - if (!getResponseJsonSchema().equals(other.getResponseJsonSchema())) 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) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (hasParametersJsonSchema()) { - hash = (37 * hash) + PARAMETERS_JSON_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getParametersJsonSchema().hashCode(); - } - if (hasResponse()) { - hash = (37 * hash) + RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getResponse().hashCode(); - } - if (hasResponseJsonSchema()) { - hash = (37 * hash) + RESPONSE_JSON_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getResponseJsonSchema().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration 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.vertexai.api.FunctionDeclaration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration 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.vertexai.api.FunctionDeclaration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionDeclaration 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Structured representation of a function declaration as defined by the
-   * [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included
-   * in this declaration are the function name, description, parameters and
-   * response type. This FunctionDeclaration is a representation of a block of
-   * code that can be used as a `Tool` by the model and executed by the client.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionDeclaration} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionDeclaration) - com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionDeclaration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionDeclaration.class, - com.google.cloud.vertexai.api.FunctionDeclaration.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionDeclaration.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetParametersFieldBuilder(); - internalGetParametersJsonSchemaFieldBuilder(); - internalGetResponseFieldBuilder(); - internalGetResponseJsonSchemaFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - description_ = ""; - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - parametersJsonSchema_ = null; - if (parametersJsonSchemaBuilder_ != null) { - parametersJsonSchemaBuilder_.dispose(); - parametersJsonSchemaBuilder_ = null; - } - response_ = null; - if (responseBuilder_ != null) { - responseBuilder_.dispose(); - responseBuilder_ = null; - } - responseJsonSchema_ = null; - if (responseJsonSchemaBuilder_ != null) { - responseJsonSchemaBuilder_.dispose(); - responseJsonSchemaBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionDeclaration getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionDeclaration.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionDeclaration build() { - com.google.cloud.vertexai.api.FunctionDeclaration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionDeclaration buildPartial() { - com.google.cloud.vertexai.api.FunctionDeclaration result = - new com.google.cloud.vertexai.api.FunctionDeclaration(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionDeclaration result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.parametersJsonSchema_ = - parametersJsonSchemaBuilder_ == null - ? parametersJsonSchema_ - : parametersJsonSchemaBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.response_ = responseBuilder_ == null ? response_ : responseBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.responseJsonSchema_ = - responseJsonSchemaBuilder_ == null - ? responseJsonSchema_ - : responseJsonSchemaBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionDeclaration) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionDeclaration) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionDeclaration other) { - if (other == com.google.cloud.vertexai.api.FunctionDeclaration.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - if (other.hasParametersJsonSchema()) { - mergeParametersJsonSchema(other.getParametersJsonSchema()); - } - if (other.hasResponse()) { - mergeResponse(other.getResponse()); - } - if (other.hasResponseJsonSchema()) { - mergeResponseJsonSchema(other.getResponseJsonSchema()); - } - 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: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetResponseFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetParametersJsonSchemaFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetResponseJsonSchemaFieldBuilder().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_ = ""; - - /** - * - * - *
-     * Required. The name of the function to call.
-     * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-     * maximum length of 64.
-     * 
- * - * 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. The name of the function to call.
-     * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-     * maximum length of 64.
-     * 
- * - * 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. The name of the function to call.
-     * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-     * maximum length of 64.
-     * 
- * - * 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. The name of the function to call.
-     * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-     * maximum length of 64.
-     * 
- * - * 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. The name of the function to call.
-     * Must start with a letter or an underscore.
-     * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-     * maximum length of 64.
-     * 
- * - * 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 java.lang.Object description_ = ""; - - /** - * - * - *
-     * Optional. Description and purpose of the function.
-     * Model uses it to decide how and whether to call the function.
-     * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Description and purpose of the function.
-     * Model uses it to decide how and whether to call the function.
-     * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Description and purpose of the function.
-     * Model uses it to decide how and whether to call the function.
-     * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Description and purpose of the function.
-     * Model uses it to decide how and whether to call the function.
-     * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Description and purpose of the function.
-     * Model uses it to decide how and whether to call the function.
-     * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.Schema parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Schema getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters(com.google.cloud.vertexai.api.Schema value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters(com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Schema value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Schema.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SchemaOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * Optional. Describes the parameters to this function in JSON Schema Object
-     * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-     * of the parameter. Parameter names are case sensitive. Schema Value: the
-     * Schema defining the type used for the parameter. For function with no
-     * parameters, this can be left unset. Parameter names must start with a
-     * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-     * underscores with a maximum length of 64. Example with 1 required and 1
-     * optional parameter: type: OBJECT properties:
-     * param1:
-     * type: STRING
-     * param2:
-     * type: INTEGER
-     * required:
-     * - param1
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.protobuf.Value parametersJsonSchema_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - parametersJsonSchemaBuilder_; - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parametersJsonSchema field is set. - */ - public boolean hasParametersJsonSchema() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parametersJsonSchema. - */ - public com.google.protobuf.Value getParametersJsonSchema() { - if (parametersJsonSchemaBuilder_ == null) { - return parametersJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : parametersJsonSchema_; - } else { - return parametersJsonSchemaBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParametersJsonSchema(com.google.protobuf.Value value) { - if (parametersJsonSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parametersJsonSchema_ = value; - } else { - parametersJsonSchemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParametersJsonSchema(com.google.protobuf.Value.Builder builderForValue) { - if (parametersJsonSchemaBuilder_ == null) { - parametersJsonSchema_ = builderForValue.build(); - } else { - parametersJsonSchemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeParametersJsonSchema(com.google.protobuf.Value value) { - if (parametersJsonSchemaBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && parametersJsonSchema_ != null - && parametersJsonSchema_ != com.google.protobuf.Value.getDefaultInstance()) { - getParametersJsonSchemaBuilder().mergeFrom(value); - } else { - parametersJsonSchema_ = value; - } - } else { - parametersJsonSchemaBuilder_.mergeFrom(value); - } - if (parametersJsonSchema_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParametersJsonSchema() { - bitField0_ = (bitField0_ & ~0x00000008); - parametersJsonSchema_ = null; - if (parametersJsonSchemaBuilder_ != null) { - parametersJsonSchemaBuilder_.dispose(); - parametersJsonSchemaBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getParametersJsonSchemaBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetParametersJsonSchemaFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getParametersJsonSchemaOrBuilder() { - if (parametersJsonSchemaBuilder_ != null) { - return parametersJsonSchemaBuilder_.getMessageOrBuilder(); - } else { - return parametersJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : parametersJsonSchema_; - } - } - - /** - * - * - *
-     * Optional. Describes the parameters to the function in JSON Schema format.
-     * The schema must describe an object where the properties are the parameters
-     * to the function. For example:
-     *
-     * ```
-     * {
-     * "type": "object",
-     * "properties": {
-     * "name": { "type": "string" },
-     * "age": { "type": "integer" }
-     * },
-     * "additionalProperties": false,
-     * "required": ["name", "age"],
-     * "propertyOrdering": ["name", "age"]
-     * }
-     * ```
-     *
-     * This field is mutually exclusive with `parameters`.
-     * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetParametersJsonSchemaFieldBuilder() { - if (parametersJsonSchemaBuilder_ == null) { - parametersJsonSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getParametersJsonSchema(), getParentForChildren(), isClean()); - parametersJsonSchema_ = null; - } - return parametersJsonSchemaBuilder_; - } - - private com.google.cloud.vertexai.api.Schema response_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - responseBuilder_; - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the response field is set. - */ - public boolean hasResponse() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The response. - */ - public com.google.cloud.vertexai.api.Schema getResponse() { - if (responseBuilder_ == null) { - return response_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : response_; - } else { - return responseBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponse(com.google.cloud.vertexai.api.Schema value) { - if (responseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - response_ = value; - } else { - responseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponse(com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (responseBuilder_ == null) { - response_ = builderForValue.build(); - } else { - responseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeResponse(com.google.cloud.vertexai.api.Schema value) { - if (responseBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && response_ != null - && response_ != com.google.cloud.vertexai.api.Schema.getDefaultInstance()) { - getResponseBuilder().mergeFrom(value); - } else { - response_ = value; - } - } else { - responseBuilder_.mergeFrom(value); - } - if (response_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearResponse() { - bitField0_ = (bitField0_ & ~0x00000010); - response_ = null; - if (responseBuilder_ != null) { - responseBuilder_.dispose(); - responseBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder getResponseBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetResponseFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SchemaOrBuilder getResponseOrBuilder() { - if (responseBuilder_ != null) { - return responseBuilder_.getMessageOrBuilder(); - } else { - return response_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : response_; - } - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * Reflects the Open API 3.03 Response Object. The Schema defines the type
-     * used for the response value of the function.
-     * 
- * - * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - internalGetResponseFieldBuilder() { - if (responseBuilder_ == null) { - responseBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder>( - getResponse(), getParentForChildren(), isClean()); - response_ = null; - } - return responseBuilder_; - } - - private com.google.protobuf.Value responseJsonSchema_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - responseJsonSchemaBuilder_; - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - public boolean hasResponseJsonSchema() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - public com.google.protobuf.Value getResponseJsonSchema() { - if (responseJsonSchemaBuilder_ == null) { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } else { - return responseJsonSchemaBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseJsonSchema(com.google.protobuf.Value value) { - if (responseJsonSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - responseJsonSchema_ = value; - } else { - responseJsonSchemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseJsonSchema(com.google.protobuf.Value.Builder builderForValue) { - if (responseJsonSchemaBuilder_ == null) { - responseJsonSchema_ = builderForValue.build(); - } else { - responseJsonSchemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeResponseJsonSchema(com.google.protobuf.Value value) { - if (responseJsonSchemaBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && responseJsonSchema_ != null - && responseJsonSchema_ != com.google.protobuf.Value.getDefaultInstance()) { - getResponseJsonSchemaBuilder().mergeFrom(value); - } else { - responseJsonSchema_ = value; - } - } else { - responseJsonSchemaBuilder_.mergeFrom(value); - } - if (responseJsonSchema_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearResponseJsonSchema() { - bitField0_ = (bitField0_ & ~0x00000020); - responseJsonSchema_ = null; - if (responseJsonSchemaBuilder_ != null) { - responseJsonSchemaBuilder_.dispose(); - responseJsonSchemaBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getResponseJsonSchemaBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetResponseJsonSchemaFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder() { - if (responseJsonSchemaBuilder_ != null) { - return responseJsonSchemaBuilder_.getMessageOrBuilder(); - } else { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - } - - /** - * - * - *
-     * Optional. Describes the output from this function in JSON Schema format.
-     * The value specified by the schema is the response value of the function.
-     *
-     * This field is mutually exclusive with `response`.
-     * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetResponseJsonSchemaFieldBuilder() { - if (responseJsonSchemaBuilder_ == null) { - responseJsonSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getResponseJsonSchema(), getParentForChildren(), isClean()); - responseJsonSchema_ = null; - } - return responseJsonSchemaBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionDeclaration) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionDeclaration) - private static final com.google.cloud.vertexai.api.FunctionDeclaration DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionDeclaration(); - } - - public static com.google.cloud.vertexai.api.FunctionDeclaration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionDeclaration 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.vertexai.api.FunctionDeclaration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java deleted file mode 100644 index 084082950b0c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionDeclarationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionDeclaration) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-   * maximum length of 64.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Must start with a letter or an underscore.
-   * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
-   * maximum length of 64.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. Description and purpose of the function.
-   * Model uses it to decide how and whether to call the function.
-   * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - - /** - * - * - *
-   * Optional. Description and purpose of the function.
-   * Model uses it to decide how and whether to call the function.
-   * 
- * - * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Schema getParameters(); - - /** - * - * - *
-   * Optional. Describes the parameters to this function in JSON Schema Object
-   * format. Reflects the Open API 3.03 Parameter Object. string Key: the name
-   * of the parameter. Parameter names are case sensitive. Schema Value: the
-   * Schema defining the type used for the parameter. For function with no
-   * parameters, this can be left unset. Parameter names must start with a
-   * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
-   * underscores with a maximum length of 64. Example with 1 required and 1
-   * optional parameter: type: OBJECT properties:
-   * param1:
-   * type: STRING
-   * param2:
-   * type: INTEGER
-   * required:
-   * - param1
-   * 
- * - * - * .google.cloud.vertexai.v1.Schema parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SchemaOrBuilder getParametersOrBuilder(); - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parametersJsonSchema field is set. - */ - boolean hasParametersJsonSchema(); - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parametersJsonSchema. - */ - com.google.protobuf.Value getParametersJsonSchema(); - - /** - * - * - *
-   * Optional. Describes the parameters to the function in JSON Schema format.
-   * The schema must describe an object where the properties are the parameters
-   * to the function. For example:
-   *
-   * ```
-   * {
-   * "type": "object",
-   * "properties": {
-   * "name": { "type": "string" },
-   * "age": { "type": "integer" }
-   * },
-   * "additionalProperties": false,
-   * "required": ["name", "age"],
-   * "propertyOrdering": ["name", "age"]
-   * }
-   * ```
-   *
-   * This field is mutually exclusive with `parameters`.
-   * 
- * - * - * .google.protobuf.Value parameters_json_schema = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getParametersJsonSchemaOrBuilder(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the response field is set. - */ - boolean hasResponse(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The response. - */ - com.google.cloud.vertexai.api.Schema getResponse(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * Reflects the Open API 3.03 Response Object. The Schema defines the type
-   * used for the response value of the function.
-   * 
- * - * .google.cloud.vertexai.v1.Schema response = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SchemaOrBuilder getResponseOrBuilder(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - boolean hasResponseJsonSchema(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - com.google.protobuf.Value getResponseJsonSchema(); - - /** - * - * - *
-   * Optional. Describes the output from this function in JSON Schema format.
-   * The value specified by the schema is the response value of the function.
-   *
-   * This field is mutually exclusive with `response`.
-   * 
- * - * - * .google.protobuf.Value response_json_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java deleted file mode 100644 index e7e4bc64bb85..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java +++ /dev/null @@ -1,1517 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The result output from a [FunctionCall] that contains a string representing
- * the [FunctionDeclaration.name] and a structured JSON object containing any
- * output from the function is used as context to the model. This should contain
- * the result of a [FunctionCall] made based on model prediction.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponse} - */ -@com.google.protobuf.Generated -public final class FunctionResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionResponse) - FunctionResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionResponse"); - } - - // Use FunctionResponse.newBuilder() to construct. - private FunctionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionResponse() { - name_ = ""; - parts_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponse.class, - com.google.cloud.vertexai.api.FunctionResponse.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-   * 
- * - * 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. The name of the function to call.
-   * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-   * 
- * - * 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 RESPONSE_FIELD_NUMBER = 2; - private com.google.protobuf.Struct response_; - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the response field is set. - */ - @java.lang.Override - public boolean hasResponse() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The response. - */ - @java.lang.Override - public com.google.protobuf.Struct getResponse() { - return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; - } - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { - return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; - } - - public static final int PARTS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List parts_; - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getPartsList() { - return parts_; - } - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getPartsOrBuilderList() { - return parts_; - } - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getPartsCount() { - return parts_.size(); - } - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponsePart getParts(int index) { - return parts_.get(index); - } - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder getPartsOrBuilder(int index) { - return parts_.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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getResponse()); - } - for (int i = 0; i < parts_.size(); i++) { - output.writeMessage(4, parts_.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.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResponse()); - } - for (int i = 0; i < parts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, parts_.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.vertexai.api.FunctionResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionResponse other = - (com.google.cloud.vertexai.api.FunctionResponse) obj; - - if (!getName().equals(other.getName())) return false; - if (hasResponse() != other.hasResponse()) return false; - if (hasResponse()) { - if (!getResponse().equals(other.getResponse())) return false; - } - if (!getPartsList().equals(other.getPartsList())) 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 (hasResponse()) { - hash = (37 * hash) + RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getResponse().hashCode(); - } - if (getPartsCount() > 0) { - hash = (37 * hash) + PARTS_FIELD_NUMBER; - hash = (53 * hash) + getPartsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponse 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.vertexai.api.FunctionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponse 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.vertexai.api.FunctionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The result output from a [FunctionCall] that contains a string representing
-   * the [FunctionDeclaration.name] and a structured JSON object containing any
-   * output from the function is used as context to the model. This should contain
-   * the result of a [FunctionCall] made based on model prediction.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionResponse) - com.google.cloud.vertexai.api.FunctionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponse.class, - com.google.cloud.vertexai.api.FunctionResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetResponseFieldBuilder(); - internalGetPartsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - response_ = null; - if (responseBuilder_ != null) { - responseBuilder_.dispose(); - responseBuilder_ = null; - } - if (partsBuilder_ == null) { - parts_ = java.util.Collections.emptyList(); - } else { - parts_ = null; - partsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponse build() { - com.google.cloud.vertexai.api.FunctionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponse buildPartial() { - com.google.cloud.vertexai.api.FunctionResponse result = - new com.google.cloud.vertexai.api.FunctionResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.FunctionResponse result) { - if (partsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - parts_ = java.util.Collections.unmodifiableList(parts_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.parts_ = parts_; - } else { - result.parts_ = partsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.response_ = responseBuilder_ == null ? response_ : responseBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionResponse) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionResponse other) { - if (other == com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasResponse()) { - mergeResponse(other.getResponse()); - } - if (partsBuilder_ == null) { - if (!other.parts_.isEmpty()) { - if (parts_.isEmpty()) { - parts_ = other.parts_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartsIsMutable(); - parts_.addAll(other.parts_); - } - onChanged(); - } - } else { - if (!other.parts_.isEmpty()) { - if (partsBuilder_.isEmpty()) { - partsBuilder_.dispose(); - partsBuilder_ = null; - parts_ = other.parts_; - bitField0_ = (bitField0_ & ~0x00000004); - partsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPartsFieldBuilder() - : null; - } else { - partsBuilder_.addAllMessages(other.parts_); - } - } - } - 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( - internalGetResponseFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - com.google.cloud.vertexai.api.FunctionResponsePart m = - input.readMessage( - com.google.cloud.vertexai.api.FunctionResponsePart.parser(), - extensionRegistry); - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(m); - } else { - partsBuilder_.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 bitField0_; - - private java.lang.Object name_ = ""; - - /** - * - * - *
-     * Required. The name of the function to call.
-     * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-     * 
- * - * 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. The name of the function to call.
-     * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-     * 
- * - * 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. The name of the function to call.
-     * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-     * 
- * - * 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. The name of the function to call.
-     * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-     * 
- * - * 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. The name of the function to call.
-     * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-     * 
- * - * 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.Struct response_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - responseBuilder_; - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the response field is set. - */ - public boolean hasResponse() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The response. - */ - public com.google.protobuf.Struct getResponse() { - if (responseBuilder_ == null) { - return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; - } else { - return responseBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setResponse(com.google.protobuf.Struct value) { - if (responseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - response_ = value; - } else { - responseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setResponse(com.google.protobuf.Struct.Builder builderForValue) { - if (responseBuilder_ == null) { - response_ = builderForValue.build(); - } else { - responseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeResponse(com.google.protobuf.Struct value) { - if (responseBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && response_ != null - && response_ != com.google.protobuf.Struct.getDefaultInstance()) { - getResponseBuilder().mergeFrom(value); - } else { - response_ = value; - } - } else { - responseBuilder_.mergeFrom(value); - } - if (response_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearResponse() { - bitField0_ = (bitField0_ & ~0x00000002); - response_ = null; - if (responseBuilder_ != null) { - responseBuilder_.dispose(); - responseBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.Struct.Builder getResponseBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetResponseFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { - if (responseBuilder_ != null) { - return responseBuilder_.getMessageOrBuilder(); - } else { - return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; - } - } - - /** - * - * - *
-     * Required. The function response in JSON object format.
-     * Use "output" key to specify function output and "error" key to specify
-     * error details (if any). If "output" and "error" keys are not specified,
-     * then whole "response" is treated as function output.
-     * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetResponseFieldBuilder() { - if (responseBuilder_ == null) { - responseBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getResponse(), getParentForChildren(), isClean()); - response_ = null; - } - return responseBuilder_; - } - - private java.util.List parts_ = - java.util.Collections.emptyList(); - - private void ensurePartsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - parts_ = - new java.util.ArrayList(parts_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponsePart, - com.google.cloud.vertexai.api.FunctionResponsePart.Builder, - com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder> - partsBuilder_; - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getPartsList() { - if (partsBuilder_ == null) { - return java.util.Collections.unmodifiableList(parts_); - } else { - return partsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getPartsCount() { - if (partsBuilder_ == null) { - return parts_.size(); - } else { - return partsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponsePart getParts(int index) { - if (partsBuilder_ == null) { - return parts_.get(index); - } else { - return partsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParts(int index, com.google.cloud.vertexai.api.FunctionResponsePart value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.set(index, value); - onChanged(); - } else { - partsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParts( - int index, com.google.cloud.vertexai.api.FunctionResponsePart.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.set(index, builderForValue.build()); - onChanged(); - } else { - partsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParts(com.google.cloud.vertexai.api.FunctionResponsePart value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.add(value); - onChanged(); - } else { - partsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParts(int index, com.google.cloud.vertexai.api.FunctionResponsePart value) { - if (partsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartsIsMutable(); - parts_.add(index, value); - onChanged(); - } else { - partsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParts( - com.google.cloud.vertexai.api.FunctionResponsePart.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(builderForValue.build()); - onChanged(); - } else { - partsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParts( - int index, com.google.cloud.vertexai.api.FunctionResponsePart.Builder builderForValue) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.add(index, builderForValue.build()); - onChanged(); - } else { - partsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllParts( - java.lang.Iterable values) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parts_); - onChanged(); - } else { - partsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParts() { - if (partsBuilder_ == null) { - parts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeParts(int index) { - if (partsBuilder_ == null) { - ensurePartsIsMutable(); - parts_.remove(index); - onChanged(); - } else { - partsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponsePart.Builder getPartsBuilder(int index) { - return internalGetPartsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder getPartsOrBuilder( - int index) { - if (partsBuilder_ == null) { - return parts_.get(index); - } else { - return partsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPartsOrBuilderList() { - if (partsBuilder_ != null) { - return partsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parts_); - } - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponsePart.Builder addPartsBuilder() { - return internalGetPartsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.FunctionResponsePart.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponsePart.Builder addPartsBuilder(int index) { - return internalGetPartsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.FunctionResponsePart.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Ordered `Parts` that constitute a function response. Parts may
-     * have different IANA MIME types.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPartsBuilderList() { - return internalGetPartsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponsePart, - com.google.cloud.vertexai.api.FunctionResponsePart.Builder, - com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder> - internalGetPartsFieldBuilder() { - if (partsBuilder_ == null) { - partsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponsePart, - com.google.cloud.vertexai.api.FunctionResponsePart.Builder, - com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder>( - parts_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - parts_ = null; - } - return partsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionResponse) - private static final com.google.cloud.vertexai.api.FunctionResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionResponse(); - } - - public static com.google.cloud.vertexai.api.FunctionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionResponse 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.vertexai.api.FunctionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlob.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlob.java deleted file mode 100644 index 5f817d0f1cfa..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlob.java +++ /dev/null @@ -1,931 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Raw media bytes for function response.
- *
- * Text should not be sent as raw bytes, use the 'text' field.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponseBlob} - */ -@com.google.protobuf.Generated -public final class FunctionResponseBlob extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionResponseBlob) - FunctionResponseBlobOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionResponseBlob"); - } - - // Use FunctionResponseBlob.newBuilder() to construct. - private FunctionResponseBlob(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionResponseBlob() { - mimeType_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - displayName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponseBlob.class, - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder.class); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object mimeType_ = ""; - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Required. Raw bytes.
-   * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - - /** - * - * - *
-   * Optional. Display name of the blob.
-   *
-   * Used to provide a label or filename to distinguish blobs.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 4 [(.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. Display name of the blob.
-   *
-   * Used to provide a label or filename to distinguish blobs.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 4 [(.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; - } - } - - 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.GeneratedMessage.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); - } - if (!data_.isEmpty()) { - output.writeBytes(2, data_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); - } - if (!data_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_); - } - 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.vertexai.api.FunctionResponseBlob)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionResponseBlob other = - (com.google.cloud.vertexai.api.FunctionResponseBlob) obj; - - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getData().equals(other.getData())) return false; - if (!getDisplayName().equals(other.getDisplayName())) 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) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob 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.vertexai.api.FunctionResponseBlob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob 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.vertexai.api.FunctionResponseBlob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionResponseBlob 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Raw media bytes for function response.
-   *
-   * Text should not be sent as raw bytes, use the 'text' field.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponseBlob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionResponseBlob) - com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponseBlob.class, - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionResponseBlob.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mimeType_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - displayName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlob getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlob build() { - com.google.cloud.vertexai.api.FunctionResponseBlob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlob buildPartial() { - com.google.cloud.vertexai.api.FunctionResponseBlob result = - new com.google.cloud.vertexai.api.FunctionResponseBlob(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionResponseBlob result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mimeType_ = mimeType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.data_ = data_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.displayName_ = displayName_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionResponseBlob) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionResponseBlob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionResponseBlob other) { - if (other == com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance()) - return this; - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getData().isEmpty()) { - setData(other.getData()); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - 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: - { - mimeType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - data_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - displayName_ = input.readStringRequireUtf8(); - 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 mimeType_ = ""; - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Raw bytes.
-     * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000002); - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - - /** - * - * - *
-     * Optional. Display name of the blob.
-     *
-     * Used to provide a label or filename to distinguish blobs.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 4 [(.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. Display name of the blob.
-     *
-     * Used to provide a label or filename to distinguish blobs.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 4 [(.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. Display name of the blob.
-     *
-     * Used to provide a label or filename to distinguish blobs.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 4 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Display name of the blob.
-     *
-     * Used to provide a label or filename to distinguish blobs.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Display name of the blob.
-     *
-     * Used to provide a label or filename to distinguish blobs.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 4 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionResponseBlob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionResponseBlob) - private static final com.google.cloud.vertexai.api.FunctionResponseBlob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionResponseBlob(); - } - - public static com.google.cloud.vertexai.api.FunctionResponseBlob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionResponseBlob 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.vertexai.api.FunctionResponseBlob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlobOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlobOrBuilder.java deleted file mode 100644 index d02d429a117e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseBlobOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionResponseBlobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionResponseBlob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Required. Raw bytes.
-   * 
- * - * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The data. - */ - com.google.protobuf.ByteString getData(); - - /** - * - * - *
-   * Optional. Display name of the blob.
-   *
-   * Used to provide a label or filename to distinguish blobs.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Optional. Display name of the blob.
-   *
-   * Used to provide a label or filename to distinguish blobs.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileData.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileData.java deleted file mode 100644 index f92fab3ccd24..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileData.java +++ /dev/null @@ -1,1017 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * URI based data for function response.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponseFileData} - */ -@com.google.protobuf.Generated -public final class FunctionResponseFileData extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionResponseFileData) - FunctionResponseFileDataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionResponseFileData"); - } - - // Use FunctionResponseFileData.newBuilder() to construct. - private FunctionResponseFileData(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionResponseFileData() { - mimeType_ = ""; - fileUri_ = ""; - displayName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponseFileData.class, - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder.class); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object mimeType_ = ""; - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - public static final int FILE_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object fileUri_ = ""; - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - @java.lang.Override - public java.lang.String getFileUri() { - java.lang.Object ref = fileUri_; - 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(); - fileUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFileUriBytes() { - java.lang.Object ref = fileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileUri_ = 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_ = ""; - - /** - * - * - *
-   * Optional. Display name of the file data.
-   *
-   * Used to provide a label or filename to distinguish file datas.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 3 [(.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. Display name of the file data.
-   *
-   * Used to provide a label or filename to distinguish file datas.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 3 [(.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; - } - } - - 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.GeneratedMessage.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, fileUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, fileUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); - } - 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.vertexai.api.FunctionResponseFileData)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionResponseFileData other = - (com.google.cloud.vertexai.api.FunctionResponseFileData) obj; - - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getFileUri().equals(other.getFileUri())) return false; - if (!getDisplayName().equals(other.getDisplayName())) 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) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getFileUri().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData 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.vertexai.api.FunctionResponseFileData parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData 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.vertexai.api.FunctionResponseFileData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionResponseFileData 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * URI based data for function response.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponseFileData} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionResponseFileData) - com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponseFileData.class, - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionResponseFileData.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mimeType_ = ""; - fileUri_ = ""; - displayName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileData getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileData build() { - com.google.cloud.vertexai.api.FunctionResponseFileData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileData buildPartial() { - com.google.cloud.vertexai.api.FunctionResponseFileData result = - new com.google.cloud.vertexai.api.FunctionResponseFileData(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionResponseFileData result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mimeType_ = mimeType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.fileUri_ = fileUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.displayName_ = displayName_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionResponseFileData) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionResponseFileData) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionResponseFileData other) { - if (other == com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance()) - return this; - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFileUri().isEmpty()) { - fileUri_ = other.fileUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - 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: - { - mimeType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - fileUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - displayName_ = 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 mimeType_ = ""; - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The IANA standard MIME type of the source data.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object fileUri_ = ""; - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - public java.lang.String getFileUri() { - java.lang.Object ref = fileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - public com.google.protobuf.ByteString getFileUriBytes() { - java.lang.Object ref = fileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The fileUri to set. - * @return This builder for chaining. - */ - public Builder setFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - fileUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFileUri() { - fileUri_ = getDefaultInstance().getFileUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. URI.
-     * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for fileUri to set. - * @return This builder for chaining. - */ - public Builder setFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - fileUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - - /** - * - * - *
-     * Optional. Display name of the file data.
-     *
-     * Used to provide a label or filename to distinguish file datas.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 3 [(.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. Display name of the file data.
-     *
-     * Used to provide a label or filename to distinguish file datas.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 3 [(.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. Display name of the file data.
-     *
-     * Used to provide a label or filename to distinguish file datas.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 3 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Display name of the file data.
-     *
-     * Used to provide a label or filename to distinguish file datas.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Display name of the file data.
-     *
-     * Used to provide a label or filename to distinguish file datas.
-     *
-     * This field is only returned in PromptMessage for prompt management.
-     * It is currently used in the Gemini GenerateContent calls only when server
-     * side tools (code_execution, google_search, and url_context) are enabled.
-     * 
- * - * string display_name = 3 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionResponseFileData) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionResponseFileData) - private static final com.google.cloud.vertexai.api.FunctionResponseFileData DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionResponseFileData(); - } - - public static com.google.cloud.vertexai.api.FunctionResponseFileData getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionResponseFileData 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.vertexai.api.FunctionResponseFileData getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileDataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileDataOrBuilder.java deleted file mode 100644 index da8270fafa14..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseFileDataOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionResponseFileDataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionResponseFileData) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - - /** - * - * - *
-   * Required. The IANA standard MIME type of the source data.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The fileUri. - */ - java.lang.String getFileUri(); - - /** - * - * - *
-   * Required. URI.
-   * 
- * - * string file_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for fileUri. - */ - com.google.protobuf.ByteString getFileUriBytes(); - - /** - * - * - *
-   * Optional. Display name of the file data.
-   *
-   * Used to provide a label or filename to distinguish file datas.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Optional. Display name of the file data.
-   *
-   * Used to provide a label or filename to distinguish file datas.
-   *
-   * This field is only returned in PromptMessage for prompt management.
-   * It is currently used in the Gemini GenerateContent calls only when server
-   * side tools (code_execution, google_search, and url_context) are enabled.
-   * 
- * - * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java deleted file mode 100644 index 53a944c2fa0d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Required. The name of the function to call.
-   * Matches [FunctionDeclaration.name] and [FunctionCall.name].
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the response field is set. - */ - boolean hasResponse(); - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The response. - */ - com.google.protobuf.Struct getResponse(); - - /** - * - * - *
-   * Required. The function response in JSON object format.
-   * Use "output" key to specify function output and "error" key to specify
-   * error details (if any). If "output" and "error" keys are not specified,
-   * then whole "response" is treated as function output.
-   * 
- * - * .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.StructOrBuilder getResponseOrBuilder(); - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getPartsList(); - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionResponsePart getParts(int index); - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPartsCount(); - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getPartsOrBuilderList(); - - /** - * - * - *
-   * Optional. Ordered `Parts` that constitute a function response. Parts may
-   * have different IANA MIME types.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder getPartsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePart.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePart.java deleted file mode 100644 index 6cc01c6ff5de..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePart.java +++ /dev/null @@ -1,1120 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A datatype containing media that is part of a `FunctionResponse` message.
- *
- * A `FunctionResponsePart` consists of data which has an associated datatype. A
- * `FunctionResponsePart` can only contain one of the accepted types in
- * `FunctionResponsePart.data`.
- *
- * A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
- * type and subtype of the media if the `inline_data` field is filled with raw
- * bytes.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponsePart} - */ -@com.google.protobuf.Generated -public final class FunctionResponsePart extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.FunctionResponsePart) - FunctionResponsePartOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FunctionResponsePart"); - } - - // Use FunctionResponsePart.newBuilder() to construct. - private FunctionResponsePart(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FunctionResponsePart() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponsePart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponsePart.class, - com.google.cloud.vertexai.api.FunctionResponsePart.Builder.class); - } - - 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 { - INLINE_DATA(1), - FILE_DATA(2), - 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 1: - return INLINE_DATA; - case 2: - return FILE_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 INLINE_DATA_FIELD_NUMBER = 1; - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return Whether the inlineData field is set. - */ - @java.lang.Override - public boolean hasInlineData() { - return dataCase_ == 1; - } - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return The inlineData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlob getInlineData() { - if (dataCase_ == 1) { - return (com.google.cloud.vertexai.api.FunctionResponseBlob) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder getInlineDataOrBuilder() { - if (dataCase_ == 1) { - return (com.google.cloud.vertexai.api.FunctionResponseBlob) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - - public static final int FILE_DATA_FIELD_NUMBER = 2; - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return Whether the fileData field is set. - */ - @java.lang.Override - public boolean hasFileData() { - return dataCase_ == 2; - } - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return The fileData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileData getFileData() { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.FunctionResponseFileData) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder getFileDataOrBuilder() { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.FunctionResponseFileData) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseFileData.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 (dataCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vertexai.api.FunctionResponseBlob) data_); - } - if (dataCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.FunctionResponseFileData) data_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.FunctionResponseBlob) data_); - } - if (dataCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.FunctionResponseFileData) data_); - } - 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.vertexai.api.FunctionResponsePart)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.FunctionResponsePart other = - (com.google.cloud.vertexai.api.FunctionResponsePart) obj; - - if (!getDataCase().equals(other.getDataCase())) return false; - switch (dataCase_) { - case 1: - if (!getInlineData().equals(other.getInlineData())) return false; - break; - case 2: - if (!getFileData().equals(other.getFileData())) 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 (dataCase_) { - case 1: - hash = (37 * hash) + INLINE_DATA_FIELD_NUMBER; - hash = (53 * hash) + getInlineData().hashCode(); - break; - case 2: - hash = (37 * hash) + FILE_DATA_FIELD_NUMBER; - hash = (53 * hash) + getFileData().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart 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.vertexai.api.FunctionResponsePart parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart 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.vertexai.api.FunctionResponsePart parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.FunctionResponsePart 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A datatype containing media that is part of a `FunctionResponse` message.
-   *
-   * A `FunctionResponsePart` consists of data which has an associated datatype. A
-   * `FunctionResponsePart` can only contain one of the accepted types in
-   * `FunctionResponsePart.data`.
-   *
-   * A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
-   * type and subtype of the media if the `inline_data` field is filled with raw
-   * bytes.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.FunctionResponsePart} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.FunctionResponsePart) - com.google.cloud.vertexai.api.FunctionResponsePartOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponsePart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.FunctionResponsePart.class, - com.google.cloud.vertexai.api.FunctionResponsePart.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.FunctionResponsePart.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (inlineDataBuilder_ != null) { - inlineDataBuilder_.clear(); - } - if (fileDataBuilder_ != null) { - fileDataBuilder_.clear(); - } - dataCase_ = 0; - data_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponsePart getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.FunctionResponsePart.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponsePart build() { - com.google.cloud.vertexai.api.FunctionResponsePart result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponsePart buildPartial() { - com.google.cloud.vertexai.api.FunctionResponsePart result = - new com.google.cloud.vertexai.api.FunctionResponsePart(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.FunctionResponsePart result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.FunctionResponsePart result) { - result.dataCase_ = dataCase_; - result.data_ = this.data_; - if (dataCase_ == 1 && inlineDataBuilder_ != null) { - result.data_ = inlineDataBuilder_.build(); - } - if (dataCase_ == 2 && fileDataBuilder_ != null) { - result.data_ = fileDataBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.FunctionResponsePart) { - return mergeFrom((com.google.cloud.vertexai.api.FunctionResponsePart) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.FunctionResponsePart other) { - if (other == com.google.cloud.vertexai.api.FunctionResponsePart.getDefaultInstance()) - return this; - switch (other.getDataCase()) { - case INLINE_DATA: - { - mergeInlineData(other.getInlineData()); - break; - } - case FILE_DATA: - { - mergeFileData(other.getFileData()); - 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: - { - input.readMessage( - internalGetInlineDataFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetFileDataFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 2; - 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 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.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseBlob, - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder, - com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder> - inlineDataBuilder_; - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return Whether the inlineData field is set. - */ - @java.lang.Override - public boolean hasInlineData() { - return dataCase_ == 1; - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return The inlineData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlob getInlineData() { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 1) { - return (com.google.cloud.vertexai.api.FunctionResponseBlob) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } else { - if (dataCase_ == 1) { - return inlineDataBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - public Builder setInlineData(com.google.cloud.vertexai.api.FunctionResponseBlob value) { - if (inlineDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - inlineDataBuilder_.setMessage(value); - } - dataCase_ = 1; - return this; - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - public Builder setInlineData( - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder builderForValue) { - if (inlineDataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - inlineDataBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 1; - return this; - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - public Builder mergeInlineData(com.google.cloud.vertexai.api.FunctionResponseBlob value) { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 1 - && data_ != com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.FunctionResponseBlob.newBuilder( - (com.google.cloud.vertexai.api.FunctionResponseBlob) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 1) { - inlineDataBuilder_.mergeFrom(value); - } else { - inlineDataBuilder_.setMessage(value); - } - } - dataCase_ = 1; - return this; - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - public Builder clearInlineData() { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 1) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 1) { - dataCase_ = 0; - data_ = null; - } - inlineDataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - public com.google.cloud.vertexai.api.FunctionResponseBlob.Builder getInlineDataBuilder() { - return internalGetInlineDataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder getInlineDataOrBuilder() { - if ((dataCase_ == 1) && (inlineDataBuilder_ != null)) { - return inlineDataBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 1) { - return (com.google.cloud.vertexai.api.FunctionResponseBlob) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Inline media bytes.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseBlob, - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder, - com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder> - internalGetInlineDataFieldBuilder() { - if (inlineDataBuilder_ == null) { - if (!(dataCase_ == 1)) { - data_ = com.google.cloud.vertexai.api.FunctionResponseBlob.getDefaultInstance(); - } - inlineDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseBlob, - com.google.cloud.vertexai.api.FunctionResponseBlob.Builder, - com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder>( - (com.google.cloud.vertexai.api.FunctionResponseBlob) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 1; - onChanged(); - return inlineDataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseFileData, - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder, - com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder> - fileDataBuilder_; - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return Whether the fileData field is set. - */ - @java.lang.Override - public boolean hasFileData() { - return dataCase_ == 2; - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return The fileData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileData getFileData() { - if (fileDataBuilder_ == null) { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.FunctionResponseFileData) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } else { - if (dataCase_ == 2) { - return fileDataBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - public Builder setFileData(com.google.cloud.vertexai.api.FunctionResponseFileData value) { - if (fileDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - fileDataBuilder_.setMessage(value); - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - public Builder setFileData( - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder builderForValue) { - if (fileDataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - fileDataBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - public Builder mergeFileData(com.google.cloud.vertexai.api.FunctionResponseFileData value) { - if (fileDataBuilder_ == null) { - if (dataCase_ == 2 - && data_ - != com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.FunctionResponseFileData.newBuilder( - (com.google.cloud.vertexai.api.FunctionResponseFileData) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 2) { - fileDataBuilder_.mergeFrom(value); - } else { - fileDataBuilder_.setMessage(value); - } - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - public Builder clearFileData() { - if (fileDataBuilder_ == null) { - if (dataCase_ == 2) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 2) { - dataCase_ = 0; - data_ = null; - } - fileDataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - public com.google.cloud.vertexai.api.FunctionResponseFileData.Builder getFileDataBuilder() { - return internalGetFileDataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder getFileDataOrBuilder() { - if ((dataCase_ == 2) && (fileDataBuilder_ != null)) { - return fileDataBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.FunctionResponseFileData) data_; - } - return com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } - } - - /** - * - * - *
-     * URI based data.
-     * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseFileData, - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder, - com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder> - internalGetFileDataFieldBuilder() { - if (fileDataBuilder_ == null) { - if (!(dataCase_ == 2)) { - data_ = com.google.cloud.vertexai.api.FunctionResponseFileData.getDefaultInstance(); - } - fileDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponseFileData, - com.google.cloud.vertexai.api.FunctionResponseFileData.Builder, - com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder>( - (com.google.cloud.vertexai.api.FunctionResponseFileData) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 2; - onChanged(); - return fileDataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.FunctionResponsePart) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.FunctionResponsePart) - private static final com.google.cloud.vertexai.api.FunctionResponsePart DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.FunctionResponsePart(); - } - - public static com.google.cloud.vertexai.api.FunctionResponsePart getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FunctionResponsePart 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.vertexai.api.FunctionResponsePart getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePartOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePartOrBuilder.java deleted file mode 100644 index 942130b45d64..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponsePartOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface FunctionResponsePartOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.FunctionResponsePart) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return Whether the inlineData field is set. - */ - boolean hasInlineData(); - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - * - * @return The inlineData. - */ - com.google.cloud.vertexai.api.FunctionResponseBlob getInlineData(); - - /** - * - * - *
-   * Inline media bytes.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseBlob inline_data = 1; - */ - com.google.cloud.vertexai.api.FunctionResponseBlobOrBuilder getInlineDataOrBuilder(); - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return Whether the fileData field is set. - */ - boolean hasFileData(); - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - * - * @return The fileData. - */ - com.google.cloud.vertexai.api.FunctionResponseFileData getFileData(); - - /** - * - * - *
-   * URI based data.
-   * 
- * - * .google.cloud.vertexai.v1.FunctionResponseFileData file_data = 2; - */ - com.google.cloud.vertexai.api.FunctionResponseFileDataOrBuilder getFileDataOrBuilder(); - - com.google.cloud.vertexai.api.FunctionResponsePart.DataCase getDataCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java deleted file mode 100644 index b3e32b5cf1aa..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java +++ /dev/null @@ -1,616 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Google Cloud Storage location where the output is to be written to.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GcsDestination} - */ -@com.google.protobuf.Generated -public final class GcsDestination extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GcsDestination) - GcsDestinationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GcsDestination"); - } - - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GcsDestination() { - outputUriPrefix_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GcsDestination.class, - com.google.cloud.vertexai.api.GcsDestination.Builder.class); - } - - public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object outputUriPrefix_ = ""; - - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-   * end with
-   * '/', a '/' will be automatically appended. The directory is created if it
-   * doesn't exist.
-   * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUriPrefix. - */ - @java.lang.Override - public java.lang.String getOutputUriPrefix() { - java.lang.Object ref = outputUriPrefix_; - 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(); - outputUriPrefix_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-   * end with
-   * '/', a '/' will be automatically appended. The directory is created if it
-   * doesn't exist.
-   * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUriPrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputUriPrefixBytes() { - java.lang.Object ref = outputUriPrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUriPrefix_ = 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.GeneratedMessage.isStringEmpty(outputUriPrefix_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, outputUriPrefix_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outputUriPrefix_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, outputUriPrefix_); - } - 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.vertexai.api.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GcsDestination other = - (com.google.cloud.vertexai.api.GcsDestination) obj; - - if (!getOutputUriPrefix().equals(other.getOutputUriPrefix())) 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) + OUTPUT_URI_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getOutputUriPrefix().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GcsDestination 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.vertexai.api.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GcsDestination 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.vertexai.api.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GcsDestination 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GcsDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GcsDestination) - com.google.cloud.vertexai.api.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GcsDestination.class, - com.google.cloud.vertexai.api.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GcsDestination.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - outputUriPrefix_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination build() { - com.google.cloud.vertexai.api.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination buildPartial() { - com.google.cloud.vertexai.api.GcsDestination result = - new com.google.cloud.vertexai.api.GcsDestination(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GcsDestination result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.outputUriPrefix_ = outputUriPrefix_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GcsDestination) { - return mergeFrom((com.google.cloud.vertexai.api.GcsDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GcsDestination other) { - if (other == com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance()) return this; - if (!other.getOutputUriPrefix().isEmpty()) { - outputUriPrefix_ = other.outputUriPrefix_; - 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: - { - outputUriPrefix_ = 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 outputUriPrefix_ = ""; - - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-     * end with
-     * '/', a '/' will be automatically appended. The directory is created if it
-     * doesn't exist.
-     * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUriPrefix. - */ - public java.lang.String getOutputUriPrefix() { - java.lang.Object ref = outputUriPrefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUriPrefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-     * end with
-     * '/', a '/' will be automatically appended. The directory is created if it
-     * doesn't exist.
-     * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUriPrefix. - */ - public com.google.protobuf.ByteString getOutputUriPrefixBytes() { - java.lang.Object ref = outputUriPrefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUriPrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-     * end with
-     * '/', a '/' will be automatically appended. The directory is created if it
-     * doesn't exist.
-     * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The outputUriPrefix to set. - * @return This builder for chaining. - */ - public Builder setOutputUriPrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputUriPrefix_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-     * end with
-     * '/', a '/' will be automatically appended. The directory is created if it
-     * doesn't exist.
-     * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOutputUriPrefix() { - outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-     * end with
-     * '/', a '/' will be automatically appended. The directory is created if it
-     * doesn't exist.
-     * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for outputUriPrefix to set. - * @return This builder for chaining. - */ - public Builder setOutputUriPrefixBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputUriPrefix_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GcsDestination) - private static final com.google.cloud.vertexai.api.GcsDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GcsDestination(); - } - - public static com.google.cloud.vertexai.api.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination 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.vertexai.api.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java deleted file mode 100644 index 4071c0374944..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GcsDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-   * end with
-   * '/', a '/' will be automatically appended. The directory is created if it
-   * doesn't exist.
-   * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The outputUriPrefix. - */ - java.lang.String getOutputUriPrefix(); - - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory. If the uri doesn't
-   * end with
-   * '/', a '/' will be automatically appended. The directory is created if it
-   * doesn't exist.
-   * 
- * - * string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for outputUriPrefix. - */ - com.google.protobuf.ByteString getOutputUriPrefixBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java deleted file mode 100644 index 2eae3cba97f3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Google Cloud Storage location for the input content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GcsSource} - */ -@com.google.protobuf.Generated -public final class GcsSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GcsSource) - GcsSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GcsSource"); - } - - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GcsSource() { - uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GcsSource.class, - com.google.cloud.vertexai.api.GcsSource.Builder.class); - } - - public static final int URIS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList uris_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList getUrisList() { - return uris_; - } - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.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. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.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 { - for (int i = 0; i < uris_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uris_.getRaw(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 < 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.vertexai.api.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GcsSource other = (com.google.cloud.vertexai.api.GcsSource) obj; - - 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(); - 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.vertexai.api.GcsSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GcsSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GcsSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GcsSource) - com.google.cloud.vertexai.api.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GcsSource.class, - com.google.cloud.vertexai.api.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GcsSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource build() { - com.google.cloud.vertexai.api.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource buildPartial() { - com.google.cloud.vertexai.api.GcsSource result = - new com.google.cloud.vertexai.api.GcsSource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GcsSource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - uris_.makeImmutable(); - result.uris_ = uris_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GcsSource) { - return mergeFrom((com.google.cloud.vertexai.api.GcsSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GcsSource other) { - if (other == com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) return this; - if (!other.uris_.isEmpty()) { - if (uris_.isEmpty()) { - uris_ = other.uris_; - bitField0_ |= 0x00000001; - } 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: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUrisIsMutable(); - uris_.add(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 bitField0_; - - 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_ |= 0x00000001; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList getUrisList() { - uris_.makeImmutable(); - return uris_; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearUris() { - uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-     * wildcards. For more information on wildcards, see
-     * https://cloud.google.com/storage/docs/wildcards.
-     * 
- * - * repeated string uris = 1 [(.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_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GcsSource) - private static final com.google.cloud.vertexai.api.GcsSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GcsSource(); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java deleted file mode 100644 index 19189e21a6b0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GcsSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the uris. - */ - java.util.List getUrisList(); - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of uris. - */ - int getUrisCount(); - - /** - * - * - *
-   * Required. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.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. Google Cloud Storage URI(-s) to the input file(s). May contain
-   * wildcards. For more information on wildcards, see
-   * https://cloud.google.com/storage/docs/wildcards.
-   * 
- * - * repeated string uris = 1 [(.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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfig.java deleted file mode 100644 index 444a7805b6af..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfig.java +++ /dev/null @@ -1,1233 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for GenAiAdvancedFeatures.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig} - */ -@com.google.protobuf.Generated -public final class GenAiAdvancedFeaturesConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig) - GenAiAdvancedFeaturesConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GenAiAdvancedFeaturesConfig"); - } - - // Use GenAiAdvancedFeaturesConfig.newBuilder() to construct. - private GenAiAdvancedFeaturesConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GenAiAdvancedFeaturesConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.class, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder.class); - } - - public interface RagConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * If true, enable Retrieval Augmented Generation in ChatCompletion request.
-     * Once enabled, the endpoint will be identified as GenAI endpoint and
-     * Arthedain router will be used.
-     * 
- * - * bool enable_rag = 1; - * - * @return The enableRag. - */ - boolean getEnableRag(); - } - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig} - */ - public static final class RagConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig) - RagConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagConfig"); - } - - // Use RagConfig.newBuilder() to construct. - private RagConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.class, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder.class); - } - - public static final int ENABLE_RAG_FIELD_NUMBER = 1; - private boolean enableRag_ = false; - - /** - * - * - *
-     * If true, enable Retrieval Augmented Generation in ChatCompletion request.
-     * Once enabled, the endpoint will be identified as GenAI endpoint and
-     * Arthedain router will be used.
-     * 
- * - * bool enable_rag = 1; - * - * @return The enableRag. - */ - @java.lang.Override - public boolean getEnableRag() { - return enableRag_; - } - - 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 (enableRag_ != false) { - output.writeBool(1, enableRag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableRag_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableRag_); - } - 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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig other = - (com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig) obj; - - if (getEnableRag() != other.getEnableRag()) 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) + ENABLE_RAG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRag()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig) - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.class, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enableRag_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_RagConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig build() { - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig buildPartial() { - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig result = - new com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enableRag_ = enableRag_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig) { - return mergeFrom( - (com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig other) { - if (other - == com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - .getDefaultInstance()) return this; - if (other.getEnableRag() != false) { - setEnableRag(other.getEnableRag()); - } - 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: - { - enableRag_ = input.readBool(); - 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 boolean enableRag_; - - /** - * - * - *
-       * If true, enable Retrieval Augmented Generation in ChatCompletion request.
-       * Once enabled, the endpoint will be identified as GenAI endpoint and
-       * Arthedain router will be used.
-       * 
- * - * bool enable_rag = 1; - * - * @return The enableRag. - */ - @java.lang.Override - public boolean getEnableRag() { - return enableRag_; - } - - /** - * - * - *
-       * If true, enable Retrieval Augmented Generation in ChatCompletion request.
-       * Once enabled, the endpoint will be identified as GenAI endpoint and
-       * Arthedain router will be used.
-       * 
- * - * bool enable_rag = 1; - * - * @param value The enableRag to set. - * @return This builder for chaining. - */ - public Builder setEnableRag(boolean value) { - - enableRag_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * If true, enable Retrieval Augmented Generation in ChatCompletion request.
-       * Once enabled, the endpoint will be identified as GenAI endpoint and
-       * Arthedain router will be used.
-       * 
- * - * bool enable_rag = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnableRag() { - bitField0_ = (bitField0_ & ~0x00000001); - enableRag_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig) - private static final com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig(); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int RAG_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig ragConfig_; - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return Whether the ragConfig field is set. - */ - @java.lang.Override - public boolean hasRagConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return The ragConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig getRagConfig() { - return ragConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.getDefaultInstance() - : ragConfig_; - } - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder - getRagConfigOrBuilder() { - return ragConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.getDefaultInstance() - : ragConfig_; - } - - 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.writeMessage(1, getRagConfig()); - } - 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.computeMessageSize(1, getRagConfig()); - } - 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.vertexai.api.GenAiAdvancedFeaturesConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig other = - (com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig) obj; - - if (hasRagConfig() != other.hasRagConfig()) return false; - if (hasRagConfig()) { - if (!getRagConfig().equals(other.getRagConfig())) 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 (hasRagConfig()) { - hash = (37 * hash) + RAG_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenAiAdvancedFeaturesConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for GenAiAdvancedFeatures.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig) - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.class, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ragConfig_ = null; - if (ragConfigBuilder_ != null) { - ragConfigBuilder_.dispose(); - ragConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_GenAiAdvancedFeaturesConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig build() { - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig buildPartial() { - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig result = - new com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ragConfig_ = ragConfigBuilder_ == null ? ragConfig_ : ragConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig) { - return mergeFrom((com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig other) { - if (other == com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.getDefaultInstance()) - return this; - if (other.hasRagConfig()) { - mergeRagConfig(other.getRagConfig()); - } - 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( - internalGetRagConfigFieldBuilder().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.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig ragConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder> - ragConfigBuilder_; - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return Whether the ragConfig field is set. - */ - public boolean hasRagConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return The ragConfig. - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig getRagConfig() { - if (ragConfigBuilder_ == null) { - return ragConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - .getDefaultInstance() - : ragConfig_; - } else { - return ragConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public Builder setRagConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig value) { - if (ragConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragConfig_ = value; - } else { - ragConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public Builder setRagConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder - builderForValue) { - if (ragConfigBuilder_ == null) { - ragConfig_ = builderForValue.build(); - } else { - ragConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public Builder mergeRagConfig( - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig value) { - if (ragConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && ragConfig_ != null - && ragConfig_ - != com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - .getDefaultInstance()) { - getRagConfigBuilder().mergeFrom(value); - } else { - ragConfig_ = value; - } - } else { - ragConfigBuilder_.mergeFrom(value); - } - if (ragConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public Builder clearRagConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - ragConfig_ = null; - if (ragConfigBuilder_ != null) { - ragConfigBuilder_.dispose(); - ragConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder - getRagConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetRagConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - public com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder - getRagConfigOrBuilder() { - if (ragConfigBuilder_ != null) { - return ragConfigBuilder_.getMessageOrBuilder(); - } else { - return ragConfig_ == null - ? com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig - .getDefaultInstance() - : ragConfig_; - } - } - - /** - * - * - *
-     * Configuration for Retrieval Augmented Generation feature.
-     * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder> - internalGetRagConfigFieldBuilder() { - if (ragConfigBuilder_ == null) { - ragConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig.Builder, - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder>( - getRagConfig(), getParentForChildren(), isClean()); - ragConfig_ = null; - } - return ragConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig) - private static final com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig(); - } - - public static com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenAiAdvancedFeaturesConfig 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.vertexai.api.GenAiAdvancedFeaturesConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfigOrBuilder.java deleted file mode 100644 index c670879629d2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenAiAdvancedFeaturesConfigOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GenAiAdvancedFeaturesConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return Whether the ragConfig field is set. - */ - boolean hasRagConfig(); - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - * - * @return The ragConfig. - */ - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfig getRagConfig(); - - /** - * - * - *
-   * Configuration for Retrieval Augmented Generation feature.
-   * 
- * - * .google.cloud.vertexai.v1.GenAiAdvancedFeaturesConfig.RagConfig rag_config = 1; - */ - com.google.cloud.vertexai.api.GenAiAdvancedFeaturesConfig.RagConfigOrBuilder - getRagConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java deleted file mode 100644 index 346fbd30fb49..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java +++ /dev/null @@ -1,4489 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for [PredictionService.GenerateContent].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentRequest} - */ -@com.google.protobuf.Generated -public final class GenerateContentRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerateContentRequest) - GenerateContentRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GenerateContentRequest"); - } - - // Use GenerateContentRequest.newBuilder() to construct. - private GenerateContentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GenerateContentRequest() { - model_ = ""; - contents_ = java.util.Collections.emptyList(); - cachedContent_ = ""; - tools_ = java.util.Collections.emptyList(); - safetySettings_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentRequest.class, - com.google.cloud.vertexai.api.GenerateContentRequest.Builder.class); - } - - private int bitField0_; - public static final int MODEL_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Required. The fully qualified name of the publisher model or tuned model
-   * endpoint to use.
-   *
-   * Publisher model format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   *
-   * Tuned model endpoint format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The fully qualified name of the publisher model or tuned model
-   * endpoint to use.
-   *
-   * Publisher model format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   *
-   * Tuned model endpoint format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List contents_; - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getContentsList() { - return contents_; - } - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getContentsOrBuilderList() { - return contents_; - } - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getContentsCount() { - return contents_.size(); - } - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getContents(int index) { - return contents_.get(index); - } - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - return contents_.get(index); - } - - public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 8; - private com.google.cloud.vertexai.api.Content systemInstruction_; - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - @java.lang.Override - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - - public static final int CACHED_CONTENT_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object cachedContent_ = ""; - - /** - * - * - *
-   * Optional. The name of the cached content used as context to serve the
-   * prediction. Note: only used in explicit caching, where users can have
-   * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-   * savings. Format:
-   * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-   * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The cachedContent. - */ - @java.lang.Override - public java.lang.String getCachedContent() { - java.lang.Object ref = cachedContent_; - 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(); - cachedContent_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the cached content used as context to serve the
-   * prediction. Note: only used in explicit caching, where users can have
-   * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-   * savings. Format:
-   * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-   * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for cachedContent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCachedContentBytes() { - java.lang.Object ref = cachedContent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - cachedContent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOOLS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private java.util.List tools_; - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getToolsList() { - return tools_; - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getToolsOrBuilderList() { - return tools_; - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getToolsCount() { - return tools_.size(); - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool getTools(int index) { - return tools_.get(index); - } - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - return tools_.get(index); - } - - public static final int TOOL_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.ToolConfig toolConfig_; - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the toolConfig field is set. - */ - @java.lang.Override - public boolean hasToolConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The toolConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfig getToolConfig() { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder() { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - - public static final int LABELS_FIELD_NUMBER = 10; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SAFETY_SETTINGS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List safetySettings_; - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getSafetySettingsList() { - return safetySettings_; - } - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getSafetySettingsOrBuilderList() { - return safetySettings_; - } - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getSafetySettingsCount() { - return safetySettings_.size(); - } - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting getSafetySettings(int index) { - return safetySettings_.get(index); - } - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySettingOrBuilder getSafetySettingsOrBuilder( - int index) { - return safetySettings_.get(index); - } - - public static final int MODEL_ARMOR_CONFIG_FIELD_NUMBER = 11; - private com.google.cloud.vertexai.api.ModelArmorConfig modelArmorConfig_; - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the modelArmorConfig field is set. - */ - @java.lang.Override - public boolean hasModelArmorConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The modelArmorConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModelArmorConfig getModelArmorConfig() { - return modelArmorConfig_ == null - ? com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance() - : modelArmorConfig_; - } - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder getModelArmorConfigOrBuilder() { - return modelArmorConfig_ == null - ? com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance() - : modelArmorConfig_; - } - - public static final int GENERATION_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.GenerationConfig generationConfig_; - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - @java.lang.Override - public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig() { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - - 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 < contents_.size(); i++) { - output.writeMessage(2, contents_.get(i)); - } - for (int i = 0; i < safetySettings_.size(); i++) { - output.writeMessage(3, safetySettings_.get(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(4, getGenerationConfig()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, model_); - } - for (int i = 0; i < tools_.size(); i++) { - output.writeMessage(6, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getToolConfig()); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(8, getSystemInstruction()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cachedContent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, cachedContent_); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10); - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(11, getModelArmorConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contents_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, contents_.get(i)); - } - for (int i = 0; i < safetySettings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, safetySettings_.get(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerationConfig()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, model_); - } - for (int i = 0; i < tools_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, tools_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getToolConfig()); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSystemInstruction()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cachedContent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(9, cachedContent_); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, labels__); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getModelArmorConfig()); - } - 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.vertexai.api.GenerateContentRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerateContentRequest other = - (com.google.cloud.vertexai.api.GenerateContentRequest) obj; - - if (!getModel().equals(other.getModel())) return false; - if (!getContentsList().equals(other.getContentsList())) return false; - if (hasSystemInstruction() != other.hasSystemInstruction()) return false; - if (hasSystemInstruction()) { - if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; - } - if (!getCachedContent().equals(other.getCachedContent())) return false; - if (!getToolsList().equals(other.getToolsList())) return false; - if (hasToolConfig() != other.hasToolConfig()) return false; - if (hasToolConfig()) { - if (!getToolConfig().equals(other.getToolConfig())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getSafetySettingsList().equals(other.getSafetySettingsList())) return false; - if (hasModelArmorConfig() != other.hasModelArmorConfig()) return false; - if (hasModelArmorConfig()) { - if (!getModelArmorConfig().equals(other.getModelArmorConfig())) return false; - } - if (hasGenerationConfig() != other.hasGenerationConfig()) return false; - if (hasGenerationConfig()) { - if (!getGenerationConfig().equals(other.getGenerationConfig())) 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) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - if (getContentsCount() > 0) { - hash = (37 * hash) + CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getContentsList().hashCode(); - } - if (hasSystemInstruction()) { - hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; - hash = (53 * hash) + getSystemInstruction().hashCode(); - } - hash = (37 * hash) + CACHED_CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getCachedContent().hashCode(); - if (getToolsCount() > 0) { - hash = (37 * hash) + TOOLS_FIELD_NUMBER; - hash = (53 * hash) + getToolsList().hashCode(); - } - if (hasToolConfig()) { - hash = (37 * hash) + TOOL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getToolConfig().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getSafetySettingsCount() > 0) { - hash = (37 * hash) + SAFETY_SETTINGS_FIELD_NUMBER; - hash = (53 * hash) + getSafetySettingsList().hashCode(); - } - if (hasModelArmorConfig()) { - hash = (37 * hash) + MODEL_ARMOR_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getModelArmorConfig().hashCode(); - } - if (hasGenerationConfig()) { - hash = (37 * hash) + GENERATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGenerationConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest 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.vertexai.api.GenerateContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest 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.vertexai.api.GenerateContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerateContentRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for [PredictionService.GenerateContent].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerateContentRequest) - com.google.cloud.vertexai.api.GenerateContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 10: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentRequest.class, - com.google.cloud.vertexai.api.GenerateContentRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenerateContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetContentsFieldBuilder(); - internalGetSystemInstructionFieldBuilder(); - internalGetToolsFieldBuilder(); - internalGetToolConfigFieldBuilder(); - internalGetSafetySettingsFieldBuilder(); - internalGetModelArmorConfigFieldBuilder(); - internalGetGenerationConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - model_ = ""; - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - } else { - contents_ = null; - contentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - cachedContent_ = ""; - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - } else { - tools_ = null; - toolsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - toolConfig_ = null; - if (toolConfigBuilder_ != null) { - toolConfigBuilder_.dispose(); - toolConfigBuilder_ = null; - } - internalGetMutableLabels().clear(); - if (safetySettingsBuilder_ == null) { - safetySettings_ = java.util.Collections.emptyList(); - } else { - safetySettings_ = null; - safetySettingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - modelArmorConfig_ = null; - if (modelArmorConfigBuilder_ != null) { - modelArmorConfigBuilder_.dispose(); - modelArmorConfigBuilder_ = null; - } - generationConfig_ = null; - if (generationConfigBuilder_ != null) { - generationConfigBuilder_.dispose(); - generationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerateContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentRequest build() { - com.google.cloud.vertexai.api.GenerateContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentRequest buildPartial() { - com.google.cloud.vertexai.api.GenerateContentRequest result = - new com.google.cloud.vertexai.api.GenerateContentRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GenerateContentRequest result) { - if (contentsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - contents_ = java.util.Collections.unmodifiableList(contents_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.contents_ = contents_; - } else { - result.contents_ = contentsBuilder_.build(); - } - if (toolsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - tools_ = java.util.Collections.unmodifiableList(tools_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.tools_ = tools_; - } else { - result.tools_ = toolsBuilder_.build(); - } - if (safetySettingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - safetySettings_ = java.util.Collections.unmodifiableList(safetySettings_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.safetySettings_ = safetySettings_; - } else { - result.safetySettings_ = safetySettingsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.GenerateContentRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.model_ = model_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.systemInstruction_ = - systemInstructionBuilder_ == null - ? systemInstruction_ - : systemInstructionBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.cachedContent_ = cachedContent_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.toolConfig_ = toolConfigBuilder_ == null ? toolConfig_ : toolConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.modelArmorConfig_ = - modelArmorConfigBuilder_ == null ? modelArmorConfig_ : modelArmorConfigBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.generationConfig_ = - generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerateContentRequest) { - return mergeFrom((com.google.cloud.vertexai.api.GenerateContentRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenerateContentRequest other) { - if (other == com.google.cloud.vertexai.api.GenerateContentRequest.getDefaultInstance()) - return this; - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (contentsBuilder_ == null) { - if (!other.contents_.isEmpty()) { - if (contents_.isEmpty()) { - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureContentsIsMutable(); - contents_.addAll(other.contents_); - } - onChanged(); - } - } else { - if (!other.contents_.isEmpty()) { - if (contentsBuilder_.isEmpty()) { - contentsBuilder_.dispose(); - contentsBuilder_ = null; - contents_ = other.contents_; - bitField0_ = (bitField0_ & ~0x00000002); - contentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetContentsFieldBuilder() - : null; - } else { - contentsBuilder_.addAllMessages(other.contents_); - } - } - } - if (other.hasSystemInstruction()) { - mergeSystemInstruction(other.getSystemInstruction()); - } - if (!other.getCachedContent().isEmpty()) { - cachedContent_ = other.cachedContent_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (toolsBuilder_ == null) { - if (!other.tools_.isEmpty()) { - if (tools_.isEmpty()) { - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureToolsIsMutable(); - tools_.addAll(other.tools_); - } - onChanged(); - } - } else { - if (!other.tools_.isEmpty()) { - if (toolsBuilder_.isEmpty()) { - toolsBuilder_.dispose(); - toolsBuilder_ = null; - tools_ = other.tools_; - bitField0_ = (bitField0_ & ~0x00000010); - toolsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetToolsFieldBuilder() - : null; - } else { - toolsBuilder_.addAllMessages(other.tools_); - } - } - } - if (other.hasToolConfig()) { - mergeToolConfig(other.getToolConfig()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000040; - if (safetySettingsBuilder_ == null) { - if (!other.safetySettings_.isEmpty()) { - if (safetySettings_.isEmpty()) { - safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureSafetySettingsIsMutable(); - safetySettings_.addAll(other.safetySettings_); - } - onChanged(); - } - } else { - if (!other.safetySettings_.isEmpty()) { - if (safetySettingsBuilder_.isEmpty()) { - safetySettingsBuilder_.dispose(); - safetySettingsBuilder_ = null; - safetySettings_ = other.safetySettings_; - bitField0_ = (bitField0_ & ~0x00000080); - safetySettingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSafetySettingsFieldBuilder() - : null; - } else { - safetySettingsBuilder_.addAllMessages(other.safetySettings_); - } - } - } - if (other.hasModelArmorConfig()) { - mergeModelArmorConfig(other.getModelArmorConfig()); - } - if (other.hasGenerationConfig()) { - mergeGenerationConfig(other.getGenerationConfig()); - } - 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: - { - com.google.cloud.vertexai.api.Content m = - input.readMessage( - com.google.cloud.vertexai.api.Content.parser(), extensionRegistry); - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(m); - } else { - contentsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - com.google.cloud.vertexai.api.SafetySetting m = - input.readMessage( - com.google.cloud.vertexai.api.SafetySetting.parser(), extensionRegistry); - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - safetySettings_.add(m); - } else { - safetySettingsBuilder_.addMessage(m); - } - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 34 - case 42: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 42 - case 50: - { - com.google.cloud.vertexai.api.Tool m = - input.readMessage( - com.google.cloud.vertexai.api.Tool.parser(), extensionRegistry); - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(m); - } else { - toolsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetToolConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 66 - case 74: - { - cachedContent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 74 - case 82: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000040; - break; - } // case 82 - case 90: - { - input.readMessage( - internalGetModelArmorConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 90 - 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 model_ = ""; - - /** - * - * - *
-     * Required. The fully qualified name of the publisher model or tuned model
-     * endpoint to use.
-     *
-     * Publisher model format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     *
-     * Tuned model endpoint format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The fully qualified name of the publisher model or tuned model
-     * endpoint to use.
-     *
-     * Publisher model format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     *
-     * Tuned model endpoint format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The fully qualified name of the publisher model or tuned model
-     * endpoint to use.
-     *
-     * Publisher model format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     *
-     * Tuned model endpoint format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The fully qualified name of the publisher model or tuned model
-     * endpoint to use.
-     *
-     * Publisher model format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     *
-     * Tuned model endpoint format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The fully qualified name of the publisher model or tuned model
-     * endpoint to use.
-     *
-     * Publisher model format:
-     * `projects/{project}/locations/{location}/publishers/*/models/*`
-     *
-     * Tuned model endpoint format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List contents_ = - java.util.Collections.emptyList(); - - private void ensureContentsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - contents_ = new java.util.ArrayList(contents_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - contentsBuilder_; - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getContentsList() { - if (contentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contents_); - } else { - return contentsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getContentsCount() { - if (contentsBuilder_ == null) { - return contents_.size(); - } else { - return contentsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Content getContents(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.set(index, value); - onChanged(); - } else { - contentsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.set(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(value); - onChanged(); - } else { - contentsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addContents(int index, com.google.cloud.vertexai.api.Content value) { - if (contentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentsIsMutable(); - contents_.add(index, value); - onChanged(); - } else { - contentsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addContents(com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addContents( - int index, com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.add(index, builderForValue.build()); - onChanged(); - } else { - contentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllContents( - java.lang.Iterable values) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contents_); - onChanged(); - } else { - contentsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearContents() { - if (contentsBuilder_ == null) { - contents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - contentsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeContents(int index) { - if (contentsBuilder_ == null) { - ensureContentsIsMutable(); - contents_.remove(index); - onChanged(); - } else { - contentsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getContentsBuilder(int index) { - return internalGetContentsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index) { - if (contentsBuilder_ == null) { - return contents_.get(index); - } else { - return contentsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getContentsOrBuilderList() { - if (contentsBuilder_ != null) { - return contentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contents_); - } - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder() { - return internalGetContentsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder addContentsBuilder(int index) { - return internalGetContentsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Content.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The content of the current conversation with the model.
-     *
-     * For single-turn queries, this is a single instance. For multi-turn queries,
-     * this is a repeated field that contains conversation history + latest
-     * request.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getContentsBuilderList() { - return internalGetContentsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetContentsFieldBuilder() { - if (contentsBuilder_ == null) { - contentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - contents_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - contents_ = null; - } - return contentsBuilder_; - } - - private com.google.cloud.vertexai.api.Content systemInstruction_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - systemInstructionBuilder_; - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - public boolean hasSystemInstruction() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - public com.google.cloud.vertexai.api.Content getSystemInstruction() { - if (systemInstructionBuilder_ == null) { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } else { - return systemInstructionBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - systemInstruction_ = value; - } else { - systemInstructionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSystemInstruction( - com.google.cloud.vertexai.api.Content.Builder builderForValue) { - if (systemInstructionBuilder_ == null) { - systemInstruction_ = builderForValue.build(); - } else { - systemInstructionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSystemInstruction(com.google.cloud.vertexai.api.Content value) { - if (systemInstructionBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && systemInstruction_ != null - && systemInstruction_ != com.google.cloud.vertexai.api.Content.getDefaultInstance()) { - getSystemInstructionBuilder().mergeFrom(value); - } else { - systemInstruction_ = value; - } - } else { - systemInstructionBuilder_.mergeFrom(value); - } - if (systemInstruction_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSystemInstruction() { - bitField0_ = (bitField0_ & ~0x00000004); - systemInstruction_ = null; - if (systemInstructionBuilder_ != null) { - systemInstructionBuilder_.dispose(); - systemInstructionBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Content.Builder getSystemInstructionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetSystemInstructionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder() { - if (systemInstructionBuilder_ != null) { - return systemInstructionBuilder_.getMessageOrBuilder(); - } else { - return systemInstruction_ == null - ? com.google.cloud.vertexai.api.Content.getDefaultInstance() - : systemInstruction_; - } - } - - /** - * - * - *
-     * Optional. The user provided system instructions for the model.
-     * Note: only text should be used in parts and content in each part will be in
-     * a separate paragraph.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder> - internalGetSystemInstructionFieldBuilder() { - if (systemInstructionBuilder_ == null) { - systemInstructionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Content, - com.google.cloud.vertexai.api.Content.Builder, - com.google.cloud.vertexai.api.ContentOrBuilder>( - getSystemInstruction(), getParentForChildren(), isClean()); - systemInstruction_ = null; - } - return systemInstructionBuilder_; - } - - private java.lang.Object cachedContent_ = ""; - - /** - * - * - *
-     * Optional. The name of the cached content used as context to serve the
-     * prediction. Note: only used in explicit caching, where users can have
-     * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-     * savings. Format:
-     * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-     * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The cachedContent. - */ - public java.lang.String getCachedContent() { - java.lang.Object ref = cachedContent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cachedContent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the cached content used as context to serve the
-     * prediction. Note: only used in explicit caching, where users can have
-     * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-     * savings. Format:
-     * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-     * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for cachedContent. - */ - public com.google.protobuf.ByteString getCachedContentBytes() { - java.lang.Object ref = cachedContent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - cachedContent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the cached content used as context to serve the
-     * prediction. Note: only used in explicit caching, where users can have
-     * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-     * savings. Format:
-     * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-     * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The cachedContent to set. - * @return This builder for chaining. - */ - public Builder setCachedContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - cachedContent_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the cached content used as context to serve the
-     * prediction. Note: only used in explicit caching, where users can have
-     * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-     * savings. Format:
-     * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-     * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearCachedContent() { - cachedContent_ = getDefaultInstance().getCachedContent(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the cached content used as context to serve the
-     * prediction. Note: only used in explicit caching, where users can have
-     * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-     * savings. Format:
-     * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-     * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for cachedContent to set. - * @return This builder for chaining. - */ - public Builder setCachedContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - cachedContent_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.util.List tools_ = - java.util.Collections.emptyList(); - - private void ensureToolsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - tools_ = new java.util.ArrayList(tools_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - toolsBuilder_; - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getToolsList() { - if (toolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tools_); - } else { - return toolsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getToolsCount() { - if (toolsBuilder_ == null) { - return tools_.size(); - } else { - return toolsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool getTools(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.set(index, value); - onChanged(); - } else { - toolsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.set(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(value); - onChanged(); - } else { - toolsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool value) { - if (toolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolsIsMutable(); - tools_.add(index, value); - onChanged(); - } else { - toolsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addTools(int index, com.google.cloud.vertexai.api.Tool.Builder builderForValue) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.add(index, builderForValue.build()); - onChanged(); - } else { - toolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllTools( - java.lang.Iterable values) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); - onChanged(); - } else { - toolsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearTools() { - if (toolsBuilder_ == null) { - tools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - toolsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeTools(int index) { - if (toolsBuilder_ == null) { - ensureToolsIsMutable(); - tools_.remove(index); - onChanged(); - } else { - toolsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder getToolsBuilder(int index) { - return internalGetToolsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) { - if (toolsBuilder_ == null) { - return tools_.get(index); - } else { - return toolsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getToolsOrBuilderList() { - if (toolsBuilder_ != null) { - return toolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tools_); - } - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder() { - return internalGetToolsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder(int index) { - return internalGetToolsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tool.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. A list of `Tools` the model may use to generate the next
-     * response.
-     *
-     * A `Tool` is a piece of code that enables the system to interact with
-     * external systems to perform an action, or set of actions, outside of
-     * knowledge and scope of the model.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getToolsBuilderList() { - return internalGetToolsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder> - internalGetToolsFieldBuilder() { - if (toolsBuilder_ == null) { - toolsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tool, - com.google.cloud.vertexai.api.Tool.Builder, - com.google.cloud.vertexai.api.ToolOrBuilder>( - tools_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - tools_ = null; - } - return toolsBuilder_; - } - - private com.google.cloud.vertexai.api.ToolConfig toolConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder> - toolConfigBuilder_; - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the toolConfig field is set. - */ - public boolean hasToolConfig() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The toolConfig. - */ - public com.google.cloud.vertexai.api.ToolConfig getToolConfig() { - if (toolConfigBuilder_ == null) { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } else { - return toolConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setToolConfig(com.google.cloud.vertexai.api.ToolConfig value) { - if (toolConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - toolConfig_ = value; - } else { - toolConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setToolConfig(com.google.cloud.vertexai.api.ToolConfig.Builder builderForValue) { - if (toolConfigBuilder_ == null) { - toolConfig_ = builderForValue.build(); - } else { - toolConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeToolConfig(com.google.cloud.vertexai.api.ToolConfig value) { - if (toolConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && toolConfig_ != null - && toolConfig_ != com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance()) { - getToolConfigBuilder().mergeFrom(value); - } else { - toolConfig_ = value; - } - } else { - toolConfigBuilder_.mergeFrom(value); - } - if (toolConfig_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearToolConfig() { - bitField0_ = (bitField0_ & ~0x00000020); - toolConfig_ = null; - if (toolConfigBuilder_ != null) { - toolConfigBuilder_.dispose(); - toolConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ToolConfig.Builder getToolConfigBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetToolConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder() { - if (toolConfigBuilder_ != null) { - return toolConfigBuilder_.getMessageOrBuilder(); - } else { - return toolConfig_ == null - ? com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance() - : toolConfig_; - } - } - - /** - * - * - *
-     * Optional. Tool config. This config is shared for all tools provided in the
-     * request.
-     * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder> - internalGetToolConfigFieldBuilder() { - if (toolConfigBuilder_ == null) { - toolConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ToolConfig, - com.google.cloud.vertexai.api.ToolConfig.Builder, - com.google.cloud.vertexai.api.ToolConfigOrBuilder>( - getToolConfig(), getParentForChildren(), isClean()); - toolConfig_ = null; - } - return toolConfigBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000040; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000040; - return internalGetMutableLabels().getMutableMap(); - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000040; - return this; - } - - /** - * - * - *
-     * Optional. The labels with user-defined metadata for the request. It is used
-     * for billing and reporting only.
-     *
-     * Label keys and values can be no longer than 63 characters
-     * (Unicode codepoints) and can only contain lowercase letters, numeric
-     * characters, underscores, and dashes. International characters are allowed.
-     * Label values are optional. Label keys must start with a letter.
-     * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000040; - return this; - } - - private java.util.List safetySettings_ = - java.util.Collections.emptyList(); - - private void ensureSafetySettingsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - safetySettings_ = - new java.util.ArrayList(safetySettings_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetySetting, - com.google.cloud.vertexai.api.SafetySetting.Builder, - com.google.cloud.vertexai.api.SafetySettingOrBuilder> - safetySettingsBuilder_; - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getSafetySettingsList() { - if (safetySettingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(safetySettings_); - } else { - return safetySettingsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getSafetySettingsCount() { - if (safetySettingsBuilder_ == null) { - return safetySettings_.size(); - } else { - return safetySettingsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SafetySetting getSafetySettings(int index) { - if (safetySettingsBuilder_ == null) { - return safetySettings_.get(index); - } else { - return safetySettingsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSafetySettings(int index, com.google.cloud.vertexai.api.SafetySetting value) { - if (safetySettingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetySettingsIsMutable(); - safetySettings_.set(index, value); - onChanged(); - } else { - safetySettingsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSafetySettings( - int index, com.google.cloud.vertexai.api.SafetySetting.Builder builderForValue) { - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - safetySettings_.set(index, builderForValue.build()); - onChanged(); - } else { - safetySettingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addSafetySettings(com.google.cloud.vertexai.api.SafetySetting value) { - if (safetySettingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetySettingsIsMutable(); - safetySettings_.add(value); - onChanged(); - } else { - safetySettingsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addSafetySettings(int index, com.google.cloud.vertexai.api.SafetySetting value) { - if (safetySettingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetySettingsIsMutable(); - safetySettings_.add(index, value); - onChanged(); - } else { - safetySettingsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addSafetySettings( - com.google.cloud.vertexai.api.SafetySetting.Builder builderForValue) { - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - safetySettings_.add(builderForValue.build()); - onChanged(); - } else { - safetySettingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addSafetySettings( - int index, com.google.cloud.vertexai.api.SafetySetting.Builder builderForValue) { - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - safetySettings_.add(index, builderForValue.build()); - onChanged(); - } else { - safetySettingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllSafetySettings( - java.lang.Iterable values) { - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, safetySettings_); - onChanged(); - } else { - safetySettingsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSafetySettings() { - if (safetySettingsBuilder_ == null) { - safetySettings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - safetySettingsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeSafetySettings(int index) { - if (safetySettingsBuilder_ == null) { - ensureSafetySettingsIsMutable(); - safetySettings_.remove(index); - onChanged(); - } else { - safetySettingsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SafetySetting.Builder getSafetySettingsBuilder(int index) { - return internalGetSafetySettingsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SafetySettingOrBuilder getSafetySettingsOrBuilder( - int index) { - if (safetySettingsBuilder_ == null) { - return safetySettings_.get(index); - } else { - return safetySettingsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getSafetySettingsOrBuilderList() { - if (safetySettingsBuilder_ != null) { - return safetySettingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(safetySettings_); - } - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SafetySetting.Builder addSafetySettingsBuilder() { - return internalGetSafetySettingsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.SafetySetting.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SafetySetting.Builder addSafetySettingsBuilder(int index) { - return internalGetSafetySettingsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.SafetySetting.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Per request settings for blocking unsafe content.
-     * Enforced on GenerateContentResponse.candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getSafetySettingsBuilderList() { - return internalGetSafetySettingsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetySetting, - com.google.cloud.vertexai.api.SafetySetting.Builder, - com.google.cloud.vertexai.api.SafetySettingOrBuilder> - internalGetSafetySettingsFieldBuilder() { - if (safetySettingsBuilder_ == null) { - safetySettingsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetySetting, - com.google.cloud.vertexai.api.SafetySetting.Builder, - com.google.cloud.vertexai.api.SafetySettingOrBuilder>( - safetySettings_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - safetySettings_ = null; - } - return safetySettingsBuilder_; - } - - private com.google.cloud.vertexai.api.ModelArmorConfig modelArmorConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ModelArmorConfig, - com.google.cloud.vertexai.api.ModelArmorConfig.Builder, - com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder> - modelArmorConfigBuilder_; - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the modelArmorConfig field is set. - */ - public boolean hasModelArmorConfig() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The modelArmorConfig. - */ - public com.google.cloud.vertexai.api.ModelArmorConfig getModelArmorConfig() { - if (modelArmorConfigBuilder_ == null) { - return modelArmorConfig_ == null - ? com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance() - : modelArmorConfig_; - } else { - return modelArmorConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setModelArmorConfig(com.google.cloud.vertexai.api.ModelArmorConfig value) { - if (modelArmorConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelArmorConfig_ = value; - } else { - modelArmorConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setModelArmorConfig( - com.google.cloud.vertexai.api.ModelArmorConfig.Builder builderForValue) { - if (modelArmorConfigBuilder_ == null) { - modelArmorConfig_ = builderForValue.build(); - } else { - modelArmorConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeModelArmorConfig(com.google.cloud.vertexai.api.ModelArmorConfig value) { - if (modelArmorConfigBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && modelArmorConfig_ != null - && modelArmorConfig_ - != com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance()) { - getModelArmorConfigBuilder().mergeFrom(value); - } else { - modelArmorConfig_ = value; - } - } else { - modelArmorConfigBuilder_.mergeFrom(value); - } - if (modelArmorConfig_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearModelArmorConfig() { - bitField0_ = (bitField0_ & ~0x00000100); - modelArmorConfig_ = null; - if (modelArmorConfigBuilder_ != null) { - modelArmorConfigBuilder_.dispose(); - modelArmorConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ModelArmorConfig.Builder getModelArmorConfigBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetModelArmorConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder getModelArmorConfigOrBuilder() { - if (modelArmorConfigBuilder_ != null) { - return modelArmorConfigBuilder_.getMessageOrBuilder(); - } else { - return modelArmorConfig_ == null - ? com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance() - : modelArmorConfig_; - } - } - - /** - * - * - *
-     * Optional. Settings for prompt and response sanitization using the Model
-     * Armor service. If supplied, safety_settings must not be supplied.
-     * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ModelArmorConfig, - com.google.cloud.vertexai.api.ModelArmorConfig.Builder, - com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder> - internalGetModelArmorConfigFieldBuilder() { - if (modelArmorConfigBuilder_ == null) { - modelArmorConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ModelArmorConfig, - com.google.cloud.vertexai.api.ModelArmorConfig.Builder, - com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder>( - getModelArmorConfig(), getParentForChildren(), isClean()); - modelArmorConfig_ = null; - } - return modelArmorConfigBuilder_; - } - - private com.google.cloud.vertexai.api.GenerationConfig generationConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder> - generationConfigBuilder_; - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - public boolean hasGenerationConfig() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - public com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig() { - if (generationConfigBuilder_ == null) { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } else { - return generationConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenerationConfig(com.google.cloud.vertexai.api.GenerationConfig value) { - if (generationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - generationConfig_ = value; - } else { - generationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGenerationConfig( - com.google.cloud.vertexai.api.GenerationConfig.Builder builderForValue) { - if (generationConfigBuilder_ == null) { - generationConfig_ = builderForValue.build(); - } else { - generationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGenerationConfig(com.google.cloud.vertexai.api.GenerationConfig value) { - if (generationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && generationConfig_ != null - && generationConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance()) { - getGenerationConfigBuilder().mergeFrom(value); - } else { - generationConfig_ = value; - } - } else { - generationConfigBuilder_.mergeFrom(value); - } - if (generationConfig_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGenerationConfig() { - bitField0_ = (bitField0_ & ~0x00000200); - generationConfig_ = null; - if (generationConfigBuilder_ != null) { - generationConfigBuilder_.dispose(); - generationConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.Builder getGenerationConfigBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetGenerationConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder() { - if (generationConfigBuilder_ != null) { - return generationConfigBuilder_.getMessageOrBuilder(); - } else { - return generationConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance() - : generationConfig_; - } - } - - /** - * - * - *
-     * Optional. Generation config.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder> - internalGetGenerationConfigFieldBuilder() { - if (generationConfigBuilder_ == null) { - generationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig, - com.google.cloud.vertexai.api.GenerationConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfigOrBuilder>( - getGenerationConfig(), getParentForChildren(), isClean()); - generationConfig_ = null; - } - return generationConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerateContentRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerateContentRequest) - private static final com.google.cloud.vertexai.api.GenerateContentRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerateContentRequest(); - } - - public static com.google.cloud.vertexai.api.GenerateContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenerateContentRequest 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.vertexai.api.GenerateContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java deleted file mode 100644 index 2353efe6d335..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GenerateContentRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerateContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The fully qualified name of the publisher model or tuned model
-   * endpoint to use.
-   *
-   * Publisher model format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   *
-   * Tuned model endpoint format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Required. The fully qualified name of the publisher model or tuned model
-   * endpoint to use.
-   *
-   * Publisher model format:
-   * `projects/{project}/locations/{location}/publishers/*/models/*`
-   *
-   * Tuned model endpoint format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * string model = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getContentsList(); - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.Content getContents(int index); - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getContentsCount(); - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getContentsOrBuilderList(); - - /** - * - * - *
-   * Required. The content of the current conversation with the model.
-   *
-   * For single-turn queries, this is a single instance. For multi-turn queries,
-   * this is a repeated field that contains conversation history + latest
-   * request.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int index); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the systemInstruction field is set. - */ - boolean hasSystemInstruction(); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The systemInstruction. - */ - com.google.cloud.vertexai.api.Content getSystemInstruction(); - - /** - * - * - *
-   * Optional. The user provided system instructions for the model.
-   * Note: only text should be used in parts and content in each part will be in
-   * a separate paragraph.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ContentOrBuilder getSystemInstructionOrBuilder(); - - /** - * - * - *
-   * Optional. The name of the cached content used as context to serve the
-   * prediction. Note: only used in explicit caching, where users can have
-   * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-   * savings. Format:
-   * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-   * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The cachedContent. - */ - java.lang.String getCachedContent(); - - /** - * - * - *
-   * Optional. The name of the cached content used as context to serve the
-   * prediction. Note: only used in explicit caching, where users can have
-   * control over caching (e.g. what content to cache) and enjoy guaranteed cost
-   * savings. Format:
-   * `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
-   * 
- * - * - * string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for cachedContent. - */ - com.google.protobuf.ByteString getCachedContentBytes(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getToolsList(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tool getTools(int index); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getToolsCount(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getToolsOrBuilderList(); - - /** - * - * - *
-   * Optional. A list of `Tools` the model may use to generate the next
-   * response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the toolConfig field is set. - */ - boolean hasToolConfig(); - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The toolConfig. - */ - com.google.cloud.vertexai.api.ToolConfig getToolConfig(); - - /** - * - * - *
-   * Optional. Tool config. This config is shared for all tools provided in the
-   * request.
-   * 
- * - * - * .google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ToolConfigOrBuilder getToolConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - - /** - * - * - *
-   * Optional. The labels with user-defined metadata for the request. It is used
-   * for billing and reporting only.
-   *
-   * Label keys and values can be no longer than 63 characters
-   * (Unicode codepoints) and can only contain lowercase letters, numeric
-   * characters, underscores, and dashes. International characters are allowed.
-   * Label values are optional. Label keys must start with a letter.
-   * 
- * - * map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getSafetySettingsList(); - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SafetySetting getSafetySettings(int index); - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getSafetySettingsCount(); - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getSafetySettingsOrBuilderList(); - - /** - * - * - *
-   * Optional. Per request settings for blocking unsafe content.
-   * Enforced on GenerateContentResponse.candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SafetySettingOrBuilder getSafetySettingsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the modelArmorConfig field is set. - */ - boolean hasModelArmorConfig(); - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The modelArmorConfig. - */ - com.google.cloud.vertexai.api.ModelArmorConfig getModelArmorConfig(); - - /** - * - * - *
-   * Optional. Settings for prompt and response sanitization using the Model
-   * Armor service. If supplied, safety_settings must not be supplied.
-   * 
- * - * - * .google.cloud.vertexai.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder getModelArmorConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the generationConfig field is set. - */ - boolean hasGenerationConfig(); - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The generationConfig. - */ - com.google.cloud.vertexai.api.GenerationConfig getGenerationConfig(); - - /** - * - * - *
-   * Optional. Generation config.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GenerationConfigOrBuilder getGenerationConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java deleted file mode 100644 index 59a2516dbb31..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java +++ /dev/null @@ -1,6991 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for [PredictionService.GenerateContent].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse} - */ -@com.google.protobuf.Generated -public final class GenerateContentResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerateContentResponse) - GenerateContentResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GenerateContentResponse"); - } - - // Use GenerateContentResponse.newBuilder() to construct. - private GenerateContentResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GenerateContentResponse() { - candidates_ = java.util.Collections.emptyList(); - modelVersion_ = ""; - responseId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.class, - com.google.cloud.vertexai.api.GenerateContentResponse.Builder.class); - } - - public interface PromptFeedbackOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. Blocked reason.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for blockReason. - */ - int getBlockReasonValue(); - - /** - * - * - *
-     * Output only. Blocked reason.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The blockReason. - */ - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - getBlockReason(); - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getSafetyRatingsList(); - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index); - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getSafetyRatingsCount(); - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getSafetyRatingsOrBuilderList(); - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index); - - /** - * - * - *
-     * Output only. A readable block reason message.
-     * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blockReasonMessage. - */ - java.lang.String getBlockReasonMessage(); - - /** - * - * - *
-     * Output only. A readable block reason message.
-     * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for blockReasonMessage. - */ - com.google.protobuf.ByteString getBlockReasonMessageBytes(); - } - - /** - * - * - *
-   * Content filter results for a prompt sent in the request.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback} - */ - public static final class PromptFeedback extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback) - PromptFeedbackOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PromptFeedback"); - } - - // Use PromptFeedback.newBuilder() to construct. - private PromptFeedback(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PromptFeedback() { - blockReason_ = 0; - safetyRatings_ = java.util.Collections.emptyList(); - blockReasonMessage_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.class, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder.class); - } - - /** - * - * - *
-     * Blocked reason enumeration.
-     * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason} - */ - public enum BlockedReason implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Unspecified blocked reason.
-       * 
- * - * BLOCKED_REASON_UNSPECIFIED = 0; - */ - BLOCKED_REASON_UNSPECIFIED(0), - /** - * - * - *
-       * Candidates blocked due to safety.
-       * 
- * - * SAFETY = 1; - */ - SAFETY(1), - /** - * - * - *
-       * Candidates blocked due to other reason.
-       * 
- * - * OTHER = 2; - */ - OTHER(2), - /** - * - * - *
-       * Candidates blocked due to the terms which are included from the
-       * terminology blocklist.
-       * 
- * - * BLOCKLIST = 3; - */ - BLOCKLIST(3), - /** - * - * - *
-       * Candidates blocked due to prohibited content.
-       * 
- * - * PROHIBITED_CONTENT = 4; - */ - PROHIBITED_CONTENT(4), - /** - * - * - *
-       * The user prompt was blocked by Model Armor.
-       * 
- * - * MODEL_ARMOR = 5; - */ - MODEL_ARMOR(5), - /** - * - * - *
-       * The user prompt was blocked due to jailbreak.
-       * 
- * - * JAILBREAK = 6; - */ - JAILBREAK(6), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "BlockedReason"); - } - - /** - * - * - *
-       * Unspecified blocked reason.
-       * 
- * - * BLOCKED_REASON_UNSPECIFIED = 0; - */ - public static final int BLOCKED_REASON_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-       * Candidates blocked due to safety.
-       * 
- * - * SAFETY = 1; - */ - public static final int SAFETY_VALUE = 1; - - /** - * - * - *
-       * Candidates blocked due to other reason.
-       * 
- * - * OTHER = 2; - */ - public static final int OTHER_VALUE = 2; - - /** - * - * - *
-       * Candidates blocked due to the terms which are included from the
-       * terminology blocklist.
-       * 
- * - * BLOCKLIST = 3; - */ - public static final int BLOCKLIST_VALUE = 3; - - /** - * - * - *
-       * Candidates blocked due to prohibited content.
-       * 
- * - * PROHIBITED_CONTENT = 4; - */ - public static final int PROHIBITED_CONTENT_VALUE = 4; - - /** - * - * - *
-       * The user prompt was blocked by Model Armor.
-       * 
- * - * MODEL_ARMOR = 5; - */ - public static final int MODEL_ARMOR_VALUE = 5; - - /** - * - * - *
-       * The user prompt was blocked due to jailbreak.
-       * 
- * - * JAILBREAK = 6; - */ - public static final int JAILBREAK_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 BlockedReason 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 BlockedReason forNumber(int value) { - switch (value) { - case 0: - return BLOCKED_REASON_UNSPECIFIED; - case 1: - return SAFETY; - case 2: - return OTHER; - case 3: - return BLOCKLIST; - case 4: - return PROHIBITED_CONTENT; - case 5: - return MODEL_ARMOR; - case 6: - return JAILBREAK; - 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 BlockedReason findValueByNumber(int number) { - return BlockedReason.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final BlockedReason[] VALUES = values(); - - public static BlockedReason 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 BlockedReason(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason) - } - - public static final int BLOCK_REASON_FIELD_NUMBER = 1; - private int blockReason_ = 0; - - /** - * - * - *
-     * Output only. Blocked reason.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for blockReason. - */ - @java.lang.Override - public int getBlockReasonValue() { - return blockReason_; - } - - /** - * - * - *
-     * Output only. Blocked reason.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The blockReason. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - getBlockReason() { - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason result = - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .forNumber(blockReason_); - return result == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .UNRECOGNIZED - : result; - } - - public static final int SAFETY_RATINGS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List safetyRatings_; - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getSafetyRatingsList() { - return safetyRatings_; - } - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getSafetyRatingsOrBuilderList() { - return safetyRatings_; - } - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getSafetyRatingsCount() { - return safetyRatings_.size(); - } - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index) { - return safetyRatings_.get(index); - } - - /** - * - * - *
-     * Output only. Safety ratings.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( - int index) { - return safetyRatings_.get(index); - } - - public static final int BLOCK_REASON_MESSAGE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object blockReasonMessage_ = ""; - - /** - * - * - *
-     * Output only. A readable block reason message.
-     * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blockReasonMessage. - */ - @java.lang.Override - public java.lang.String getBlockReasonMessage() { - java.lang.Object ref = blockReasonMessage_; - 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(); - blockReasonMessage_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. A readable block reason message.
-     * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for blockReasonMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBlockReasonMessageBytes() { - java.lang.Object ref = blockReasonMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - blockReasonMessage_ = 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 (blockReason_ - != com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .BLOCKED_REASON_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, blockReason_); - } - for (int i = 0; i < safetyRatings_.size(); i++) { - output.writeMessage(2, safetyRatings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockReasonMessage_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, blockReasonMessage_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (blockReason_ - != com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .BLOCKED_REASON_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, blockReason_); - } - for (int i = 0; i < safetyRatings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, safetyRatings_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(blockReasonMessage_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, blockReasonMessage_); - } - 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.vertexai.api.GenerateContentResponse.PromptFeedback)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback other = - (com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback) obj; - - if (blockReason_ != other.blockReason_) return false; - if (!getSafetyRatingsList().equals(other.getSafetyRatingsList())) return false; - if (!getBlockReasonMessage().equals(other.getBlockReasonMessage())) 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) + BLOCK_REASON_FIELD_NUMBER; - hash = (53 * hash) + blockReason_; - if (getSafetyRatingsCount() > 0) { - hash = (37 * hash) + SAFETY_RATINGS_FIELD_NUMBER; - hash = (53 * hash) + getSafetyRatingsList().hashCode(); - } - hash = (37 * hash) + BLOCK_REASON_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getBlockReasonMessage().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback 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.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback 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.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerateContentResponse.PromptFeedback 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Content filter results for a prompt sent in the request.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback) - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.class, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - blockReason_ = 0; - if (safetyRatingsBuilder_ == null) { - safetyRatings_ = java.util.Collections.emptyList(); - } else { - safetyRatings_ = null; - safetyRatingsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - blockReasonMessage_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback build() { - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback buildPartial() { - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback result = - new com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback result) { - if (safetyRatingsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - safetyRatings_ = java.util.Collections.unmodifiableList(safetyRatings_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.safetyRatings_ = safetyRatings_; - } else { - result.safetyRatings_ = safetyRatingsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.blockReason_ = blockReason_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.blockReasonMessage_ = blockReasonMessage_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback) { - return mergeFrom( - (com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback other) { - if (other - == com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - .getDefaultInstance()) return this; - if (other.blockReason_ != 0) { - setBlockReasonValue(other.getBlockReasonValue()); - } - if (safetyRatingsBuilder_ == null) { - if (!other.safetyRatings_.isEmpty()) { - if (safetyRatings_.isEmpty()) { - safetyRatings_ = other.safetyRatings_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSafetyRatingsIsMutable(); - safetyRatings_.addAll(other.safetyRatings_); - } - onChanged(); - } - } else { - if (!other.safetyRatings_.isEmpty()) { - if (safetyRatingsBuilder_.isEmpty()) { - safetyRatingsBuilder_.dispose(); - safetyRatingsBuilder_ = null; - safetyRatings_ = other.safetyRatings_; - bitField0_ = (bitField0_ & ~0x00000002); - safetyRatingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSafetyRatingsFieldBuilder() - : null; - } else { - safetyRatingsBuilder_.addAllMessages(other.safetyRatings_); - } - } - } - if (!other.getBlockReasonMessage().isEmpty()) { - blockReasonMessage_ = other.blockReasonMessage_; - 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 8: - { - blockReason_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - com.google.cloud.vertexai.api.SafetyRating m = - input.readMessage( - com.google.cloud.vertexai.api.SafetyRating.parser(), extensionRegistry); - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(m); - } else { - safetyRatingsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - blockReasonMessage_ = 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 int blockReason_ = 0; - - /** - * - * - *
-       * Output only. Blocked reason.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for blockReason. - */ - @java.lang.Override - public int getBlockReasonValue() { - return blockReason_; - } - - /** - * - * - *
-       * Output only. Blocked reason.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for blockReason to set. - * @return This builder for chaining. - */ - public Builder setBlockReasonValue(int value) { - blockReason_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Blocked reason.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The blockReason. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - getBlockReason() { - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason result = - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .forNumber(blockReason_); - return result == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - .UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * Output only. Blocked reason.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The blockReason to set. - * @return This builder for chaining. - */ - public Builder setBlockReason( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.BlockedReason - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - blockReason_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Blocked reason.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearBlockReason() { - bitField0_ = (bitField0_ & ~0x00000001); - blockReason_ = 0; - onChanged(); - return this; - } - - private java.util.List safetyRatings_ = - java.util.Collections.emptyList(); - - private void ensureSafetyRatingsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - safetyRatings_ = - new java.util.ArrayList(safetyRatings_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder> - safetyRatingsBuilder_; - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getSafetyRatingsList() { - if (safetyRatingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(safetyRatings_); - } else { - return safetyRatingsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getSafetyRatingsCount() { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.size(); - } else { - return safetyRatingsBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating getSafetyRatings(int index) { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.get(index); - } else { - return safetyRatingsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setSafetyRatings(int index, com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.set(index, value); - onChanged(); - } else { - safetyRatingsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setSafetyRatings( - int index, com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.set(index, builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings(com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(value); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings(int index, com.google.cloud.vertexai.api.SafetyRating value) { - if (safetyRatingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(index, value); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings( - com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addSafetyRatings( - int index, com.google.cloud.vertexai.api.SafetyRating.Builder builderForValue) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.add(index, builderForValue.build()); - onChanged(); - } else { - safetyRatingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllSafetyRatings( - java.lang.Iterable values) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, safetyRatings_); - onChanged(); - } else { - safetyRatingsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearSafetyRatings() { - if (safetyRatingsBuilder_ == null) { - safetyRatings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - safetyRatingsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeSafetyRatings(int index) { - if (safetyRatingsBuilder_ == null) { - ensureSafetyRatingsIsMutable(); - safetyRatings_.remove(index); - onChanged(); - } else { - safetyRatingsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder getSafetyRatingsBuilder(int index) { - return internalGetSafetyRatingsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( - int index) { - if (safetyRatingsBuilder_ == null) { - return safetyRatings_.get(index); - } else { - return safetyRatingsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getSafetyRatingsOrBuilderList() { - if (safetyRatingsBuilder_ != null) { - return safetyRatingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(safetyRatings_); - } - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder addSafetyRatingsBuilder() { - return internalGetSafetyRatingsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.SafetyRating.Builder addSafetyRatingsBuilder(int index) { - return internalGetSafetyRatingsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. Safety ratings.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getSafetyRatingsBuilderList() { - return internalGetSafetyRatingsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder> - internalGetSafetyRatingsFieldBuilder() { - if (safetyRatingsBuilder_ == null) { - safetyRatingsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SafetyRating, - com.google.cloud.vertexai.api.SafetyRating.Builder, - com.google.cloud.vertexai.api.SafetyRatingOrBuilder>( - safetyRatings_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - safetyRatings_ = null; - } - return safetyRatingsBuilder_; - } - - private java.lang.Object blockReasonMessage_ = ""; - - /** - * - * - *
-       * Output only. A readable block reason message.
-       * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blockReasonMessage. - */ - public java.lang.String getBlockReasonMessage() { - java.lang.Object ref = blockReasonMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockReasonMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. A readable block reason message.
-       * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for blockReasonMessage. - */ - public com.google.protobuf.ByteString getBlockReasonMessageBytes() { - java.lang.Object ref = blockReasonMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - blockReasonMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. A readable block reason message.
-       * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The blockReasonMessage to set. - * @return This builder for chaining. - */ - public Builder setBlockReasonMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - blockReasonMessage_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. A readable block reason message.
-       * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearBlockReasonMessage() { - blockReasonMessage_ = getDefaultInstance().getBlockReasonMessage(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. A readable block reason message.
-       * 
- * - * string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for blockReasonMessage to set. - * @return This builder for chaining. - */ - public Builder setBlockReasonMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - blockReasonMessage_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback) - private static final com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback(); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PromptFeedback 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.vertexai.api.GenerateContentResponse.PromptFeedback - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UsageMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Number of tokens in the request. When `cached_content` is set, this is
-     * still the total effective prompt size meaning this includes the number of
-     * tokens in the cached content.
-     * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - int getPromptTokenCount(); - - /** - * - * - *
-     * Number of tokens in the response(s).
-     * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - int getCandidatesTokenCount(); - - /** - * - * - *
-     * Output only. Number of tokens present in thoughts output.
-     * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - int getThoughtsTokenCount(); - - /** - * - * - *
-     * Total token count for prompt and response candidates.
-     * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - int getTotalTokenCount(); - - /** - * - * - *
-     * Output only. Number of tokens in the cached part in the input (the cached
-     * content).
-     * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The cachedContentTokenCount. - */ - int getCachedContentTokenCount(); - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPromptTokensDetailsList(); - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index); - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPromptTokensDetailsCount(); - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getPromptTokensDetailsOrBuilderList(); - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getCacheTokensDetailsList(); - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index); - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCacheTokensDetailsCount(); - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCacheTokensDetailsOrBuilderList(); - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCandidatesTokensDetailsList(); - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails(int index); - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCandidatesTokensDetailsCount(); - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCandidatesTokensDetailsOrBuilderList(); - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCandidatesTokensDetailsOrBuilder( - int index); - } - - /** - * - * - *
-   * Usage metadata about response(s).
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata} - */ - public static final class UsageMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata) - UsageMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UsageMetadata"); - } - - // Use UsageMetadata.newBuilder() to construct. - private UsageMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UsageMetadata() { - promptTokensDetails_ = java.util.Collections.emptyList(); - cacheTokensDetails_ = java.util.Collections.emptyList(); - candidatesTokensDetails_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.class, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder.class); - } - - public static final int PROMPT_TOKEN_COUNT_FIELD_NUMBER = 1; - private int promptTokenCount_ = 0; - - /** - * - * - *
-     * Number of tokens in the request. When `cached_content` is set, this is
-     * still the total effective prompt size meaning this includes the number of
-     * tokens in the cached content.
-     * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - @java.lang.Override - public int getPromptTokenCount() { - return promptTokenCount_; - } - - public static final int CANDIDATES_TOKEN_COUNT_FIELD_NUMBER = 2; - private int candidatesTokenCount_ = 0; - - /** - * - * - *
-     * Number of tokens in the response(s).
-     * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - @java.lang.Override - public int getCandidatesTokenCount() { - return candidatesTokenCount_; - } - - public static final int THOUGHTS_TOKEN_COUNT_FIELD_NUMBER = 14; - private int thoughtsTokenCount_ = 0; - - /** - * - * - *
-     * Output only. Number of tokens present in thoughts output.
-     * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - @java.lang.Override - public int getThoughtsTokenCount() { - return thoughtsTokenCount_; - } - - public static final int TOTAL_TOKEN_COUNT_FIELD_NUMBER = 3; - private int totalTokenCount_ = 0; - - /** - * - * - *
-     * Total token count for prompt and response candidates.
-     * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - public static final int CACHED_CONTENT_TOKEN_COUNT_FIELD_NUMBER = 5; - private int cachedContentTokenCount_ = 0; - - /** - * - * - *
-     * Output only. Number of tokens in the cached part in the input (the cached
-     * content).
-     * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The cachedContentTokenCount. - */ - @java.lang.Override - public int getCachedContentTokenCount() { - return cachedContentTokenCount_; - } - - public static final int PROMPT_TOKENS_DETAILS_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private java.util.List promptTokensDetails_; - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsList() { - return promptTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsOrBuilderList() { - return promptTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getPromptTokensDetailsCount() { - return promptTokensDetails_.size(); - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - return promptTokensDetails_.get(index); - } - - /** - * - * - *
-     * Output only. List of modalities that were processed in the request input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getPromptTokensDetailsOrBuilder(int index) { - return promptTokensDetails_.get(index); - } - - public static final int CACHE_TOKENS_DETAILS_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private java.util.List cacheTokensDetails_; - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCacheTokensDetailsList() { - return cacheTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCacheTokensDetailsOrBuilderList() { - return cacheTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCacheTokensDetailsCount() { - return cacheTokensDetails_.size(); - } - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index) { - return cacheTokensDetails_.get(index); - } - - /** - * - * - *
-     * Output only. List of modalities of the cached content in the request
-     * input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder( - int index) { - return cacheTokensDetails_.get(index); - } - - public static final int CANDIDATES_TOKENS_DETAILS_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private java.util.List - candidatesTokensDetails_; - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCandidatesTokensDetailsList() { - return candidatesTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCandidatesTokensDetailsOrBuilderList() { - return candidatesTokensDetails_; - } - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCandidatesTokensDetailsCount() { - return candidatesTokensDetails_.size(); - } - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails(int index) { - return candidatesTokensDetails_.get(index); - } - - /** - * - * - *
-     * Output only. List of modalities that were returned in the response.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getCandidatesTokensDetailsOrBuilder(int index) { - return candidatesTokensDetails_.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 (promptTokenCount_ != 0) { - output.writeInt32(1, promptTokenCount_); - } - if (candidatesTokenCount_ != 0) { - output.writeInt32(2, candidatesTokenCount_); - } - if (totalTokenCount_ != 0) { - output.writeInt32(3, totalTokenCount_); - } - if (cachedContentTokenCount_ != 0) { - output.writeInt32(5, cachedContentTokenCount_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - output.writeMessage(9, promptTokensDetails_.get(i)); - } - for (int i = 0; i < cacheTokensDetails_.size(); i++) { - output.writeMessage(10, cacheTokensDetails_.get(i)); - } - for (int i = 0; i < candidatesTokensDetails_.size(); i++) { - output.writeMessage(11, candidatesTokensDetails_.get(i)); - } - if (thoughtsTokenCount_ != 0) { - output.writeInt32(14, thoughtsTokenCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (promptTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, promptTokenCount_); - } - if (candidatesTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, candidatesTokenCount_); - } - if (totalTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalTokenCount_); - } - if (cachedContentTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, cachedContentTokenCount_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, promptTokensDetails_.get(i)); - } - for (int i = 0; i < cacheTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, cacheTokensDetails_.get(i)); - } - for (int i = 0; i < candidatesTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, candidatesTokensDetails_.get(i)); - } - if (thoughtsTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, thoughtsTokenCount_); - } - 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.vertexai.api.GenerateContentResponse.UsageMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata other = - (com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata) obj; - - if (getPromptTokenCount() != other.getPromptTokenCount()) return false; - if (getCandidatesTokenCount() != other.getCandidatesTokenCount()) return false; - if (getThoughtsTokenCount() != other.getThoughtsTokenCount()) return false; - if (getTotalTokenCount() != other.getTotalTokenCount()) return false; - if (getCachedContentTokenCount() != other.getCachedContentTokenCount()) return false; - if (!getPromptTokensDetailsList().equals(other.getPromptTokensDetailsList())) return false; - if (!getCacheTokensDetailsList().equals(other.getCacheTokensDetailsList())) return false; - if (!getCandidatesTokensDetailsList().equals(other.getCandidatesTokensDetailsList())) - 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) + PROMPT_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getPromptTokenCount(); - hash = (37 * hash) + CANDIDATES_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesTokenCount(); - hash = (37 * hash) + THOUGHTS_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getThoughtsTokenCount(); - hash = (37 * hash) + TOTAL_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getTotalTokenCount(); - hash = (37 * hash) + CACHED_CONTENT_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCachedContentTokenCount(); - if (getPromptTokensDetailsCount() > 0) { - hash = (37 * hash) + PROMPT_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getPromptTokensDetailsList().hashCode(); - } - if (getCacheTokensDetailsCount() > 0) { - hash = (37 * hash) + CACHE_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getCacheTokensDetailsList().hashCode(); - } - if (getCandidatesTokensDetailsCount() > 0) { - hash = (37 * hash) + CANDIDATES_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesTokensDetailsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata 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.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata 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.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerateContentResponse.UsageMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Usage metadata about response(s).
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata) - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.class, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - promptTokenCount_ = 0; - candidatesTokenCount_ = 0; - thoughtsTokenCount_ = 0; - totalTokenCount_ = 0; - cachedContentTokenCount_ = 0; - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - } else { - promptTokensDetails_ = null; - promptTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetails_ = java.util.Collections.emptyList(); - } else { - cacheTokensDetails_ = null; - cacheTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetails_ = java.util.Collections.emptyList(); - } else { - candidatesTokensDetails_ = null; - candidatesTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata build() { - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata buildPartial() { - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata result = - new com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata result) { - if (promptTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - promptTokensDetails_ = java.util.Collections.unmodifiableList(promptTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.promptTokensDetails_ = promptTokensDetails_; - } else { - result.promptTokensDetails_ = promptTokensDetailsBuilder_.build(); - } - if (cacheTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - cacheTokensDetails_ = java.util.Collections.unmodifiableList(cacheTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.cacheTokensDetails_ = cacheTokensDetails_; - } else { - result.cacheTokensDetails_ = cacheTokensDetailsBuilder_.build(); - } - if (candidatesTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - candidatesTokensDetails_ = - java.util.Collections.unmodifiableList(candidatesTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.candidatesTokensDetails_ = candidatesTokensDetails_; - } else { - result.candidatesTokensDetails_ = candidatesTokensDetailsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.promptTokenCount_ = promptTokenCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.candidatesTokenCount_ = candidatesTokenCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.thoughtsTokenCount_ = thoughtsTokenCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.totalTokenCount_ = totalTokenCount_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.cachedContentTokenCount_ = cachedContentTokenCount_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata) { - return mergeFrom( - (com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata other) { - if (other - == com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - .getDefaultInstance()) return this; - if (other.getPromptTokenCount() != 0) { - setPromptTokenCount(other.getPromptTokenCount()); - } - if (other.getCandidatesTokenCount() != 0) { - setCandidatesTokenCount(other.getCandidatesTokenCount()); - } - if (other.getThoughtsTokenCount() != 0) { - setThoughtsTokenCount(other.getThoughtsTokenCount()); - } - if (other.getTotalTokenCount() != 0) { - setTotalTokenCount(other.getTotalTokenCount()); - } - if (other.getCachedContentTokenCount() != 0) { - setCachedContentTokenCount(other.getCachedContentTokenCount()); - } - if (promptTokensDetailsBuilder_ == null) { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetails_.isEmpty()) { - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.addAll(other.promptTokensDetails_); - } - onChanged(); - } - } else { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetailsBuilder_.isEmpty()) { - promptTokensDetailsBuilder_.dispose(); - promptTokensDetailsBuilder_ = null; - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000020); - promptTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPromptTokensDetailsFieldBuilder() - : null; - } else { - promptTokensDetailsBuilder_.addAllMessages(other.promptTokensDetails_); - } - } - } - if (cacheTokensDetailsBuilder_ == null) { - if (!other.cacheTokensDetails_.isEmpty()) { - if (cacheTokensDetails_.isEmpty()) { - cacheTokensDetails_ = other.cacheTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.addAll(other.cacheTokensDetails_); - } - onChanged(); - } - } else { - if (!other.cacheTokensDetails_.isEmpty()) { - if (cacheTokensDetailsBuilder_.isEmpty()) { - cacheTokensDetailsBuilder_.dispose(); - cacheTokensDetailsBuilder_ = null; - cacheTokensDetails_ = other.cacheTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000040); - cacheTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCacheTokensDetailsFieldBuilder() - : null; - } else { - cacheTokensDetailsBuilder_.addAllMessages(other.cacheTokensDetails_); - } - } - } - if (candidatesTokensDetailsBuilder_ == null) { - if (!other.candidatesTokensDetails_.isEmpty()) { - if (candidatesTokensDetails_.isEmpty()) { - candidatesTokensDetails_ = other.candidatesTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.addAll(other.candidatesTokensDetails_); - } - onChanged(); - } - } else { - if (!other.candidatesTokensDetails_.isEmpty()) { - if (candidatesTokensDetailsBuilder_.isEmpty()) { - candidatesTokensDetailsBuilder_.dispose(); - candidatesTokensDetailsBuilder_ = null; - candidatesTokensDetails_ = other.candidatesTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000080); - candidatesTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCandidatesTokensDetailsFieldBuilder() - : null; - } else { - candidatesTokensDetailsBuilder_.addAllMessages(other.candidatesTokensDetails_); - } - } - } - 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: - { - promptTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - candidatesTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - totalTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 24 - case 40: - { - cachedContentTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 74: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(m); - } else { - promptTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 74 - case 82: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(m); - } else { - cacheTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(m); - } else { - candidatesTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 90 - case 112: - { - thoughtsTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 112 - 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 promptTokenCount_; - - /** - * - * - *
-       * Number of tokens in the request. When `cached_content` is set, this is
-       * still the total effective prompt size meaning this includes the number of
-       * tokens in the cached content.
-       * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - @java.lang.Override - public int getPromptTokenCount() { - return promptTokenCount_; - } - - /** - * - * - *
-       * Number of tokens in the request. When `cached_content` is set, this is
-       * still the total effective prompt size meaning this includes the number of
-       * tokens in the cached content.
-       * 
- * - * int32 prompt_token_count = 1; - * - * @param value The promptTokenCount to set. - * @return This builder for chaining. - */ - public Builder setPromptTokenCount(int value) { - - promptTokenCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Number of tokens in the request. When `cached_content` is set, this is
-       * still the total effective prompt size meaning this includes the number of
-       * tokens in the cached content.
-       * 
- * - * int32 prompt_token_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearPromptTokenCount() { - bitField0_ = (bitField0_ & ~0x00000001); - promptTokenCount_ = 0; - onChanged(); - return this; - } - - private int candidatesTokenCount_; - - /** - * - * - *
-       * Number of tokens in the response(s).
-       * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - @java.lang.Override - public int getCandidatesTokenCount() { - return candidatesTokenCount_; - } - - /** - * - * - *
-       * Number of tokens in the response(s).
-       * 
- * - * int32 candidates_token_count = 2; - * - * @param value The candidatesTokenCount to set. - * @return This builder for chaining. - */ - public Builder setCandidatesTokenCount(int value) { - - candidatesTokenCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Number of tokens in the response(s).
-       * 
- * - * int32 candidates_token_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearCandidatesTokenCount() { - bitField0_ = (bitField0_ & ~0x00000002); - candidatesTokenCount_ = 0; - onChanged(); - return this; - } - - private int thoughtsTokenCount_; - - /** - * - * - *
-       * Output only. Number of tokens present in thoughts output.
-       * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - @java.lang.Override - public int getThoughtsTokenCount() { - return thoughtsTokenCount_; - } - - /** - * - * - *
-       * Output only. Number of tokens present in thoughts output.
-       * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The thoughtsTokenCount to set. - * @return This builder for chaining. - */ - public Builder setThoughtsTokenCount(int value) { - - thoughtsTokenCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Number of tokens present in thoughts output.
-       * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearThoughtsTokenCount() { - bitField0_ = (bitField0_ & ~0x00000004); - thoughtsTokenCount_ = 0; - onChanged(); - return this; - } - - private int totalTokenCount_; - - /** - * - * - *
-       * Total token count for prompt and response candidates.
-       * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - /** - * - * - *
-       * Total token count for prompt and response candidates.
-       * 
- * - * int32 total_token_count = 3; - * - * @param value The totalTokenCount to set. - * @return This builder for chaining. - */ - public Builder setTotalTokenCount(int value) { - - totalTokenCount_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * Total token count for prompt and response candidates.
-       * 
- * - * int32 total_token_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearTotalTokenCount() { - bitField0_ = (bitField0_ & ~0x00000008); - totalTokenCount_ = 0; - onChanged(); - return this; - } - - private int cachedContentTokenCount_; - - /** - * - * - *
-       * Output only. Number of tokens in the cached part in the input (the cached
-       * content).
-       * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The cachedContentTokenCount. - */ - @java.lang.Override - public int getCachedContentTokenCount() { - return cachedContentTokenCount_; - } - - /** - * - * - *
-       * Output only. Number of tokens in the cached part in the input (the cached
-       * content).
-       * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The cachedContentTokenCount to set. - * @return This builder for chaining. - */ - public Builder setCachedContentTokenCount(int value) { - - cachedContentTokenCount_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Number of tokens in the cached part in the input (the cached
-       * content).
-       * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearCachedContentTokenCount() { - bitField0_ = (bitField0_ & ~0x00000010); - cachedContentTokenCount_ = 0; - onChanged(); - return this; - } - - private java.util.List - promptTokensDetails_ = java.util.Collections.emptyList(); - - private void ensurePromptTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - promptTokensDetails_ = - new java.util.ArrayList( - promptTokensDetails_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - promptTokensDetailsBuilder_; - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsList() { - if (promptTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } else { - return promptTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getPromptTokensDetailsCount() { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.size(); - } else { - return promptTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllPromptTokensDetails( - java.lang.Iterable values) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTokensDetails_); - onChanged(); - } else { - promptTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPromptTokensDetails() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - promptTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removePromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.remove(index); - onChanged(); - } else { - promptTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder getPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getPromptTokensDetailsOrBuilder(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsOrBuilderList() { - if (promptTokensDetailsBuilder_ != null) { - return promptTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addPromptTokensDetailsBuilder() { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities that were processed in the request input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsBuilderList() { - return internalGetPromptTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetPromptTokensDetailsFieldBuilder() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - promptTokensDetails_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - promptTokensDetails_ = null; - } - return promptTokensDetailsBuilder_; - } - - private java.util.List cacheTokensDetails_ = - java.util.Collections.emptyList(); - - private void ensureCacheTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - cacheTokensDetails_ = - new java.util.ArrayList( - cacheTokensDetails_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - cacheTokensDetailsBuilder_; - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsList() { - if (cacheTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cacheTokensDetails_); - } else { - return cacheTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCacheTokensDetailsCount() { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.size(); - } else { - return cacheTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index) { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.get(index); - } else { - return cacheTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.set(index, value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails(com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(index, value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCacheTokensDetails( - java.lang.Iterable values) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cacheTokensDetails_); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCacheTokensDetails() { - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - cacheTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCacheTokensDetails(int index) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.remove(index); - onChanged(); - } else { - cacheTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder getCacheTokensDetailsBuilder( - int index) { - return internalGetCacheTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getCacheTokensDetailsOrBuilder(int index) { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.get(index); - } else { - return cacheTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsOrBuilderList() { - if (cacheTokensDetailsBuilder_ != null) { - return cacheTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cacheTokensDetails_); - } - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addCacheTokensDetailsBuilder() { - return internalGetCacheTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addCacheTokensDetailsBuilder( - int index) { - return internalGetCacheTokensDetailsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities of the cached content in the request
-       * input.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsBuilderList() { - return internalGetCacheTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetCacheTokensDetailsFieldBuilder() { - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - cacheTokensDetails_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - cacheTokensDetails_ = null; - } - return cacheTokensDetailsBuilder_; - } - - private java.util.List - candidatesTokensDetails_ = java.util.Collections.emptyList(); - - private void ensureCandidatesTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - candidatesTokensDetails_ = - new java.util.ArrayList( - candidatesTokensDetails_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - candidatesTokensDetailsBuilder_; - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsList() { - if (candidatesTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(candidatesTokensDetails_); - } else { - return candidatesTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCandidatesTokensDetailsCount() { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.size(); - } else { - return candidatesTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails( - int index) { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.get(index); - } else { - return candidatesTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.set(index, value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(index, value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCandidatesTokensDetails( - java.lang.Iterable values) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, candidatesTokensDetails_); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCandidatesTokensDetails() { - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCandidatesTokensDetails(int index) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.remove(index); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - getCandidatesTokensDetailsBuilder(int index) { - return internalGetCandidatesTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getCandidatesTokensDetailsOrBuilder(int index) { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.get(index); - } else { - return candidatesTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsOrBuilderList() { - if (candidatesTokensDetailsBuilder_ != null) { - return candidatesTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(candidatesTokensDetails_); - } - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addCandidatesTokensDetailsBuilder() { - return internalGetCandidatesTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addCandidatesTokensDetailsBuilder(int index) { - return internalGetCandidatesTokensDetailsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-       * Output only. List of modalities that were returned in the response.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsBuilderList() { - return internalGetCandidatesTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetCandidatesTokensDetailsFieldBuilder() { - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - candidatesTokensDetails_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - candidatesTokensDetails_ = null; - } - return candidatesTokensDetailsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata) - private static final com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata(); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UsageMetadata 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.vertexai.api.GenerateContentResponse.UsageMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int CANDIDATES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List candidates_; - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getCandidatesList() { - return candidates_; - } - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCandidatesOrBuilderList() { - return candidates_; - } - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCandidatesCount() { - return candidates_.size(); - } - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Candidate getCandidates(int index) { - return candidates_.get(index); - } - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CandidateOrBuilder getCandidatesOrBuilder(int index) { - return candidates_.get(index); - } - - public static final int MODEL_VERSION_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelVersion_ = ""; - - /** - * - * - *
-   * Output only. The model version used to generate the response.
-   * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersion. - */ - @java.lang.Override - public java.lang.String getModelVersion() { - java.lang.Object ref = modelVersion_; - 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(); - modelVersion_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The model version used to generate the response.
-   * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelVersionBytes() { - java.lang.Object ref = modelVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 12; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.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 RESPONSE_ID_FIELD_NUMBER = 13; - - @SuppressWarnings("serial") - private volatile java.lang.Object responseId_ = ""; - - /** - * - * - *
-   * Output only. response_id is used to identify each response. It is the
-   * encoding of the event_id.
-   * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The responseId. - */ - @java.lang.Override - public java.lang.String getResponseId() { - java.lang.Object ref = responseId_; - 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(); - responseId_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. response_id is used to identify each response. It is the
-   * encoding of the event_id.
-   * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for responseId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResponseIdBytes() { - java.lang.Object ref = responseId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROMPT_FEEDBACK_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback promptFeedback_; - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the promptFeedback field is set. - */ - @java.lang.Override - public boolean hasPromptFeedback() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The promptFeedback. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback getPromptFeedback() { - return promptFeedback_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.getDefaultInstance() - : promptFeedback_; - } - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder - getPromptFeedbackOrBuilder() { - return promptFeedback_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.getDefaultInstance() - : promptFeedback_; - } - - public static final int USAGE_METADATA_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata usageMetadata_; - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return Whether the usageMetadata field is set. - */ - @java.lang.Override - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return The usageMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata getUsageMetadata() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder - getUsageMetadataOrBuilder() { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.getDefaultInstance() - : usageMetadata_; - } - - 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 < candidates_.size(); i++) { - output.writeMessage(2, candidates_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getPromptFeedback()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getUsageMetadata()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersion_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 11, modelVersion_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(12, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 13, responseId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < candidates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, candidates_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPromptFeedback()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUsageMetadata()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersion_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(11, modelVersion_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(13, responseId_); - } - 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.vertexai.api.GenerateContentResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerateContentResponse other = - (com.google.cloud.vertexai.api.GenerateContentResponse) obj; - - if (!getCandidatesList().equals(other.getCandidatesList())) return false; - if (!getModelVersion().equals(other.getModelVersion())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (!getResponseId().equals(other.getResponseId())) return false; - if (hasPromptFeedback() != other.hasPromptFeedback()) return false; - if (hasPromptFeedback()) { - if (!getPromptFeedback().equals(other.getPromptFeedback())) return false; - } - if (hasUsageMetadata() != other.hasUsageMetadata()) return false; - if (hasUsageMetadata()) { - if (!getUsageMetadata().equals(other.getUsageMetadata())) 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 (getCandidatesCount() > 0) { - hash = (37 * hash) + CANDIDATES_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesList().hashCode(); - } - hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getModelVersion().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + RESPONSE_ID_FIELD_NUMBER; - hash = (53 * hash) + getResponseId().hashCode(); - if (hasPromptFeedback()) { - hash = (37 * hash) + PROMPT_FEEDBACK_FIELD_NUMBER; - hash = (53 * hash) + getPromptFeedback().hashCode(); - } - if (hasUsageMetadata()) { - hash = (37 * hash) + USAGE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUsageMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse 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.vertexai.api.GenerateContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse 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.vertexai.api.GenerateContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerateContentResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for [PredictionService.GenerateContent].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerateContentResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerateContentResponse) - com.google.cloud.vertexai.api.GenerateContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerateContentResponse.class, - com.google.cloud.vertexai.api.GenerateContentResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenerateContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCandidatesFieldBuilder(); - internalGetCreateTimeFieldBuilder(); - internalGetPromptFeedbackFieldBuilder(); - internalGetUsageMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (candidatesBuilder_ == null) { - candidates_ = java.util.Collections.emptyList(); - } else { - candidates_ = null; - candidatesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - modelVersion_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - responseId_ = ""; - promptFeedback_ = null; - if (promptFeedbackBuilder_ != null) { - promptFeedbackBuilder_.dispose(); - promptFeedbackBuilder_ = null; - } - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerateContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse build() { - com.google.cloud.vertexai.api.GenerateContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerateContentResponse buildPartial() { - com.google.cloud.vertexai.api.GenerateContentResponse result = - new com.google.cloud.vertexai.api.GenerateContentResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GenerateContentResponse result) { - if (candidatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - candidates_ = java.util.Collections.unmodifiableList(candidates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.candidates_ = candidates_; - } else { - result.candidates_ = candidatesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.GenerateContentResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.modelVersion_ = modelVersion_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.responseId_ = responseId_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.promptFeedback_ = - promptFeedbackBuilder_ == null ? promptFeedback_ : promptFeedbackBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.usageMetadata_ = - usageMetadataBuilder_ == null ? usageMetadata_ : usageMetadataBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerateContentResponse) { - return mergeFrom((com.google.cloud.vertexai.api.GenerateContentResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenerateContentResponse other) { - if (other == com.google.cloud.vertexai.api.GenerateContentResponse.getDefaultInstance()) - return this; - if (candidatesBuilder_ == null) { - if (!other.candidates_.isEmpty()) { - if (candidates_.isEmpty()) { - candidates_ = other.candidates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCandidatesIsMutable(); - candidates_.addAll(other.candidates_); - } - onChanged(); - } - } else { - if (!other.candidates_.isEmpty()) { - if (candidatesBuilder_.isEmpty()) { - candidatesBuilder_.dispose(); - candidatesBuilder_ = null; - candidates_ = other.candidates_; - bitField0_ = (bitField0_ & ~0x00000001); - candidatesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCandidatesFieldBuilder() - : null; - } else { - candidatesBuilder_.addAllMessages(other.candidates_); - } - } - } - if (!other.getModelVersion().isEmpty()) { - modelVersion_ = other.modelVersion_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (!other.getResponseId().isEmpty()) { - responseId_ = other.responseId_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasPromptFeedback()) { - mergePromptFeedback(other.getPromptFeedback()); - } - if (other.hasUsageMetadata()) { - mergeUsageMetadata(other.getUsageMetadata()); - } - 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: - { - com.google.cloud.vertexai.api.Candidate m = - input.readMessage( - com.google.cloud.vertexai.api.Candidate.parser(), extensionRegistry); - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(m); - } else { - candidatesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetPromptFeedbackFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetUsageMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 34 - case 90: - { - modelVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 90 - case 98: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 98 - case 106: - { - responseId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 106 - 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 candidates_ = - java.util.Collections.emptyList(); - - private void ensureCandidatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - candidates_ = new java.util.ArrayList(candidates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Candidate, - com.google.cloud.vertexai.api.Candidate.Builder, - com.google.cloud.vertexai.api.CandidateOrBuilder> - candidatesBuilder_; - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getCandidatesList() { - if (candidatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(candidates_); - } else { - return candidatesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCandidatesCount() { - if (candidatesBuilder_ == null) { - return candidates_.size(); - } else { - return candidatesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Candidate getCandidates(int index) { - if (candidatesBuilder_ == null) { - return candidates_.get(index); - } else { - return candidatesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidates(int index, com.google.cloud.vertexai.api.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.set(index, value); - onChanged(); - } else { - candidatesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidates( - int index, com.google.cloud.vertexai.api.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.set(index, builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidates(com.google.cloud.vertexai.api.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.add(value); - onChanged(); - } else { - candidatesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidates(int index, com.google.cloud.vertexai.api.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.add(index, value); - onChanged(); - } else { - candidatesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidates(com.google.cloud.vertexai.api.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidates( - int index, com.google.cloud.vertexai.api.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(index, builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCandidates( - java.lang.Iterable values) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, candidates_); - onChanged(); - } else { - candidatesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCandidates() { - if (candidatesBuilder_ == null) { - candidates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - candidatesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCandidates(int index) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.remove(index); - onChanged(); - } else { - candidatesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Candidate.Builder getCandidatesBuilder(int index) { - return internalGetCandidatesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CandidateOrBuilder getCandidatesOrBuilder(int index) { - if (candidatesBuilder_ == null) { - return candidates_.get(index); - } else { - return candidatesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesOrBuilderList() { - if (candidatesBuilder_ != null) { - return candidatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(candidates_); - } - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Candidate.Builder addCandidatesBuilder() { - return internalGetCandidatesFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Candidate.Builder addCandidatesBuilder(int index) { - return internalGetCandidatesFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesBuilderList() { - return internalGetCandidatesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Candidate, - com.google.cloud.vertexai.api.Candidate.Builder, - com.google.cloud.vertexai.api.CandidateOrBuilder> - internalGetCandidatesFieldBuilder() { - if (candidatesBuilder_ == null) { - candidatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Candidate, - com.google.cloud.vertexai.api.Candidate.Builder, - com.google.cloud.vertexai.api.CandidateOrBuilder>( - candidates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - candidates_ = null; - } - return candidatesBuilder_; - } - - private java.lang.Object modelVersion_ = ""; - - /** - * - * - *
-     * Output only. The model version used to generate the response.
-     * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersion. - */ - public java.lang.String getModelVersion() { - java.lang.Object ref = modelVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The model version used to generate the response.
-     * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersion. - */ - public com.google.protobuf.ByteString getModelVersionBytes() { - java.lang.Object ref = modelVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The model version used to generate the response.
-     * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The modelVersion to set. - * @return This builder for chaining. - */ - public Builder setModelVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelVersion_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The model version used to generate the response.
-     * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearModelVersion() { - modelVersion_ = getDefaultInstance().getModelVersion(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The model version used to generate the response.
-     * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for modelVersion to set. - * @return This builder for chaining. - */ - public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelVersion_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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); - } - if (createTime_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.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. Timestamp when the request is made to the server.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private java.lang.Object responseId_ = ""; - - /** - * - * - *
-     * Output only. response_id is used to identify each response. It is the
-     * encoding of the event_id.
-     * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The responseId. - */ - public java.lang.String getResponseId() { - java.lang.Object ref = responseId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - responseId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. response_id is used to identify each response. It is the
-     * encoding of the event_id.
-     * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for responseId. - */ - public com.google.protobuf.ByteString getResponseIdBytes() { - java.lang.Object ref = responseId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. response_id is used to identify each response. It is the
-     * encoding of the event_id.
-     * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The responseId to set. - * @return This builder for chaining. - */ - public Builder setResponseId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - responseId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. response_id is used to identify each response. It is the
-     * encoding of the event_id.
-     * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearResponseId() { - responseId_ = getDefaultInstance().getResponseId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. response_id is used to identify each response. It is the
-     * encoding of the event_id.
-     * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for responseId to set. - * @return This builder for chaining. - */ - public Builder setResponseIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - responseId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback promptFeedback_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder> - promptFeedbackBuilder_; - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the promptFeedback field is set. - */ - public boolean hasPromptFeedback() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The promptFeedback. - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - getPromptFeedback() { - if (promptFeedbackBuilder_ == null) { - return promptFeedback_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - .getDefaultInstance() - : promptFeedback_; - } else { - return promptFeedbackBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptFeedback( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback value) { - if (promptFeedbackBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - promptFeedback_ = value; - } else { - promptFeedbackBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptFeedback( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder - builderForValue) { - if (promptFeedbackBuilder_ == null) { - promptFeedback_ = builderForValue.build(); - } else { - promptFeedbackBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergePromptFeedback( - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback value) { - if (promptFeedbackBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && promptFeedback_ != null - && promptFeedback_ - != com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - .getDefaultInstance()) { - getPromptFeedbackBuilder().mergeFrom(value); - } else { - promptFeedback_ = value; - } - } else { - promptFeedbackBuilder_.mergeFrom(value); - } - if (promptFeedback_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPromptFeedback() { - bitField0_ = (bitField0_ & ~0x00000010); - promptFeedback_ = null; - if (promptFeedbackBuilder_ != null) { - promptFeedbackBuilder_.dispose(); - promptFeedbackBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder - getPromptFeedbackBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetPromptFeedbackFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder - getPromptFeedbackOrBuilder() { - if (promptFeedbackBuilder_ != null) { - return promptFeedbackBuilder_.getMessageOrBuilder(); - } else { - return promptFeedback_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback - .getDefaultInstance() - : promptFeedback_; - } - } - - /** - * - * - *
-     * Output only. Content filter results for a prompt sent in the request.
-     * Note: Sent only in the first stream chunk.
-     * Only happens when no candidates were generated due to content violations.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder> - internalGetPromptFeedbackFieldBuilder() { - if (promptFeedbackBuilder_ == null) { - promptFeedbackBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder>( - getPromptFeedback(), getParentForChildren(), isClean()); - promptFeedback_ = null; - } - return promptFeedbackBuilder_; - } - - private com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata usageMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder> - usageMetadataBuilder_; - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return Whether the usageMetadata field is set. - */ - public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return The usageMetadata. - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata getUsageMetadata() { - if (usageMetadataBuilder_ == null) { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - .getDefaultInstance() - : usageMetadata_; - } else { - return usageMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public Builder setUsageMetadata( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - usageMetadata_ = value; - } else { - usageMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public Builder setUsageMetadata( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder - builderForValue) { - if (usageMetadataBuilder_ == null) { - usageMetadata_ = builderForValue.build(); - } else { - usageMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public Builder mergeUsageMetadata( - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata value) { - if (usageMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && usageMetadata_ != null - && usageMetadata_ - != com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - .getDefaultInstance()) { - getUsageMetadataBuilder().mergeFrom(value); - } else { - usageMetadata_ = value; - } - } else { - usageMetadataBuilder_.mergeFrom(value); - } - if (usageMetadata_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public Builder clearUsageMetadata() { - bitField0_ = (bitField0_ & ~0x00000020); - usageMetadata_ = null; - if (usageMetadataBuilder_ != null) { - usageMetadataBuilder_.dispose(); - usageMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder - getUsageMetadataBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetUsageMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - public com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder - getUsageMetadataOrBuilder() { - if (usageMetadataBuilder_ != null) { - return usageMetadataBuilder_.getMessageOrBuilder(); - } else { - return usageMetadata_ == null - ? com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata - .getDefaultInstance() - : usageMetadata_; - } - } - - /** - * - * - *
-     * Usage metadata about the response(s).
-     * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder> - internalGetUsageMetadataFieldBuilder() { - if (usageMetadataBuilder_ == null) { - usageMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata.Builder, - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder>( - getUsageMetadata(), getParentForChildren(), isClean()); - usageMetadata_ = null; - } - return usageMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerateContentResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerateContentResponse) - private static final com.google.cloud.vertexai.api.GenerateContentResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerateContentResponse(); - } - - public static com.google.cloud.vertexai.api.GenerateContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenerateContentResponse 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.vertexai.api.GenerateContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java deleted file mode 100644 index 90d6ce145df9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GenerateContentResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerateContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getCandidatesList(); - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Candidate getCandidates(int index); - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCandidatesCount(); - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCandidatesOrBuilderList(); - - /** - * - * - *
-   * Output only. Generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.CandidateOrBuilder getCandidatesOrBuilder(int index); - - /** - * - * - *
-   * Output only. The model version used to generate the response.
-   * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersion. - */ - java.lang.String getModelVersion(); - - /** - * - * - *
-   * Output only. The model version used to generate the response.
-   * 
- * - * string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersion. - */ - com.google.protobuf.ByteString getModelVersionBytes(); - - /** - * - * - *
-   * Output only. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when the request is made to the server.
-   * 
- * - * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. response_id is used to identify each response. It is the
-   * encoding of the event_id.
-   * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The responseId. - */ - java.lang.String getResponseId(); - - /** - * - * - *
-   * Output only. response_id is used to identify each response. It is the
-   * encoding of the event_id.
-   * 
- * - * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for responseId. - */ - com.google.protobuf.ByteString getResponseIdBytes(); - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the promptFeedback field is set. - */ - boolean hasPromptFeedback(); - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The promptFeedback. - */ - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback getPromptFeedback(); - - /** - * - * - *
-   * Output only. Content filter results for a prompt sent in the request.
-   * Note: Sent only in the first stream chunk.
-   * Only happens when no candidates were generated due to content violations.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedbackOrBuilder - getPromptFeedbackOrBuilder(); - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return Whether the usageMetadata field is set. - */ - boolean hasUsageMetadata(); - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - * - * @return The usageMetadata. - */ - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata getUsageMetadata(); - - /** - * - * - *
-   * Usage metadata about the response(s).
-   * 
- * - * .google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4; - * - */ - com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadataOrBuilder - getUsageMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java deleted file mode 100644 index 437f5059ab0a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java +++ /dev/null @@ -1,8325 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Generation config.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig} - */ -@com.google.protobuf.Generated -public final class GenerationConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerationConfig) - GenerationConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GenerationConfig"); - } - - // Use GenerationConfig.newBuilder() to construct. - private GenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GenerationConfig() { - stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); - responseMimeType_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.Builder.class); - } - - public interface RoutingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return Whether the autoMode field is set. - */ - boolean hasAutoMode(); - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return The autoMode. - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode getAutoMode(); - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder - getAutoModeOrBuilder(); - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return Whether the manualMode field is set. - */ - boolean hasManualMode(); - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return The manualMode. - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode getManualMode(); - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingModeOrBuilder - getManualModeOrBuilder(); - - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.RoutingConfigCase - getRoutingConfigCase(); - } - - /** - * - * - *
-   * The configuration for routing the request to a specific model.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig.RoutingConfig} - */ - public static final class RoutingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig) - RoutingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RoutingConfig"); - } - - // Use RoutingConfig.newBuilder() to construct. - private RoutingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RoutingConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder.class); - } - - public interface AutoRoutingModeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return Whether the modelRoutingPreference field is set. - */ - boolean hasModelRoutingPreference(); - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The enum numeric value on the wire for modelRoutingPreference. - */ - int getModelRoutingPreferenceValue(); - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The modelRoutingPreference. - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - getModelRoutingPreference(); - } - - /** - * - * - *
-     * When automated routing is specified, the routing will be determined by
-     * the pretrained routing model and customer provided model routing
-     * preference.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode} - */ - public static final class AutoRoutingMode extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode) - AutoRoutingModeOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AutoRoutingMode"); - } - - // Use AutoRoutingMode.newBuilder() to construct. - private AutoRoutingMode(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AutoRoutingMode() { - modelRoutingPreference_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.Builder - .class); - } - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * Protobuf enum {@code - * google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference} - */ - public enum ModelRoutingPreference implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Unspecified model routing preference.
-         * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * - * - *
-         * Prefer higher quality over low cost.
-         * 
- * - * PRIORITIZE_QUALITY = 1; - */ - PRIORITIZE_QUALITY(1), - /** - * - * - *
-         * Balanced model routing preference.
-         * 
- * - * BALANCED = 2; - */ - BALANCED(2), - /** - * - * - *
-         * Prefer lower cost over higher quality.
-         * 
- * - * PRIORITIZE_COST = 3; - */ - PRIORITIZE_COST(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ModelRoutingPreference"); - } - - /** - * - * - *
-         * Unspecified model routing preference.
-         * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - - /** - * - * - *
-         * Prefer higher quality over low cost.
-         * 
- * - * PRIORITIZE_QUALITY = 1; - */ - public static final int PRIORITIZE_QUALITY_VALUE = 1; - - /** - * - * - *
-         * Balanced model routing preference.
-         * 
- * - * BALANCED = 2; - */ - public static final int BALANCED_VALUE = 2; - - /** - * - * - *
-         * Prefer lower cost over higher quality.
-         * 
- * - * PRIORITIZE_COST = 3; - */ - public static final int PRIORITIZE_COST_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 ModelRoutingPreference 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 ModelRoutingPreference forNumber(int value) { - switch (value) { - case 0: - return UNKNOWN; - case 1: - return PRIORITIZE_QUALITY; - case 2: - return BALANCED; - case 3: - return PRIORITIZE_COST; - 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 ModelRoutingPreference findValueByNumber(int number) { - return ModelRoutingPreference.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final ModelRoutingPreference[] VALUES = values(); - - public static ModelRoutingPreference 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 ModelRoutingPreference(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference) - } - - private int bitField0_; - public static final int MODEL_ROUTING_PREFERENCE_FIELD_NUMBER = 1; - private int modelRoutingPreference_ = 0; - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return Whether the modelRoutingPreference field is set. - */ - @java.lang.Override - public boolean hasModelRoutingPreference() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The enum numeric value on the wire for modelRoutingPreference. - */ - @java.lang.Override - public int getModelRoutingPreferenceValue() { - return modelRoutingPreference_; - } - - /** - * - * - *
-       * The model routing preference.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The modelRoutingPreference. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - getModelRoutingPreference() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - result = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference.forNumber(modelRoutingPreference_); - return result == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference.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 (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, modelRoutingPreference_); - } - 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.computeEnumSize(1, modelRoutingPreference_); - } - 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.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode other = - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) obj; - - if (hasModelRoutingPreference() != other.hasModelRoutingPreference()) return false; - if (hasModelRoutingPreference()) { - if (modelRoutingPreference_ != other.modelRoutingPreference_) 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 (hasModelRoutingPreference()) { - hash = (37 * hash) + MODEL_ROUTING_PREFERENCE_FIELD_NUMBER; - hash = (53 * hash) + modelRoutingPreference_; - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - 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.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - 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.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * When automated routing is specified, the routing will be determined by
-       * the pretrained routing model and customer provided model routing
-       * preference.
-       * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode) - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelRoutingPreference_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_AutoRoutingMode_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - build() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - buildPartial() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode result = - new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelRoutingPreference_ = modelRoutingPreference_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) { - return mergeFrom( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode other) { - if (other - == com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance()) return this; - if (other.hasModelRoutingPreference()) { - setModelRoutingPreferenceValue(other.getModelRoutingPreferenceValue()); - } - 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: - { - modelRoutingPreference_ = 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 modelRoutingPreference_ = 0; - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return Whether the modelRoutingPreference field is set. - */ - @java.lang.Override - public boolean hasModelRoutingPreference() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The enum numeric value on the wire for modelRoutingPreference. - */ - @java.lang.Override - public int getModelRoutingPreferenceValue() { - return modelRoutingPreference_; - } - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @param value The enum numeric value on the wire for modelRoutingPreference to set. - * @return This builder for chaining. - */ - public Builder setModelRoutingPreferenceValue(int value) { - modelRoutingPreference_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return The modelRoutingPreference. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - getModelRoutingPreference() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - result = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference.forNumber(modelRoutingPreference_); - return result == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference.UNRECOGNIZED - : result; - } - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @param value The modelRoutingPreference to set. - * @return This builder for chaining. - */ - public Builder setModelRoutingPreference( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .ModelRoutingPreference - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - modelRoutingPreference_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-         * The model routing preference.
-         * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearModelRoutingPreference() { - bitField0_ = (bitField0_ & ~0x00000001); - modelRoutingPreference_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode) - private static final com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .AutoRoutingMode - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode(); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AutoRoutingMode 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.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ManualRoutingModeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return Whether the modelName field is set. - */ - boolean hasModelName(); - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return The modelName. - */ - java.lang.String getModelName(); - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return The bytes for modelName. - */ - com.google.protobuf.ByteString getModelNameBytes(); - } - - /** - * - * - *
-     * When manual routing is set, the specified model will be used directly.
-     * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode} - */ - public static final class ManualRoutingMode extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode) - ManualRoutingModeOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ManualRoutingMode"); - } - - // Use ManualRoutingMode.newBuilder() to construct. - private ManualRoutingMode(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ManualRoutingMode() { - modelName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .Builder.class); - } - - private int bitField0_; - public static final int MODEL_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelName_ = ""; - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return Whether the modelName field is set. - */ - @java.lang.Override - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return The modelName. - */ - @java.lang.Override - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - 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(); - modelName_ = s; - return s; - } - } - - /** - * - * - *
-       * The model name to use. Only the public LLM models are accepted. e.g.
-       * 'gemini-1.5-pro-001'.
-       * 
- * - * optional string model_name = 1; - * - * @return The bytes for modelName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, modelName_); - } - 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.GeneratedMessage.computeStringSize(1, modelName_); - } - 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.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode other = - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) obj; - - if (hasModelName() != other.hasModelName()) return false; - if (hasModelName()) { - if (!getModelName().equals(other.getModelName())) 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 (hasModelName()) { - hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getModelName().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - 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.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - 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.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * When manual routing is set, the specified model will be used directly.
-       * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode) - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingModeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_ManualRoutingMode_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - build() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - buildPartial() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode result = - new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelName_ = modelName_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) { - return mergeFrom( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode other) { - if (other - == com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance()) return this; - if (other.hasModelName()) { - modelName_ = other.modelName_; - 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: - { - modelName_ = 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 modelName_ = ""; - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @return Whether the modelName field is set. - */ - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @return The modelName. - */ - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @return The bytes for modelName. - */ - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @param value The modelName to set. - * @return This builder for chaining. - */ - public Builder setModelName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearModelName() { - modelName_ = getDefaultInstance().getModelName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-         * The model name to use. Only the public LLM models are accepted. e.g.
-         * 'gemini-1.5-pro-001'.
-         * 
- * - * optional string model_name = 1; - * - * @param value The bytes for modelName to set. - * @return This builder for chaining. - */ - public Builder setModelNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode) - private static final com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .ManualRoutingMode - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode(); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ManualRoutingMode 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.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int routingConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object routingConfig_; - - public enum RoutingConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AUTO_MODE(1), - MANUAL_MODE(2), - ROUTINGCONFIG_NOT_SET(0); - private final int value; - - private RoutingConfigCase(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 RoutingConfigCase valueOf(int value) { - return forNumber(value); - } - - public static RoutingConfigCase forNumber(int value) { - switch (value) { - case 1: - return AUTO_MODE; - case 2: - return MANUAL_MODE; - case 0: - return ROUTINGCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public RoutingConfigCase getRoutingConfigCase() { - return RoutingConfigCase.forNumber(routingConfigCase_); - } - - public static final int AUTO_MODE_FIELD_NUMBER = 1; - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return Whether the autoMode field is set. - */ - @java.lang.Override - public boolean hasAutoMode() { - return routingConfigCase_ == 1; - } - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return The autoMode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - getAutoMode() { - if (routingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - - /** - * - * - *
-     * Automated routing.
-     * 
- * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder - getAutoModeOrBuilder() { - if (routingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - - public static final int MANUAL_MODE_FIELD_NUMBER = 2; - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return Whether the manualMode field is set. - */ - @java.lang.Override - public boolean hasManualMode() { - return routingConfigCase_ == 2; - } - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return The manualMode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - getManualMode() { - if (routingConfigCase_ == 2) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } - - /** - * - * - *
-     * Manual routing.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingModeOrBuilder - getManualModeOrBuilder() { - if (routingConfigCase_ == 2) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .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 (routingConfigCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_); - } - if (routingConfigCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (routingConfigCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_); - } - if (routingConfigCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_); - } - 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.vertexai.api.GenerationConfig.RoutingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig other = - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig) obj; - - if (!getRoutingConfigCase().equals(other.getRoutingConfigCase())) return false; - switch (routingConfigCase_) { - case 1: - if (!getAutoMode().equals(other.getAutoMode())) return false; - break; - case 2: - if (!getManualMode().equals(other.getManualMode())) 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 (routingConfigCase_) { - case 1: - hash = (37 * hash) + AUTO_MODE_FIELD_NUMBER; - hash = (53 * hash) + getAutoMode().hashCode(); - break; - case 2: - hash = (37 * hash) + MANUAL_MODE_FIELD_NUMBER; - hash = (53 * hash) + getManualMode().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig 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.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig 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.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerationConfig.RoutingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The configuration for routing the request to a specific model.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig.RoutingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig) - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (autoModeBuilder_ != null) { - autoModeBuilder_.clear(); - } - if (manualModeBuilder_ != null) { - manualModeBuilder_.clear(); - } - routingConfigCase_ = 0; - routingConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_RoutingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig build() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig buildPartial() { - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig result = - new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig result) { - result.routingConfigCase_ = routingConfigCase_; - result.routingConfig_ = this.routingConfig_; - if (routingConfigCase_ == 1 && autoModeBuilder_ != null) { - result.routingConfig_ = autoModeBuilder_.build(); - } - if (routingConfigCase_ == 2 && manualModeBuilder_ != null) { - result.routingConfig_ = manualModeBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig other) { - if (other - == com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance()) - return this; - switch (other.getRoutingConfigCase()) { - case AUTO_MODE: - { - mergeAutoMode(other.getAutoMode()); - break; - } - case MANUAL_MODE: - { - mergeManualMode(other.getManualMode()); - break; - } - case ROUTINGCONFIG_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( - internalGetAutoModeFieldBuilder().getBuilder(), extensionRegistry); - routingConfigCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetManualModeFieldBuilder().getBuilder(), extensionRegistry); - routingConfigCase_ = 2; - 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 routingConfigCase_ = 0; - private java.lang.Object routingConfig_; - - public RoutingConfigCase getRoutingConfigCase() { - return RoutingConfigCase.forNumber(routingConfigCase_); - } - - public Builder clearRoutingConfig() { - routingConfigCase_ = 0; - routingConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder> - autoModeBuilder_; - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return Whether the autoMode field is set. - */ - @java.lang.Override - public boolean hasAutoMode() { - return routingConfigCase_ == 1; - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - * - * @return The autoMode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - getAutoMode() { - if (autoModeBuilder_ == null) { - if (routingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } else { - if (routingConfigCase_ == 1) { - return autoModeBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - public Builder setAutoMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode value) { - if (autoModeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - routingConfig_ = value; - onChanged(); - } else { - autoModeBuilder_.setMessage(value); - } - routingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - public Builder setAutoMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.Builder - builderForValue) { - if (autoModeBuilder_ == null) { - routingConfig_ = builderForValue.build(); - onChanged(); - } else { - autoModeBuilder_.setMessage(builderForValue.build()); - } - routingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - public Builder mergeAutoMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode value) { - if (autoModeBuilder_ == null) { - if (routingConfigCase_ == 1 - && routingConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance()) { - routingConfig_ = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .newBuilder( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .AutoRoutingMode) - routingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - routingConfig_ = value; - } - onChanged(); - } else { - if (routingConfigCase_ == 1) { - autoModeBuilder_.mergeFrom(value); - } else { - autoModeBuilder_.setMessage(value); - } - } - routingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - public Builder clearAutoMode() { - if (autoModeBuilder_ == null) { - if (routingConfigCase_ == 1) { - routingConfigCase_ = 0; - routingConfig_ = null; - onChanged(); - } - } else { - if (routingConfigCase_ == 1) { - routingConfigCase_ = 0; - routingConfig_ = null; - } - autoModeBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.Builder - getAutoModeBuilder() { - return internalGetAutoModeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder - getAutoModeOrBuilder() { - if ((routingConfigCase_ == 1) && (autoModeBuilder_ != null)) { - return autoModeBuilder_.getMessageOrBuilder(); - } else { - if (routingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Automated routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode.Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingModeOrBuilder> - internalGetAutoModeFieldBuilder() { - if (autoModeBuilder_ == null) { - if (!(routingConfigCase_ == 1)) { - routingConfig_ = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .getDefaultInstance(); - } - autoModeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode - .Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .AutoRoutingModeOrBuilder>( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.AutoRoutingMode) - routingConfig_, - getParentForChildren(), - isClean()); - routingConfig_ = null; - } - routingConfigCase_ = 1; - onChanged(); - return autoModeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .ManualRoutingModeOrBuilder> - manualModeBuilder_; - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return Whether the manualMode field is set. - */ - @java.lang.Override - public boolean hasManualMode() { - return routingConfigCase_ == 2; - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - * - * @return The manualMode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - getManualMode() { - if (manualModeBuilder_ == null) { - if (routingConfigCase_ == 2) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } else { - if (routingConfigCase_ == 2) { - return manualModeBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - public Builder setManualMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode value) { - if (manualModeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - routingConfig_ = value; - onChanged(); - } else { - manualModeBuilder_.setMessage(value); - } - routingConfigCase_ = 2; - return this; - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - public Builder setManualMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode.Builder - builderForValue) { - if (manualModeBuilder_ == null) { - routingConfig_ = builderForValue.build(); - onChanged(); - } else { - manualModeBuilder_.setMessage(builderForValue.build()); - } - routingConfigCase_ = 2; - return this; - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - public Builder mergeManualMode( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode value) { - if (manualModeBuilder_ == null) { - if (routingConfigCase_ == 2 - && routingConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance()) { - routingConfig_ = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .newBuilder( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .ManualRoutingMode) - routingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - routingConfig_ = value; - } - onChanged(); - } else { - if (routingConfigCase_ == 2) { - manualModeBuilder_.mergeFrom(value); - } else { - manualModeBuilder_.setMessage(value); - } - } - routingConfigCase_ = 2; - return this; - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - public Builder clearManualMode() { - if (manualModeBuilder_ == null) { - if (routingConfigCase_ == 2) { - routingConfigCase_ = 0; - routingConfig_ = null; - onChanged(); - } - } else { - if (routingConfigCase_ == 2) { - routingConfigCase_ = 0; - routingConfig_ = null; - } - manualModeBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode.Builder - getManualModeBuilder() { - return internalGetManualModeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingModeOrBuilder - getManualModeOrBuilder() { - if ((routingConfigCase_ == 2) && (manualModeBuilder_ != null)) { - return manualModeBuilder_.getMessageOrBuilder(); - } else { - if (routingConfigCase_ == 2) { - return (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_; - } - return com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Manual routing.
-       * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .ManualRoutingModeOrBuilder> - internalGetManualModeFieldBuilder() { - if (manualModeBuilder_ == null) { - if (!(routingConfigCase_ == 2)) { - routingConfig_ = - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .getDefaultInstance(); - } - manualModeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode - .Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .ManualRoutingModeOrBuilder>( - (com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.ManualRoutingMode) - routingConfig_, - getParentForChildren(), - isClean()); - routingConfig_ = null; - } - routingConfigCase_ = 2; - onChanged(); - return manualModeBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerationConfig.RoutingConfig) - private static final com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig(); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RoutingConfig 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.vertexai.api.GenerationConfig.RoutingConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ThinkingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Indicates whether to include thoughts in the response.
-     * If true, thoughts are returned only when available.
-     * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the includeThoughts field is set. - */ - boolean hasIncludeThoughts(); - - /** - * - * - *
-     * Indicates whether to include thoughts in the response.
-     * If true, thoughts are returned only when available.
-     * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The includeThoughts. - */ - boolean getIncludeThoughts(); - - /** - * - * - *
-     * Optional. Indicates the thinking budget in tokens.
-     * This is only applied when enable_thinking is true.
-     * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the thinkingBudget field is set. - */ - boolean hasThinkingBudget(); - - /** - * - * - *
-     * Optional. Indicates the thinking budget in tokens.
-     * This is only applied when enable_thinking is true.
-     * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thinkingBudget. - */ - int getThinkingBudget(); - } - - /** - * - * - *
-   * Config for thinking features.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig} - */ - public static final class ThinkingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig) - ThinkingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ThinkingConfig"); - } - - // Use ThinkingConfig.newBuilder() to construct. - private ThinkingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ThinkingConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder.class); - } - - private int bitField0_; - public static final int INCLUDE_THOUGHTS_FIELD_NUMBER = 1; - private boolean includeThoughts_ = false; - - /** - * - * - *
-     * Indicates whether to include thoughts in the response.
-     * If true, thoughts are returned only when available.
-     * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the includeThoughts field is set. - */ - @java.lang.Override - public boolean hasIncludeThoughts() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Indicates whether to include thoughts in the response.
-     * If true, thoughts are returned only when available.
-     * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The includeThoughts. - */ - @java.lang.Override - public boolean getIncludeThoughts() { - return includeThoughts_; - } - - public static final int THINKING_BUDGET_FIELD_NUMBER = 3; - private int thinkingBudget_ = 0; - - /** - * - * - *
-     * Optional. Indicates the thinking budget in tokens.
-     * This is only applied when enable_thinking is true.
-     * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the thinkingBudget field is set. - */ - @java.lang.Override - public boolean hasThinkingBudget() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Indicates the thinking budget in tokens.
-     * This is only applied when enable_thinking is true.
-     * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thinkingBudget. - */ - @java.lang.Override - public int getThinkingBudget() { - return thinkingBudget_; - } - - 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.writeBool(1, includeThoughts_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt32(3, thinkingBudget_); - } - 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.computeBoolSize(1, includeThoughts_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, thinkingBudget_); - } - 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.vertexai.api.GenerationConfig.ThinkingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig other = - (com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig) obj; - - if (hasIncludeThoughts() != other.hasIncludeThoughts()) return false; - if (hasIncludeThoughts()) { - if (getIncludeThoughts() != other.getIncludeThoughts()) return false; - } - if (hasThinkingBudget() != other.hasThinkingBudget()) return false; - if (hasThinkingBudget()) { - if (getThinkingBudget() != other.getThinkingBudget()) 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 (hasIncludeThoughts()) { - hash = (37 * hash) + INCLUDE_THOUGHTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeThoughts()); - } - if (hasThinkingBudget()) { - hash = (37 * hash) + THINKING_BUDGET_FIELD_NUMBER; - hash = (53 * hash) + getThinkingBudget(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig 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.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig 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.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerationConfig.ThinkingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Config for thinking features.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig) - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - includeThoughts_ = false; - thinkingBudget_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_ThinkingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig build() { - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig buildPartial() { - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig result = - new com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.includeThoughts_ = includeThoughts_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.thinkingBudget_ = thinkingBudget_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig other) { - if (other - == com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance()) - return this; - if (other.hasIncludeThoughts()) { - setIncludeThoughts(other.getIncludeThoughts()); - } - if (other.hasThinkingBudget()) { - setThinkingBudget(other.getThinkingBudget()); - } - 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: - { - includeThoughts_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 24: - { - thinkingBudget_ = input.readInt32(); - 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 boolean includeThoughts_; - - /** - * - * - *
-       * Indicates whether to include thoughts in the response.
-       * If true, thoughts are returned only when available.
-       * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the includeThoughts field is set. - */ - @java.lang.Override - public boolean hasIncludeThoughts() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * Indicates whether to include thoughts in the response.
-       * If true, thoughts are returned only when available.
-       * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The includeThoughts. - */ - @java.lang.Override - public boolean getIncludeThoughts() { - return includeThoughts_; - } - - /** - * - * - *
-       * Indicates whether to include thoughts in the response.
-       * If true, thoughts are returned only when available.
-       * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The includeThoughts to set. - * @return This builder for chaining. - */ - public Builder setIncludeThoughts(boolean value) { - - includeThoughts_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Indicates whether to include thoughts in the response.
-       * If true, thoughts are returned only when available.
-       * 
- * - * optional bool include_thoughts = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearIncludeThoughts() { - bitField0_ = (bitField0_ & ~0x00000001); - includeThoughts_ = false; - onChanged(); - return this; - } - - private int thinkingBudget_; - - /** - * - * - *
-       * Optional. Indicates the thinking budget in tokens.
-       * This is only applied when enable_thinking is true.
-       * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the thinkingBudget field is set. - */ - @java.lang.Override - public boolean hasThinkingBudget() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Optional. Indicates the thinking budget in tokens.
-       * This is only applied when enable_thinking is true.
-       * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thinkingBudget. - */ - @java.lang.Override - public int getThinkingBudget() { - return thinkingBudget_; - } - - /** - * - * - *
-       * Optional. Indicates the thinking budget in tokens.
-       * This is only applied when enable_thinking is true.
-       * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The thinkingBudget to set. - * @return This builder for chaining. - */ - public Builder setThinkingBudget(int value) { - - thinkingBudget_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Indicates the thinking budget in tokens.
-       * This is only applied when enable_thinking is true.
-       * 
- * - * optional int32 thinking_budget = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearThinkingBudget() { - bitField0_ = (bitField0_ & ~0x00000002); - thinkingBudget_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig) - private static final com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig(); - } - - public static com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ThinkingConfig 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.vertexai.api.GenerationConfig.ThinkingConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int TEMPERATURE_FIELD_NUMBER = 1; - private float temperature_ = 0F; - - /** - * - * - *
-   * Optional. Controls the randomness of predictions.
-   * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the temperature field is set. - */ - @java.lang.Override - public boolean hasTemperature() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Controls the randomness of predictions.
-   * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The temperature. - */ - @java.lang.Override - public float getTemperature() { - return temperature_; - } - - public static final int TOP_P_FIELD_NUMBER = 2; - private float topP_ = 0F; - - /** - * - * - *
-   * Optional. If specified, nucleus sampling will be used.
-   * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topP field is set. - */ - @java.lang.Override - public boolean hasTopP() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. If specified, nucleus sampling will be used.
-   * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topP. - */ - @java.lang.Override - public float getTopP() { - return topP_; - } - - public static final int TOP_K_FIELD_NUMBER = 3; - private float topK_ = 0F; - - /** - * - * - *
-   * Optional. If specified, top-k sampling will be used.
-   * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topK field is set. - */ - @java.lang.Override - public boolean hasTopK() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. If specified, top-k sampling will be used.
-   * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - @java.lang.Override - public float getTopK() { - return topK_; - } - - public static final int CANDIDATE_COUNT_FIELD_NUMBER = 4; - private int candidateCount_ = 0; - - /** - * - * - *
-   * Optional. Number of candidates to generate.
-   * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the candidateCount field is set. - */ - @java.lang.Override - public boolean hasCandidateCount() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Number of candidates to generate.
-   * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The candidateCount. - */ - @java.lang.Override - public int getCandidateCount() { - return candidateCount_; - } - - public static final int MAX_OUTPUT_TOKENS_FIELD_NUMBER = 5; - private int maxOutputTokens_ = 0; - - /** - * - * - *
-   * Optional. The maximum number of output tokens to generate per message.
-   * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the maxOutputTokens field is set. - */ - @java.lang.Override - public boolean hasMaxOutputTokens() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Optional. The maximum number of output tokens to generate per message.
-   * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxOutputTokens. - */ - @java.lang.Override - public int getMaxOutputTokens() { - return maxOutputTokens_; - } - - public static final int STOP_SEQUENCES_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList stopSequences_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the stopSequences. - */ - public com.google.protobuf.ProtocolStringList getStopSequencesList() { - return stopSequences_; - } - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of stopSequences. - */ - public int getStopSequencesCount() { - return stopSequences_.size(); - } - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The stopSequences at the given index. - */ - public java.lang.String getStopSequences(int index) { - return stopSequences_.get(index); - } - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the stopSequences at the given index. - */ - public com.google.protobuf.ByteString getStopSequencesBytes(int index) { - return stopSequences_.getByteString(index); - } - - public static final int RESPONSE_LOGPROBS_FIELD_NUMBER = 18; - private boolean responseLogprobs_ = false; - - /** - * - * - *
-   * Optional. If true, export the logprobs results in response.
-   * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the responseLogprobs field is set. - */ - @java.lang.Override - public boolean hasResponseLogprobs() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Optional. If true, export the logprobs results in response.
-   * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseLogprobs. - */ - @java.lang.Override - public boolean getResponseLogprobs() { - return responseLogprobs_; - } - - public static final int LOGPROBS_FIELD_NUMBER = 7; - private int logprobs_ = 0; - - /** - * - * - *
-   * Optional. Logit probabilities.
-   * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the logprobs field is set. - */ - @java.lang.Override - public boolean hasLogprobs() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-   * Optional. Logit probabilities.
-   * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The logprobs. - */ - @java.lang.Override - public int getLogprobs() { - return logprobs_; - } - - public static final int PRESENCE_PENALTY_FIELD_NUMBER = 8; - private float presencePenalty_ = 0F; - - /** - * - * - *
-   * Optional. Positive penalties.
-   * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the presencePenalty field is set. - */ - @java.lang.Override - public boolean hasPresencePenalty() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-   * Optional. Positive penalties.
-   * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The presencePenalty. - */ - @java.lang.Override - public float getPresencePenalty() { - return presencePenalty_; - } - - public static final int FREQUENCY_PENALTY_FIELD_NUMBER = 9; - private float frequencyPenalty_ = 0F; - - /** - * - * - *
-   * Optional. Frequency penalties.
-   * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the frequencyPenalty field is set. - */ - @java.lang.Override - public boolean hasFrequencyPenalty() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-   * Optional. Frequency penalties.
-   * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The frequencyPenalty. - */ - @java.lang.Override - public float getFrequencyPenalty() { - return frequencyPenalty_; - } - - public static final int SEED_FIELD_NUMBER = 12; - private int seed_ = 0; - - /** - * - * - *
-   * Optional. Seed.
-   * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the seed field is set. - */ - @java.lang.Override - public boolean hasSeed() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-   * Optional. Seed.
-   * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The seed. - */ - @java.lang.Override - public int getSeed() { - return seed_; - } - - public static final int RESPONSE_MIME_TYPE_FIELD_NUMBER = 13; - - @SuppressWarnings("serial") - private volatile java.lang.Object responseMimeType_ = ""; - - /** - * - * - *
-   * Optional. Output response mimetype of the generated candidate text.
-   * Supported mimetype:
-   * - `text/plain`: (default) Text output.
-   * - `application/json`: JSON response in the candidates.
-   * The model needs to be prompted to output the appropriate response type,
-   * otherwise the behavior is undefined.
-   * This is a preview feature.
-   * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseMimeType. - */ - @java.lang.Override - public java.lang.String getResponseMimeType() { - java.lang.Object ref = responseMimeType_; - 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(); - responseMimeType_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Output response mimetype of the generated candidate text.
-   * Supported mimetype:
-   * - `text/plain`: (default) Text output.
-   * - `application/json`: JSON response in the candidates.
-   * The model needs to be prompted to output the appropriate response type,
-   * otherwise the behavior is undefined.
-   * This is a preview feature.
-   * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for responseMimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResponseMimeTypeBytes() { - java.lang.Object ref = responseMimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseMimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESPONSE_SCHEMA_FIELD_NUMBER = 16; - private com.google.cloud.vertexai.api.Schema responseSchema_; - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseSchema field is set. - */ - @java.lang.Override - public boolean hasResponseSchema() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseSchema. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getResponseSchema() { - return responseSchema_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : responseSchema_; - } - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SchemaOrBuilder getResponseSchemaOrBuilder() { - return responseSchema_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : responseSchema_; - } - - public static final int RESPONSE_JSON_SCHEMA_FIELD_NUMBER = 28; - private com.google.protobuf.Value responseJsonSchema_; - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - @java.lang.Override - public boolean hasResponseJsonSchema() { - return ((bitField0_ & 0x00000800) != 0); - } - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - @java.lang.Override - public com.google.protobuf.Value getResponseJsonSchema() { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder() { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - - public static final int ROUTING_CONFIG_FIELD_NUMBER = 17; - private com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig routingConfig_; - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the routingConfig field is set. - */ - @java.lang.Override - public boolean hasRoutingConfig() { - return ((bitField0_ & 0x00001000) != 0); - } - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The routingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig getRoutingConfig() { - return routingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance() - : routingConfig_; - } - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder - getRoutingConfigOrBuilder() { - return routingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance() - : routingConfig_; - } - - public static final int SPEECH_CONFIG_FIELD_NUMBER = 23; - private com.google.cloud.vertexai.api.SpeechConfig speechConfig_; - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speechConfig field is set. - */ - @java.lang.Override - public boolean hasSpeechConfig() { - return ((bitField0_ & 0x00002000) != 0); - } - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speechConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeechConfig getSpeechConfig() { - return speechConfig_ == null - ? com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance() - : speechConfig_; - } - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeechConfigOrBuilder getSpeechConfigOrBuilder() { - return speechConfig_ == null - ? com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance() - : speechConfig_; - } - - public static final int THINKING_CONFIG_FIELD_NUMBER = 25; - private com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig thinkingConfig_; - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the thinkingConfig field is set. - */ - @java.lang.Override - public boolean hasThinkingConfig() { - return ((bitField0_ & 0x00004000) != 0); - } - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The thinkingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig getThinkingConfig() { - return thinkingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance() - : thinkingConfig_; - } - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder - getThinkingConfigOrBuilder() { - return thinkingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance() - : thinkingConfig_; - } - - public static final int IMAGE_CONFIG_FIELD_NUMBER = 30; - private com.google.cloud.vertexai.api.ImageConfig imageConfig_; - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the imageConfig field is set. - */ - @java.lang.Override - public boolean hasImageConfig() { - return ((bitField0_ & 0x00008000) != 0); - } - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The imageConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ImageConfig getImageConfig() { - return imageConfig_ == null - ? com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance() - : imageConfig_; - } - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ImageConfigOrBuilder getImageConfigOrBuilder() { - return imageConfig_ == null - ? com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance() - : imageConfig_; - } - - 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, temperature_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFloat(2, topP_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFloat(3, topK_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt32(4, candidateCount_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt32(5, maxOutputTokens_); - } - for (int i = 0; i < stopSequences_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, stopSequences_.getRaw(i)); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeInt32(7, logprobs_); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeFloat(8, presencePenalty_); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeFloat(9, frequencyPenalty_); - } - if (((bitField0_ & 0x00000200) != 0)) { - output.writeInt32(12, seed_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseMimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 13, responseMimeType_); - } - if (((bitField0_ & 0x00000400) != 0)) { - output.writeMessage(16, getResponseSchema()); - } - if (((bitField0_ & 0x00001000) != 0)) { - output.writeMessage(17, getRoutingConfig()); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeBool(18, responseLogprobs_); - } - if (((bitField0_ & 0x00002000) != 0)) { - output.writeMessage(23, getSpeechConfig()); - } - if (((bitField0_ & 0x00004000) != 0)) { - output.writeMessage(25, getThinkingConfig()); - } - if (((bitField0_ & 0x00000800) != 0)) { - output.writeMessage(28, getResponseJsonSchema()); - } - if (((bitField0_ & 0x00008000) != 0)) { - output.writeMessage(30, getImageConfig()); - } - 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, temperature_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, topP_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, topK_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, candidateCount_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxOutputTokens_); - } - { - int dataSize = 0; - for (int i = 0; i < stopSequences_.size(); i++) { - dataSize += computeStringSizeNoTag(stopSequences_.getRaw(i)); - } - size += dataSize; - size += 1 * getStopSequencesList().size(); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, logprobs_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, presencePenalty_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, frequencyPenalty_); - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, seed_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseMimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(13, responseMimeType_); - } - if (((bitField0_ & 0x00000400) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getResponseSchema()); - } - if (((bitField0_ & 0x00001000) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getRoutingConfig()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, responseLogprobs_); - } - if (((bitField0_ & 0x00002000) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getSpeechConfig()); - } - if (((bitField0_ & 0x00004000) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getThinkingConfig()); - } - if (((bitField0_ & 0x00000800) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getResponseJsonSchema()); - } - if (((bitField0_ & 0x00008000) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getImageConfig()); - } - 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.vertexai.api.GenerationConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenerationConfig other = - (com.google.cloud.vertexai.api.GenerationConfig) obj; - - if (hasTemperature() != other.hasTemperature()) return false; - if (hasTemperature()) { - if (java.lang.Float.floatToIntBits(getTemperature()) - != java.lang.Float.floatToIntBits(other.getTemperature())) return false; - } - if (hasTopP() != other.hasTopP()) return false; - if (hasTopP()) { - if (java.lang.Float.floatToIntBits(getTopP()) - != java.lang.Float.floatToIntBits(other.getTopP())) return false; - } - if (hasTopK() != other.hasTopK()) return false; - if (hasTopK()) { - if (java.lang.Float.floatToIntBits(getTopK()) - != java.lang.Float.floatToIntBits(other.getTopK())) return false; - } - if (hasCandidateCount() != other.hasCandidateCount()) return false; - if (hasCandidateCount()) { - if (getCandidateCount() != other.getCandidateCount()) return false; - } - if (hasMaxOutputTokens() != other.hasMaxOutputTokens()) return false; - if (hasMaxOutputTokens()) { - if (getMaxOutputTokens() != other.getMaxOutputTokens()) return false; - } - if (!getStopSequencesList().equals(other.getStopSequencesList())) return false; - if (hasResponseLogprobs() != other.hasResponseLogprobs()) return false; - if (hasResponseLogprobs()) { - if (getResponseLogprobs() != other.getResponseLogprobs()) return false; - } - if (hasLogprobs() != other.hasLogprobs()) return false; - if (hasLogprobs()) { - if (getLogprobs() != other.getLogprobs()) return false; - } - if (hasPresencePenalty() != other.hasPresencePenalty()) return false; - if (hasPresencePenalty()) { - if (java.lang.Float.floatToIntBits(getPresencePenalty()) - != java.lang.Float.floatToIntBits(other.getPresencePenalty())) return false; - } - if (hasFrequencyPenalty() != other.hasFrequencyPenalty()) return false; - if (hasFrequencyPenalty()) { - if (java.lang.Float.floatToIntBits(getFrequencyPenalty()) - != java.lang.Float.floatToIntBits(other.getFrequencyPenalty())) return false; - } - if (hasSeed() != other.hasSeed()) return false; - if (hasSeed()) { - if (getSeed() != other.getSeed()) return false; - } - if (!getResponseMimeType().equals(other.getResponseMimeType())) return false; - if (hasResponseSchema() != other.hasResponseSchema()) return false; - if (hasResponseSchema()) { - if (!getResponseSchema().equals(other.getResponseSchema())) return false; - } - if (hasResponseJsonSchema() != other.hasResponseJsonSchema()) return false; - if (hasResponseJsonSchema()) { - if (!getResponseJsonSchema().equals(other.getResponseJsonSchema())) return false; - } - if (hasRoutingConfig() != other.hasRoutingConfig()) return false; - if (hasRoutingConfig()) { - if (!getRoutingConfig().equals(other.getRoutingConfig())) return false; - } - if (hasSpeechConfig() != other.hasSpeechConfig()) return false; - if (hasSpeechConfig()) { - if (!getSpeechConfig().equals(other.getSpeechConfig())) return false; - } - if (hasThinkingConfig() != other.hasThinkingConfig()) return false; - if (hasThinkingConfig()) { - if (!getThinkingConfig().equals(other.getThinkingConfig())) return false; - } - if (hasImageConfig() != other.hasImageConfig()) return false; - if (hasImageConfig()) { - if (!getImageConfig().equals(other.getImageConfig())) 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 (hasTemperature()) { - hash = (37 * hash) + TEMPERATURE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getTemperature()); - } - if (hasTopP()) { - hash = (37 * hash) + TOP_P_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getTopP()); - } - if (hasTopK()) { - hash = (37 * hash) + TOP_K_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getTopK()); - } - if (hasCandidateCount()) { - hash = (37 * hash) + CANDIDATE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCandidateCount(); - } - if (hasMaxOutputTokens()) { - hash = (37 * hash) + MAX_OUTPUT_TOKENS_FIELD_NUMBER; - hash = (53 * hash) + getMaxOutputTokens(); - } - if (getStopSequencesCount() > 0) { - hash = (37 * hash) + STOP_SEQUENCES_FIELD_NUMBER; - hash = (53 * hash) + getStopSequencesList().hashCode(); - } - if (hasResponseLogprobs()) { - hash = (37 * hash) + RESPONSE_LOGPROBS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getResponseLogprobs()); - } - if (hasLogprobs()) { - hash = (37 * hash) + LOGPROBS_FIELD_NUMBER; - hash = (53 * hash) + getLogprobs(); - } - if (hasPresencePenalty()) { - hash = (37 * hash) + PRESENCE_PENALTY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPresencePenalty()); - } - if (hasFrequencyPenalty()) { - hash = (37 * hash) + FREQUENCY_PENALTY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getFrequencyPenalty()); - } - if (hasSeed()) { - hash = (37 * hash) + SEED_FIELD_NUMBER; - hash = (53 * hash) + getSeed(); - } - hash = (37 * hash) + RESPONSE_MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getResponseMimeType().hashCode(); - if (hasResponseSchema()) { - hash = (37 * hash) + RESPONSE_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getResponseSchema().hashCode(); - } - if (hasResponseJsonSchema()) { - hash = (37 * hash) + RESPONSE_JSON_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getResponseJsonSchema().hashCode(); - } - if (hasRoutingConfig()) { - hash = (37 * hash) + ROUTING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRoutingConfig().hashCode(); - } - if (hasSpeechConfig()) { - hash = (37 * hash) + SPEECH_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSpeechConfig().hashCode(); - } - if (hasThinkingConfig()) { - hash = (37 * hash) + THINKING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getThinkingConfig().hashCode(); - } - if (hasImageConfig()) { - hash = (37 * hash) + IMAGE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getImageConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig 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.vertexai.api.GenerationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig 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.vertexai.api.GenerationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenerationConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenerationConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Generation config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenerationConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenerationConfig) - com.google.cloud.vertexai.api.GenerationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenerationConfig.class, - com.google.cloud.vertexai.api.GenerationConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenerationConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetResponseSchemaFieldBuilder(); - internalGetResponseJsonSchemaFieldBuilder(); - internalGetRoutingConfigFieldBuilder(); - internalGetSpeechConfigFieldBuilder(); - internalGetThinkingConfigFieldBuilder(); - internalGetImageConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - temperature_ = 0F; - topP_ = 0F; - topK_ = 0F; - candidateCount_ = 0; - maxOutputTokens_ = 0; - stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); - responseLogprobs_ = false; - logprobs_ = 0; - presencePenalty_ = 0F; - frequencyPenalty_ = 0F; - seed_ = 0; - responseMimeType_ = ""; - responseSchema_ = null; - if (responseSchemaBuilder_ != null) { - responseSchemaBuilder_.dispose(); - responseSchemaBuilder_ = null; - } - responseJsonSchema_ = null; - if (responseJsonSchemaBuilder_ != null) { - responseJsonSchemaBuilder_.dispose(); - responseJsonSchemaBuilder_ = null; - } - routingConfig_ = null; - if (routingConfigBuilder_ != null) { - routingConfigBuilder_.dispose(); - routingConfigBuilder_ = null; - } - speechConfig_ = null; - if (speechConfigBuilder_ != null) { - speechConfigBuilder_.dispose(); - speechConfigBuilder_ = null; - } - thinkingConfig_ = null; - if (thinkingConfigBuilder_ != null) { - thinkingConfigBuilder_.dispose(); - thinkingConfigBuilder_ = null; - } - imageConfig_ = null; - if (imageConfigBuilder_ != null) { - imageConfigBuilder_.dispose(); - imageConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GenerationConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig build() { - com.google.cloud.vertexai.api.GenerationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenerationConfig buildPartial() { - com.google.cloud.vertexai.api.GenerationConfig result = - new com.google.cloud.vertexai.api.GenerationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GenerationConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.temperature_ = temperature_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.topP_ = topP_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.topK_ = topK_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.candidateCount_ = candidateCount_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.maxOutputTokens_ = maxOutputTokens_; - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - stopSequences_.makeImmutable(); - result.stopSequences_ = stopSequences_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.responseLogprobs_ = responseLogprobs_; - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.logprobs_ = logprobs_; - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.presencePenalty_ = presencePenalty_; - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.frequencyPenalty_ = frequencyPenalty_; - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.seed_ = seed_; - to_bitField0_ |= 0x00000200; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.responseMimeType_ = responseMimeType_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.responseSchema_ = - responseSchemaBuilder_ == null ? responseSchema_ : responseSchemaBuilder_.build(); - to_bitField0_ |= 0x00000400; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.responseJsonSchema_ = - responseJsonSchemaBuilder_ == null - ? responseJsonSchema_ - : responseJsonSchemaBuilder_.build(); - to_bitField0_ |= 0x00000800; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.routingConfig_ = - routingConfigBuilder_ == null ? routingConfig_ : routingConfigBuilder_.build(); - to_bitField0_ |= 0x00001000; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.speechConfig_ = - speechConfigBuilder_ == null ? speechConfig_ : speechConfigBuilder_.build(); - to_bitField0_ |= 0x00002000; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.thinkingConfig_ = - thinkingConfigBuilder_ == null ? thinkingConfig_ : thinkingConfigBuilder_.build(); - to_bitField0_ |= 0x00004000; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.imageConfig_ = - imageConfigBuilder_ == null ? imageConfig_ : imageConfigBuilder_.build(); - to_bitField0_ |= 0x00008000; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenerationConfig) { - return mergeFrom((com.google.cloud.vertexai.api.GenerationConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenerationConfig other) { - if (other == com.google.cloud.vertexai.api.GenerationConfig.getDefaultInstance()) return this; - if (other.hasTemperature()) { - setTemperature(other.getTemperature()); - } - if (other.hasTopP()) { - setTopP(other.getTopP()); - } - if (other.hasTopK()) { - setTopK(other.getTopK()); - } - if (other.hasCandidateCount()) { - setCandidateCount(other.getCandidateCount()); - } - if (other.hasMaxOutputTokens()) { - setMaxOutputTokens(other.getMaxOutputTokens()); - } - if (!other.stopSequences_.isEmpty()) { - if (stopSequences_.isEmpty()) { - stopSequences_ = other.stopSequences_; - bitField0_ |= 0x00000020; - } else { - ensureStopSequencesIsMutable(); - stopSequences_.addAll(other.stopSequences_); - } - onChanged(); - } - if (other.hasResponseLogprobs()) { - setResponseLogprobs(other.getResponseLogprobs()); - } - if (other.hasLogprobs()) { - setLogprobs(other.getLogprobs()); - } - if (other.hasPresencePenalty()) { - setPresencePenalty(other.getPresencePenalty()); - } - if (other.hasFrequencyPenalty()) { - setFrequencyPenalty(other.getFrequencyPenalty()); - } - if (other.hasSeed()) { - setSeed(other.getSeed()); - } - if (!other.getResponseMimeType().isEmpty()) { - responseMimeType_ = other.responseMimeType_; - bitField0_ |= 0x00000800; - onChanged(); - } - if (other.hasResponseSchema()) { - mergeResponseSchema(other.getResponseSchema()); - } - if (other.hasResponseJsonSchema()) { - mergeResponseJsonSchema(other.getResponseJsonSchema()); - } - if (other.hasRoutingConfig()) { - mergeRoutingConfig(other.getRoutingConfig()); - } - if (other.hasSpeechConfig()) { - mergeSpeechConfig(other.getSpeechConfig()); - } - if (other.hasThinkingConfig()) { - mergeThinkingConfig(other.getThinkingConfig()); - } - if (other.hasImageConfig()) { - mergeImageConfig(other.getImageConfig()); - } - 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: - { - temperature_ = input.readFloat(); - bitField0_ |= 0x00000001; - break; - } // case 13 - case 21: - { - topP_ = input.readFloat(); - bitField0_ |= 0x00000002; - break; - } // case 21 - case 29: - { - topK_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 32: - { - candidateCount_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 40: - { - maxOutputTokens_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureStopSequencesIsMutable(); - stopSequences_.add(s); - break; - } // case 50 - case 56: - { - logprobs_ = input.readInt32(); - bitField0_ |= 0x00000080; - break; - } // case 56 - case 69: - { - presencePenalty_ = input.readFloat(); - bitField0_ |= 0x00000100; - break; - } // case 69 - case 77: - { - frequencyPenalty_ = input.readFloat(); - bitField0_ |= 0x00000200; - break; - } // case 77 - case 96: - { - seed_ = input.readInt32(); - bitField0_ |= 0x00000400; - break; - } // case 96 - case 106: - { - responseMimeType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 106 - case 130: - { - input.readMessage( - internalGetResponseSchemaFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 130 - case 138: - { - input.readMessage( - internalGetRoutingConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; - break; - } // case 138 - case 144: - { - responseLogprobs_ = input.readBool(); - bitField0_ |= 0x00000040; - break; - } // case 144 - case 186: - { - input.readMessage( - internalGetSpeechConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; - break; - } // case 186 - case 202: - { - input.readMessage( - internalGetThinkingConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; - break; - } // case 202 - case 226: - { - input.readMessage( - internalGetResponseJsonSchemaFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 226 - case 242: - { - input.readMessage( - internalGetImageConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; - break; - } // case 242 - 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 temperature_; - - /** - * - * - *
-     * Optional. Controls the randomness of predictions.
-     * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the temperature field is set. - */ - @java.lang.Override - public boolean hasTemperature() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Optional. Controls the randomness of predictions.
-     * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The temperature. - */ - @java.lang.Override - public float getTemperature() { - return temperature_; - } - - /** - * - * - *
-     * Optional. Controls the randomness of predictions.
-     * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The temperature to set. - * @return This builder for chaining. - */ - public Builder setTemperature(float value) { - - temperature_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Controls the randomness of predictions.
-     * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTemperature() { - bitField0_ = (bitField0_ & ~0x00000001); - temperature_ = 0F; - onChanged(); - return this; - } - - private float topP_; - - /** - * - * - *
-     * Optional. If specified, nucleus sampling will be used.
-     * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topP field is set. - */ - @java.lang.Override - public boolean hasTopP() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. If specified, nucleus sampling will be used.
-     * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topP. - */ - @java.lang.Override - public float getTopP() { - return topP_; - } - - /** - * - * - *
-     * Optional. If specified, nucleus sampling will be used.
-     * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The topP to set. - * @return This builder for chaining. - */ - public Builder setTopP(float value) { - - topP_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. If specified, nucleus sampling will be used.
-     * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTopP() { - bitField0_ = (bitField0_ & ~0x00000002); - topP_ = 0F; - onChanged(); - return this; - } - - private float topK_; - - /** - * - * - *
-     * Optional. If specified, top-k sampling will be used.
-     * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topK field is set. - */ - @java.lang.Override - public boolean hasTopK() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. If specified, top-k sampling will be used.
-     * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - @java.lang.Override - public float getTopK() { - return topK_; - } - - /** - * - * - *
-     * Optional. If specified, top-k sampling will be used.
-     * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The topK to set. - * @return This builder for chaining. - */ - public Builder setTopK(float value) { - - topK_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. If specified, top-k sampling will be used.
-     * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTopK() { - bitField0_ = (bitField0_ & ~0x00000004); - topK_ = 0F; - onChanged(); - return this; - } - - private int candidateCount_; - - /** - * - * - *
-     * Optional. Number of candidates to generate.
-     * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the candidateCount field is set. - */ - @java.lang.Override - public boolean hasCandidateCount() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Optional. Number of candidates to generate.
-     * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The candidateCount. - */ - @java.lang.Override - public int getCandidateCount() { - return candidateCount_; - } - - /** - * - * - *
-     * Optional. Number of candidates to generate.
-     * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The candidateCount to set. - * @return This builder for chaining. - */ - public Builder setCandidateCount(int value) { - - candidateCount_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Number of candidates to generate.
-     * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearCandidateCount() { - bitField0_ = (bitField0_ & ~0x00000008); - candidateCount_ = 0; - onChanged(); - return this; - } - - private int maxOutputTokens_; - - /** - * - * - *
-     * Optional. The maximum number of output tokens to generate per message.
-     * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the maxOutputTokens field is set. - */ - @java.lang.Override - public boolean hasMaxOutputTokens() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. The maximum number of output tokens to generate per message.
-     * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxOutputTokens. - */ - @java.lang.Override - public int getMaxOutputTokens() { - return maxOutputTokens_; - } - - /** - * - * - *
-     * Optional. The maximum number of output tokens to generate per message.
-     * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxOutputTokens to set. - * @return This builder for chaining. - */ - public Builder setMaxOutputTokens(int value) { - - maxOutputTokens_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The maximum number of output tokens to generate per message.
-     * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxOutputTokens() { - bitField0_ = (bitField0_ & ~0x00000010); - maxOutputTokens_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList stopSequences_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureStopSequencesIsMutable() { - if (!stopSequences_.isModifiable()) { - stopSequences_ = new com.google.protobuf.LazyStringArrayList(stopSequences_); - } - bitField0_ |= 0x00000020; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the stopSequences. - */ - public com.google.protobuf.ProtocolStringList getStopSequencesList() { - stopSequences_.makeImmutable(); - return stopSequences_; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of stopSequences. - */ - public int getStopSequencesCount() { - return stopSequences_.size(); - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The stopSequences at the given index. - */ - public java.lang.String getStopSequences(int index) { - return stopSequences_.get(index); - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the stopSequences at the given index. - */ - public com.google.protobuf.ByteString getStopSequencesBytes(int index) { - return stopSequences_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The stopSequences to set. - * @return This builder for chaining. - */ - public Builder setStopSequences(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStopSequencesIsMutable(); - stopSequences_.set(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The stopSequences to add. - * @return This builder for chaining. - */ - public Builder addStopSequences(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStopSequencesIsMutable(); - stopSequences_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The stopSequences to add. - * @return This builder for chaining. - */ - public Builder addAllStopSequences(java.lang.Iterable values) { - ensureStopSequencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stopSequences_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearStopSequences() { - stopSequences_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Stop sequences.
-     * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the stopSequences to add. - * @return This builder for chaining. - */ - public Builder addStopSequencesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureStopSequencesIsMutable(); - stopSequences_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private boolean responseLogprobs_; - - /** - * - * - *
-     * Optional. If true, export the logprobs results in response.
-     * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the responseLogprobs field is set. - */ - @java.lang.Override - public boolean hasResponseLogprobs() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-     * Optional. If true, export the logprobs results in response.
-     * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseLogprobs. - */ - @java.lang.Override - public boolean getResponseLogprobs() { - return responseLogprobs_; - } - - /** - * - * - *
-     * Optional. If true, export the logprobs results in response.
-     * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The responseLogprobs to set. - * @return This builder for chaining. - */ - public Builder setResponseLogprobs(boolean value) { - - responseLogprobs_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. If true, export the logprobs results in response.
-     * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearResponseLogprobs() { - bitField0_ = (bitField0_ & ~0x00000040); - responseLogprobs_ = false; - onChanged(); - return this; - } - - private int logprobs_; - - /** - * - * - *
-     * Optional. Logit probabilities.
-     * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the logprobs field is set. - */ - @java.lang.Override - public boolean hasLogprobs() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Optional. Logit probabilities.
-     * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The logprobs. - */ - @java.lang.Override - public int getLogprobs() { - return logprobs_; - } - - /** - * - * - *
-     * Optional. Logit probabilities.
-     * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The logprobs to set. - * @return This builder for chaining. - */ - public Builder setLogprobs(int value) { - - logprobs_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Logit probabilities.
-     * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLogprobs() { - bitField0_ = (bitField0_ & ~0x00000080); - logprobs_ = 0; - onChanged(); - return this; - } - - private float presencePenalty_; - - /** - * - * - *
-     * Optional. Positive penalties.
-     * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the presencePenalty field is set. - */ - @java.lang.Override - public boolean hasPresencePenalty() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Optional. Positive penalties.
-     * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The presencePenalty. - */ - @java.lang.Override - public float getPresencePenalty() { - return presencePenalty_; - } - - /** - * - * - *
-     * Optional. Positive penalties.
-     * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The presencePenalty to set. - * @return This builder for chaining. - */ - public Builder setPresencePenalty(float value) { - - presencePenalty_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Positive penalties.
-     * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPresencePenalty() { - bitField0_ = (bitField0_ & ~0x00000100); - presencePenalty_ = 0F; - onChanged(); - return this; - } - - private float frequencyPenalty_; - - /** - * - * - *
-     * Optional. Frequency penalties.
-     * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the frequencyPenalty field is set. - */ - @java.lang.Override - public boolean hasFrequencyPenalty() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Optional. Frequency penalties.
-     * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The frequencyPenalty. - */ - @java.lang.Override - public float getFrequencyPenalty() { - return frequencyPenalty_; - } - - /** - * - * - *
-     * Optional. Frequency penalties.
-     * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The frequencyPenalty to set. - * @return This builder for chaining. - */ - public Builder setFrequencyPenalty(float value) { - - frequencyPenalty_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Frequency penalties.
-     * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFrequencyPenalty() { - bitField0_ = (bitField0_ & ~0x00000200); - frequencyPenalty_ = 0F; - onChanged(); - return this; - } - - private int seed_; - - /** - * - * - *
-     * Optional. Seed.
-     * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the seed field is set. - */ - @java.lang.Override - public boolean hasSeed() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-     * Optional. Seed.
-     * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The seed. - */ - @java.lang.Override - public int getSeed() { - return seed_; - } - - /** - * - * - *
-     * Optional. Seed.
-     * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The seed to set. - * @return This builder for chaining. - */ - public Builder setSeed(int value) { - - seed_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Seed.
-     * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearSeed() { - bitField0_ = (bitField0_ & ~0x00000400); - seed_ = 0; - onChanged(); - return this; - } - - private java.lang.Object responseMimeType_ = ""; - - /** - * - * - *
-     * Optional. Output response mimetype of the generated candidate text.
-     * Supported mimetype:
-     * - `text/plain`: (default) Text output.
-     * - `application/json`: JSON response in the candidates.
-     * The model needs to be prompted to output the appropriate response type,
-     * otherwise the behavior is undefined.
-     * This is a preview feature.
-     * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseMimeType. - */ - public java.lang.String getResponseMimeType() { - java.lang.Object ref = responseMimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - responseMimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Output response mimetype of the generated candidate text.
-     * Supported mimetype:
-     * - `text/plain`: (default) Text output.
-     * - `application/json`: JSON response in the candidates.
-     * The model needs to be prompted to output the appropriate response type,
-     * otherwise the behavior is undefined.
-     * This is a preview feature.
-     * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for responseMimeType. - */ - public com.google.protobuf.ByteString getResponseMimeTypeBytes() { - java.lang.Object ref = responseMimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseMimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Output response mimetype of the generated candidate text.
-     * Supported mimetype:
-     * - `text/plain`: (default) Text output.
-     * - `application/json`: JSON response in the candidates.
-     * The model needs to be prompted to output the appropriate response type,
-     * otherwise the behavior is undefined.
-     * This is a preview feature.
-     * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The responseMimeType to set. - * @return This builder for chaining. - */ - public Builder setResponseMimeType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - responseMimeType_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output response mimetype of the generated candidate text.
-     * Supported mimetype:
-     * - `text/plain`: (default) Text output.
-     * - `application/json`: JSON response in the candidates.
-     * The model needs to be prompted to output the appropriate response type,
-     * otherwise the behavior is undefined.
-     * This is a preview feature.
-     * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearResponseMimeType() { - responseMimeType_ = getDefaultInstance().getResponseMimeType(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output response mimetype of the generated candidate text.
-     * Supported mimetype:
-     * - `text/plain`: (default) Text output.
-     * - `application/json`: JSON response in the candidates.
-     * The model needs to be prompted to output the appropriate response type,
-     * otherwise the behavior is undefined.
-     * This is a preview feature.
-     * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for responseMimeType to set. - * @return This builder for chaining. - */ - public Builder setResponseMimeTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - responseMimeType_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.Schema responseSchema_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - responseSchemaBuilder_; - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseSchema field is set. - */ - public boolean hasResponseSchema() { - return ((bitField0_ & 0x00001000) != 0); - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseSchema. - */ - public com.google.cloud.vertexai.api.Schema getResponseSchema() { - if (responseSchemaBuilder_ == null) { - return responseSchema_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : responseSchema_; - } else { - return responseSchemaBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseSchema(com.google.cloud.vertexai.api.Schema value) { - if (responseSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - responseSchema_ = value; - } else { - responseSchemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseSchema(com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (responseSchemaBuilder_ == null) { - responseSchema_ = builderForValue.build(); - } else { - responseSchemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeResponseSchema(com.google.cloud.vertexai.api.Schema value) { - if (responseSchemaBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && responseSchema_ != null - && responseSchema_ != com.google.cloud.vertexai.api.Schema.getDefaultInstance()) { - getResponseSchemaBuilder().mergeFrom(value); - } else { - responseSchema_ = value; - } - } else { - responseSchemaBuilder_.mergeFrom(value); - } - if (responseSchema_ != null) { - bitField0_ |= 0x00001000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearResponseSchema() { - bitField0_ = (bitField0_ & ~0x00001000); - responseSchema_ = null; - if (responseSchemaBuilder_ != null) { - responseSchemaBuilder_.dispose(); - responseSchemaBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder getResponseSchemaBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return internalGetResponseSchemaFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SchemaOrBuilder getResponseSchemaOrBuilder() { - if (responseSchemaBuilder_ != null) { - return responseSchemaBuilder_.getMessageOrBuilder(); - } else { - return responseSchema_ == null - ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() - : responseSchema_; - } - } - - /** - * - * - *
-     * Optional. The `Schema` object allows the definition of input and output
-     * data types. These types can be objects, but also primitives and arrays.
-     * Represents a select subset of an [OpenAPI 3.0 schema
-     * object](https://spec.openapis.org/oas/v3.0.3#schema).
-     * If set, a compatible response_mime_type must also be set.
-     * Compatible mimetypes:
-     * `application/json`: Schema for JSON response.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - internalGetResponseSchemaFieldBuilder() { - if (responseSchemaBuilder_ == null) { - responseSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder>( - getResponseSchema(), getParentForChildren(), isClean()); - responseSchema_ = null; - } - return responseSchemaBuilder_; - } - - private com.google.protobuf.Value responseJsonSchema_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - responseJsonSchemaBuilder_; - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - public boolean hasResponseJsonSchema() { - return ((bitField0_ & 0x00002000) != 0); - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - public com.google.protobuf.Value getResponseJsonSchema() { - if (responseJsonSchemaBuilder_ == null) { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } else { - return responseJsonSchemaBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseJsonSchema(com.google.protobuf.Value value) { - if (responseJsonSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - responseJsonSchema_ = value; - } else { - responseJsonSchemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setResponseJsonSchema(com.google.protobuf.Value.Builder builderForValue) { - if (responseJsonSchemaBuilder_ == null) { - responseJsonSchema_ = builderForValue.build(); - } else { - responseJsonSchemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeResponseJsonSchema(com.google.protobuf.Value value) { - if (responseJsonSchemaBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && responseJsonSchema_ != null - && responseJsonSchema_ != com.google.protobuf.Value.getDefaultInstance()) { - getResponseJsonSchemaBuilder().mergeFrom(value); - } else { - responseJsonSchema_ = value; - } - } else { - responseJsonSchemaBuilder_.mergeFrom(value); - } - if (responseJsonSchema_ != null) { - bitField0_ |= 0x00002000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearResponseJsonSchema() { - bitField0_ = (bitField0_ & ~0x00002000); - responseJsonSchema_ = null; - if (responseJsonSchemaBuilder_ != null) { - responseJsonSchemaBuilder_.dispose(); - responseJsonSchemaBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getResponseJsonSchemaBuilder() { - bitField0_ |= 0x00002000; - onChanged(); - return internalGetResponseJsonSchemaFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder() { - if (responseJsonSchemaBuilder_ != null) { - return responseJsonSchemaBuilder_.getMessageOrBuilder(); - } else { - return responseJsonSchema_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : responseJsonSchema_; - } - } - - /** - * - * - *
-     * Optional. Output schema of the generated response. This is an alternative
-     * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-     *
-     * If set, `response_schema` must be omitted, but `response_mime_type` is
-     * required.
-     *
-     * While the full JSON Schema may be sent, not all features are supported.
-     * Specifically, only the following properties are supported:
-     *
-     * - `$id`
-     * - `$defs`
-     * - `$ref`
-     * - `$anchor`
-     * - `type`
-     * - `format`
-     * - `title`
-     * - `description`
-     * - `enum` (for strings and numbers)
-     * - `items`
-     * - `prefixItems`
-     * - `minItems`
-     * - `maxItems`
-     * - `minimum`
-     * - `maximum`
-     * - `anyOf`
-     * - `oneOf` (interpreted the same as `anyOf`)
-     * - `properties`
-     * - `additionalProperties`
-     * - `required`
-     *
-     * The non-standard `propertyOrdering` property may also be set.
-     *
-     * Cyclic references are unrolled to a limited degree and, as such, may only
-     * be used within non-required properties. (Nullable properties are not
-     * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-     * for than those starting as a `$`, may be set.
-     * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetResponseJsonSchemaFieldBuilder() { - if (responseJsonSchemaBuilder_ == null) { - responseJsonSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getResponseJsonSchema(), getParentForChildren(), isClean()); - responseJsonSchema_ = null; - } - return responseJsonSchemaBuilder_; - } - - private com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig routingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder> - routingConfigBuilder_; - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the routingConfig field is set. - */ - public boolean hasRoutingConfig() { - return ((bitField0_ & 0x00004000) != 0); - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The routingConfig. - */ - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig getRoutingConfig() { - if (routingConfigBuilder_ == null) { - return routingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance() - : routingConfig_; - } else { - return routingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRoutingConfig( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig value) { - if (routingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - routingConfig_ = value; - } else { - routingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRoutingConfig( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder builderForValue) { - if (routingConfigBuilder_ == null) { - routingConfig_ = builderForValue.build(); - } else { - routingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRoutingConfig( - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig value) { - if (routingConfigBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) - && routingConfig_ != null - && routingConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig - .getDefaultInstance()) { - getRoutingConfigBuilder().mergeFrom(value); - } else { - routingConfig_ = value; - } - } else { - routingConfigBuilder_.mergeFrom(value); - } - if (routingConfig_ != null) { - bitField0_ |= 0x00004000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRoutingConfig() { - bitField0_ = (bitField0_ & ~0x00004000); - routingConfig_ = null; - if (routingConfigBuilder_ != null) { - routingConfigBuilder_.dispose(); - routingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder - getRoutingConfigBuilder() { - bitField0_ |= 0x00004000; - onChanged(); - return internalGetRoutingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder - getRoutingConfigOrBuilder() { - if (routingConfigBuilder_ != null) { - return routingConfigBuilder_.getMessageOrBuilder(); - } else { - return routingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.getDefaultInstance() - : routingConfig_; - } - } - - /** - * - * - *
-     * Optional. Routing configuration.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder> - internalGetRoutingConfigFieldBuilder() { - if (routingConfigBuilder_ == null) { - routingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder>( - getRoutingConfig(), getParentForChildren(), isClean()); - routingConfig_ = null; - } - return routingConfigBuilder_; - } - - private com.google.cloud.vertexai.api.SpeechConfig speechConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeechConfig, - com.google.cloud.vertexai.api.SpeechConfig.Builder, - com.google.cloud.vertexai.api.SpeechConfigOrBuilder> - speechConfigBuilder_; - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speechConfig field is set. - */ - public boolean hasSpeechConfig() { - return ((bitField0_ & 0x00008000) != 0); - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speechConfig. - */ - public com.google.cloud.vertexai.api.SpeechConfig getSpeechConfig() { - if (speechConfigBuilder_ == null) { - return speechConfig_ == null - ? com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance() - : speechConfig_; - } else { - return speechConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSpeechConfig(com.google.cloud.vertexai.api.SpeechConfig value) { - if (speechConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - speechConfig_ = value; - } else { - speechConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSpeechConfig( - com.google.cloud.vertexai.api.SpeechConfig.Builder builderForValue) { - if (speechConfigBuilder_ == null) { - speechConfig_ = builderForValue.build(); - } else { - speechConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSpeechConfig(com.google.cloud.vertexai.api.SpeechConfig value) { - if (speechConfigBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) - && speechConfig_ != null - && speechConfig_ != com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance()) { - getSpeechConfigBuilder().mergeFrom(value); - } else { - speechConfig_ = value; - } - } else { - speechConfigBuilder_.mergeFrom(value); - } - if (speechConfig_ != null) { - bitField0_ |= 0x00008000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSpeechConfig() { - bitField0_ = (bitField0_ & ~0x00008000); - speechConfig_ = null; - if (speechConfigBuilder_ != null) { - speechConfigBuilder_.dispose(); - speechConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SpeechConfig.Builder getSpeechConfigBuilder() { - bitField0_ |= 0x00008000; - onChanged(); - return internalGetSpeechConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SpeechConfigOrBuilder getSpeechConfigOrBuilder() { - if (speechConfigBuilder_ != null) { - return speechConfigBuilder_.getMessageOrBuilder(); - } else { - return speechConfig_ == null - ? com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance() - : speechConfig_; - } - } - - /** - * - * - *
-     * Optional. The speech generation config.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeechConfig, - com.google.cloud.vertexai.api.SpeechConfig.Builder, - com.google.cloud.vertexai.api.SpeechConfigOrBuilder> - internalGetSpeechConfigFieldBuilder() { - if (speechConfigBuilder_ == null) { - speechConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeechConfig, - com.google.cloud.vertexai.api.SpeechConfig.Builder, - com.google.cloud.vertexai.api.SpeechConfigOrBuilder>( - getSpeechConfig(), getParentForChildren(), isClean()); - speechConfig_ = null; - } - return speechConfigBuilder_; - } - - private com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig thinkingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder> - thinkingConfigBuilder_; - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the thinkingConfig field is set. - */ - public boolean hasThinkingConfig() { - return ((bitField0_ & 0x00010000) != 0); - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The thinkingConfig. - */ - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig getThinkingConfig() { - if (thinkingConfigBuilder_ == null) { - return thinkingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance() - : thinkingConfig_; - } else { - return thinkingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setThinkingConfig( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig value) { - if (thinkingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - thinkingConfig_ = value; - } else { - thinkingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setThinkingConfig( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder builderForValue) { - if (thinkingConfigBuilder_ == null) { - thinkingConfig_ = builderForValue.build(); - } else { - thinkingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeThinkingConfig( - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig value) { - if (thinkingConfigBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) - && thinkingConfig_ != null - && thinkingConfig_ - != com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig - .getDefaultInstance()) { - getThinkingConfigBuilder().mergeFrom(value); - } else { - thinkingConfig_ = value; - } - } else { - thinkingConfigBuilder_.mergeFrom(value); - } - if (thinkingConfig_ != null) { - bitField0_ |= 0x00010000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearThinkingConfig() { - bitField0_ = (bitField0_ & ~0x00010000); - thinkingConfig_ = null; - if (thinkingConfigBuilder_ != null) { - thinkingConfigBuilder_.dispose(); - thinkingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder - getThinkingConfigBuilder() { - bitField0_ |= 0x00010000; - onChanged(); - return internalGetThinkingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder - getThinkingConfigOrBuilder() { - if (thinkingConfigBuilder_ != null) { - return thinkingConfigBuilder_.getMessageOrBuilder(); - } else { - return thinkingConfig_ == null - ? com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.getDefaultInstance() - : thinkingConfig_; - } - } - - /** - * - * - *
-     * Optional. Config for thinking features.
-     * An error will be returned if this field is set for models that don't
-     * support thinking.
-     * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder> - internalGetThinkingConfigFieldBuilder() { - if (thinkingConfigBuilder_ == null) { - thinkingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig.Builder, - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder>( - getThinkingConfig(), getParentForChildren(), isClean()); - thinkingConfig_ = null; - } - return thinkingConfigBuilder_; - } - - private com.google.cloud.vertexai.api.ImageConfig imageConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ImageConfig, - com.google.cloud.vertexai.api.ImageConfig.Builder, - com.google.cloud.vertexai.api.ImageConfigOrBuilder> - imageConfigBuilder_; - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the imageConfig field is set. - */ - public boolean hasImageConfig() { - return ((bitField0_ & 0x00020000) != 0); - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The imageConfig. - */ - public com.google.cloud.vertexai.api.ImageConfig getImageConfig() { - if (imageConfigBuilder_ == null) { - return imageConfig_ == null - ? com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance() - : imageConfig_; - } else { - return imageConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setImageConfig(com.google.cloud.vertexai.api.ImageConfig value) { - if (imageConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageConfig_ = value; - } else { - imageConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setImageConfig( - com.google.cloud.vertexai.api.ImageConfig.Builder builderForValue) { - if (imageConfigBuilder_ == null) { - imageConfig_ = builderForValue.build(); - } else { - imageConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeImageConfig(com.google.cloud.vertexai.api.ImageConfig value) { - if (imageConfigBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) - && imageConfig_ != null - && imageConfig_ != com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance()) { - getImageConfigBuilder().mergeFrom(value); - } else { - imageConfig_ = value; - } - } else { - imageConfigBuilder_.mergeFrom(value); - } - if (imageConfig_ != null) { - bitField0_ |= 0x00020000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearImageConfig() { - bitField0_ = (bitField0_ & ~0x00020000); - imageConfig_ = null; - if (imageConfigBuilder_ != null) { - imageConfigBuilder_.dispose(); - imageConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ImageConfig.Builder getImageConfigBuilder() { - bitField0_ |= 0x00020000; - onChanged(); - return internalGetImageConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ImageConfigOrBuilder getImageConfigOrBuilder() { - if (imageConfigBuilder_ != null) { - return imageConfigBuilder_.getMessageOrBuilder(); - } else { - return imageConfig_ == null - ? com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance() - : imageConfig_; - } - } - - /** - * - * - *
-     * Optional. Config for image generation features.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ImageConfig, - com.google.cloud.vertexai.api.ImageConfig.Builder, - com.google.cloud.vertexai.api.ImageConfigOrBuilder> - internalGetImageConfigFieldBuilder() { - if (imageConfigBuilder_ == null) { - imageConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ImageConfig, - com.google.cloud.vertexai.api.ImageConfig.Builder, - com.google.cloud.vertexai.api.ImageConfigOrBuilder>( - getImageConfig(), getParentForChildren(), isClean()); - imageConfig_ = null; - } - return imageConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenerationConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenerationConfig) - private static final com.google.cloud.vertexai.api.GenerationConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenerationConfig(); - } - - public static com.google.cloud.vertexai.api.GenerationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenerationConfig 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.vertexai.api.GenerationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java deleted file mode 100644 index abb680880dc2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java +++ /dev/null @@ -1,768 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GenerationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenerationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Controls the randomness of predictions.
-   * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the temperature field is set. - */ - boolean hasTemperature(); - - /** - * - * - *
-   * Optional. Controls the randomness of predictions.
-   * 
- * - * optional float temperature = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The temperature. - */ - float getTemperature(); - - /** - * - * - *
-   * Optional. If specified, nucleus sampling will be used.
-   * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topP field is set. - */ - boolean hasTopP(); - - /** - * - * - *
-   * Optional. If specified, nucleus sampling will be used.
-   * 
- * - * optional float top_p = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topP. - */ - float getTopP(); - - /** - * - * - *
-   * Optional. If specified, top-k sampling will be used.
-   * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the topK field is set. - */ - boolean hasTopK(); - - /** - * - * - *
-   * Optional. If specified, top-k sampling will be used.
-   * 
- * - * optional float top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - float getTopK(); - - /** - * - * - *
-   * Optional. Number of candidates to generate.
-   * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the candidateCount field is set. - */ - boolean hasCandidateCount(); - - /** - * - * - *
-   * Optional. Number of candidates to generate.
-   * 
- * - * optional int32 candidate_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The candidateCount. - */ - int getCandidateCount(); - - /** - * - * - *
-   * Optional. The maximum number of output tokens to generate per message.
-   * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the maxOutputTokens field is set. - */ - boolean hasMaxOutputTokens(); - - /** - * - * - *
-   * Optional. The maximum number of output tokens to generate per message.
-   * 
- * - * optional int32 max_output_tokens = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxOutputTokens. - */ - int getMaxOutputTokens(); - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the stopSequences. - */ - java.util.List getStopSequencesList(); - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of stopSequences. - */ - int getStopSequencesCount(); - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The stopSequences at the given index. - */ - java.lang.String getStopSequences(int index); - - /** - * - * - *
-   * Optional. Stop sequences.
-   * 
- * - * repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the stopSequences at the given index. - */ - com.google.protobuf.ByteString getStopSequencesBytes(int index); - - /** - * - * - *
-   * Optional. If true, export the logprobs results in response.
-   * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the responseLogprobs field is set. - */ - boolean hasResponseLogprobs(); - - /** - * - * - *
-   * Optional. If true, export the logprobs results in response.
-   * 
- * - * optional bool response_logprobs = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseLogprobs. - */ - boolean getResponseLogprobs(); - - /** - * - * - *
-   * Optional. Logit probabilities.
-   * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the logprobs field is set. - */ - boolean hasLogprobs(); - - /** - * - * - *
-   * Optional. Logit probabilities.
-   * 
- * - * optional int32 logprobs = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The logprobs. - */ - int getLogprobs(); - - /** - * - * - *
-   * Optional. Positive penalties.
-   * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the presencePenalty field is set. - */ - boolean hasPresencePenalty(); - - /** - * - * - *
-   * Optional. Positive penalties.
-   * 
- * - * optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The presencePenalty. - */ - float getPresencePenalty(); - - /** - * - * - *
-   * Optional. Frequency penalties.
-   * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the frequencyPenalty field is set. - */ - boolean hasFrequencyPenalty(); - - /** - * - * - *
-   * Optional. Frequency penalties.
-   * 
- * - * optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The frequencyPenalty. - */ - float getFrequencyPenalty(); - - /** - * - * - *
-   * Optional. Seed.
-   * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the seed field is set. - */ - boolean hasSeed(); - - /** - * - * - *
-   * Optional. Seed.
-   * 
- * - * optional int32 seed = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The seed. - */ - int getSeed(); - - /** - * - * - *
-   * Optional. Output response mimetype of the generated candidate text.
-   * Supported mimetype:
-   * - `text/plain`: (default) Text output.
-   * - `application/json`: JSON response in the candidates.
-   * The model needs to be prompted to output the appropriate response type,
-   * otherwise the behavior is undefined.
-   * This is a preview feature.
-   * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The responseMimeType. - */ - java.lang.String getResponseMimeType(); - - /** - * - * - *
-   * Optional. Output response mimetype of the generated candidate text.
-   * Supported mimetype:
-   * - `text/plain`: (default) Text output.
-   * - `application/json`: JSON response in the candidates.
-   * The model needs to be prompted to output the appropriate response type,
-   * otherwise the behavior is undefined.
-   * This is a preview feature.
-   * 
- * - * string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for responseMimeType. - */ - com.google.protobuf.ByteString getResponseMimeTypeBytes(); - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseSchema field is set. - */ - boolean hasResponseSchema(); - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseSchema. - */ - com.google.cloud.vertexai.api.Schema getResponseSchema(); - - /** - * - * - *
-   * Optional. The `Schema` object allows the definition of input and output
-   * data types. These types can be objects, but also primitives and arrays.
-   * Represents a select subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema).
-   * If set, a compatible response_mime_type must also be set.
-   * Compatible mimetypes:
-   * `application/json`: Schema for JSON response.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.Schema response_schema = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SchemaOrBuilder getResponseSchemaOrBuilder(); - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the responseJsonSchema field is set. - */ - boolean hasResponseJsonSchema(); - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The responseJsonSchema. - */ - com.google.protobuf.Value getResponseJsonSchema(); - - /** - * - * - *
-   * Optional. Output schema of the generated response. This is an alternative
-   * to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
-   *
-   * If set, `response_schema` must be omitted, but `response_mime_type` is
-   * required.
-   *
-   * While the full JSON Schema may be sent, not all features are supported.
-   * Specifically, only the following properties are supported:
-   *
-   * - `$id`
-   * - `$defs`
-   * - `$ref`
-   * - `$anchor`
-   * - `type`
-   * - `format`
-   * - `title`
-   * - `description`
-   * - `enum` (for strings and numbers)
-   * - `items`
-   * - `prefixItems`
-   * - `minItems`
-   * - `maxItems`
-   * - `minimum`
-   * - `maximum`
-   * - `anyOf`
-   * - `oneOf` (interpreted the same as `anyOf`)
-   * - `properties`
-   * - `additionalProperties`
-   * - `required`
-   *
-   * The non-standard `propertyOrdering` property may also be set.
-   *
-   * Cyclic references are unrolled to a limited degree and, as such, may only
-   * be used within non-required properties. (Nullable properties are not
-   * sufficient.) If `$ref` is set on a sub-schema, no other properties, except
-   * for than those starting as a `$`, may be set.
-   * 
- * - * - * optional .google.protobuf.Value response_json_schema = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getResponseJsonSchemaOrBuilder(); - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the routingConfig field is set. - */ - boolean hasRoutingConfig(); - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The routingConfig. - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfig getRoutingConfig(); - - /** - * - * - *
-   * Optional. Routing configuration.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.GenerationConfig.RoutingConfig routing_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GenerationConfig.RoutingConfigOrBuilder getRoutingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the speechConfig field is set. - */ - boolean hasSpeechConfig(); - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The speechConfig. - */ - com.google.cloud.vertexai.api.SpeechConfig getSpeechConfig(); - - /** - * - * - *
-   * Optional. The speech generation config.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SpeechConfig speech_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SpeechConfigOrBuilder getSpeechConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the thinkingConfig field is set. - */ - boolean hasThinkingConfig(); - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The thinkingConfig. - */ - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfig getThinkingConfig(); - - /** - * - * - *
-   * Optional. Config for thinking features.
-   * An error will be returned if this field is set for models that don't
-   * support thinking.
-   * 
- * - * - * .google.cloud.vertexai.v1.GenerationConfig.ThinkingConfig thinking_config = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GenerationConfig.ThinkingConfigOrBuilder - getThinkingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the imageConfig field is set. - */ - boolean hasImageConfig(); - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The imageConfig. - */ - com.google.cloud.vertexai.api.ImageConfig getImageConfig(); - - /** - * - * - *
-   * Optional. Config for image generation features.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.ImageConfig image_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ImageConfigOrBuilder getImageConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java deleted file mode 100644 index 968225a64208..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java +++ /dev/null @@ -1,1665 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/operation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Generic Metadata shared by all operations.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenericOperationMetadata} - */ -@com.google.protobuf.Generated -public final class GenericOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GenericOperationMetadata) - GenericOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GenericOperationMetadata"); - } - - // Use GenericOperationMetadata.newBuilder() to construct. - private GenericOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GenericOperationMetadata() { - partialFailures_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenericOperationMetadata.class, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int PARTIAL_FAILURES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List partialFailures_; - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getPartialFailuresList() { - return partialFailures_; - } - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPartialFailuresOrBuilderList() { - return partialFailures_; - } - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getPartialFailuresCount() { - return partialFailures_.size(); - } - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.rpc.Status getPartialFailures(int index) { - return partialFailures_.get(index); - } - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { - return partialFailures_.get(index); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.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 UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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 { - for (int i = 0; i < partialFailures_.size(); i++) { - output.writeMessage(1, partialFailures_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getUpdateTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < partialFailures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, partialFailures_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.vertexai.api.GenericOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GenericOperationMetadata other = - (com.google.cloud.vertexai.api.GenericOperationMetadata) obj; - - if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; - 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 (getPartialFailuresCount() > 0) { - hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getPartialFailuresList().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.vertexai.api.GenericOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata 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.vertexai.api.GenericOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata 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.vertexai.api.GenericOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GenericOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Generic Metadata shared by all operations.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GenericOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GenericOperationMetadata) - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GenericOperationMetadata.class, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GenericOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPartialFailuresFieldBuilder(); - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (partialFailuresBuilder_ == null) { - partialFailures_ = java.util.Collections.emptyList(); - } else { - partialFailures_ = null; - partialFailuresBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - 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.vertexai.api.OperationProto - .internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata build() { - com.google.cloud.vertexai.api.GenericOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.GenericOperationMetadata result = - new com.google.cloud.vertexai.api.GenericOperationMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GenericOperationMetadata result) { - if (partialFailuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.partialFailures_ = partialFailures_; - } else { - result.partialFailures_ = partialFailuresBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.GenericOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GenericOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.GenericOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GenericOperationMetadata other) { - if (other == com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) - return this; - if (partialFailuresBuilder_ == null) { - if (!other.partialFailures_.isEmpty()) { - if (partialFailures_.isEmpty()) { - partialFailures_ = other.partialFailures_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePartialFailuresIsMutable(); - partialFailures_.addAll(other.partialFailures_); - } - onChanged(); - } - } else { - if (!other.partialFailures_.isEmpty()) { - if (partialFailuresBuilder_.isEmpty()) { - partialFailuresBuilder_.dispose(); - partialFailuresBuilder_ = null; - partialFailures_ = other.partialFailures_; - bitField0_ = (bitField0_ & ~0x00000001); - partialFailuresBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPartialFailuresFieldBuilder() - : null; - } else { - partialFailuresBuilder_.addAllMessages(other.partialFailures_); - } - } - } - 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: - { - com.google.rpc.Status m = - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.add(m); - } else { - partialFailuresBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().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.util.List partialFailures_ = - java.util.Collections.emptyList(); - - private void ensurePartialFailuresIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - partialFailures_ = new java.util.ArrayList(partialFailures_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - partialFailuresBuilder_; - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getPartialFailuresList() { - if (partialFailuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialFailures_); - } else { - return partialFailuresBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getPartialFailuresCount() { - if (partialFailuresBuilder_ == null) { - return partialFailures_.size(); - } else { - return partialFailuresBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.rpc.Status getPartialFailures(int index) { - if (partialFailuresBuilder_ == null) { - return partialFailures_.get(index); - } else { - return partialFailuresBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPartialFailures(int index, com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.set(index, value); - onChanged(); - } else { - partialFailuresBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.set(index, builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPartialFailures(com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.add(value); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPartialFailures(int index, com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.add(index, value); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.add(builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.add(index, builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllPartialFailures( - java.lang.Iterable values) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); - onChanged(); - } else { - partialFailuresBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPartialFailures() { - if (partialFailuresBuilder_ == null) { - partialFailures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - partialFailuresBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removePartialFailures(int index) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.remove(index); - onChanged(); - } else { - partialFailuresBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { - return internalGetPartialFailuresFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { - if (partialFailuresBuilder_ == null) { - return partialFailures_.get(index); - } else { - return partialFailuresBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPartialFailuresOrBuilderList() { - if (partialFailuresBuilder_ != null) { - return partialFailuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialFailures_); - } - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.rpc.Status.Builder addPartialFailuresBuilder() { - return internalGetPartialFailuresFieldBuilder() - .addBuilder(com.google.rpc.Status.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { - return internalGetPartialFailuresFieldBuilder() - .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard Google Cloud error details.
-     * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getPartialFailuresBuilderList() { - return internalGetPartialFailuresFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - internalGetPartialFailuresFieldBuilder() { - if (partialFailuresBuilder_ == null) { - partialFailuresBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Status, - com.google.rpc.Status.Builder, - com.google.rpc.StatusOrBuilder>( - partialFailures_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - partialFailures_ = null; - } - return partialFailuresBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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); - } - if (createTime_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.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. Time when the operation was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * If the operation has finished (successfully or not), this is the finish
-     * time.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GenericOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GenericOperationMetadata) - private static final com.google.cloud.vertexai.api.GenericOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GenericOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.GenericOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GenericOperationMetadata 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.vertexai.api.GenericOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java deleted file mode 100644 index e11d621c4b63..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/operation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GenericOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GenericOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPartialFailuresList(); - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.rpc.Status getPartialFailures(int index); - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPartialFailuresCount(); - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPartialFailuresOrBuilderList(); - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard Google Cloud error details.
-   * 
- * - * - * repeated .google.rpc.Status partial_failures = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * If the operation has finished (successfully or not), this is the finish
-   * time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java deleted file mode 100644 index 0378be715cb9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint]
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GetEndpointRequest} - */ -@com.google.protobuf.Generated -public final class GetEndpointRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GetEndpointRequest) - GetEndpointRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GetEndpointRequest"); - } - - // Use GetEndpointRequest.newBuilder() to construct. - private GetEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GetEndpointRequest() { - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_GetEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GetEndpointRequest.class, - com.google.cloud.vertexai.api.GetEndpointRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint resource.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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 Endpoint resource.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.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.vertexai.api.GetEndpointRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GetEndpointRequest other = - (com.google.cloud.vertexai.api.GetEndpointRequest) 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.vertexai.api.GetEndpointRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest 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.vertexai.api.GetEndpointRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest 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.vertexai.api.GetEndpointRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GetEndpointRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint]
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GetEndpointRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GetEndpointRequest) - com.google.cloud.vertexai.api.GetEndpointRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_GetEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GetEndpointRequest.class, - com.google.cloud.vertexai.api.GetEndpointRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GetEndpointRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_GetEndpointRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GetEndpointRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GetEndpointRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GetEndpointRequest build() { - com.google.cloud.vertexai.api.GetEndpointRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GetEndpointRequest buildPartial() { - com.google.cloud.vertexai.api.GetEndpointRequest result = - new com.google.cloud.vertexai.api.GetEndpointRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GetEndpointRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GetEndpointRequest) { - return mergeFrom((com.google.cloud.vertexai.api.GetEndpointRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GetEndpointRequest other) { - if (other == com.google.cloud.vertexai.api.GetEndpointRequest.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 Endpoint resource.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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 Endpoint resource.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * 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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GetEndpointRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GetEndpointRequest) - private static final com.google.cloud.vertexai.api.GetEndpointRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GetEndpointRequest(); - } - - public static com.google.cloud.vertexai.api.GetEndpointRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetEndpointRequest 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.vertexai.api.GetEndpointRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java deleted file mode 100644 index 1da296c78644..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GetEndpointRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GetEndpointRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint resource.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Required. The name of the Endpoint resource.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * 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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSource.java deleted file mode 100644 index d89c4fbc4ab2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSource.java +++ /dev/null @@ -1,1987 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Google Drive location for the input content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleDriveSource} - */ -@com.google.protobuf.Generated -public final class GoogleDriveSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GoogleDriveSource) - GoogleDriveSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GoogleDriveSource"); - } - - // Use GoogleDriveSource.newBuilder() to construct. - private GoogleDriveSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GoogleDriveSource() { - resourceIds_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleDriveSource.class, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder.class); - } - - public interface ResourceIdOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The type of the Google Drive resource.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for resourceType. - */ - int getResourceTypeValue(); - - /** - * - * - *
-     * Required. The type of the Google Drive resource.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The resourceType. - */ - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType getResourceType(); - - /** - * - * - *
-     * Required. The ID of the Google Drive resource.
-     * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceId. - */ - java.lang.String getResourceId(); - - /** - * - * - *
-     * Required. The ID of the Google Drive resource.
-     * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceId. - */ - com.google.protobuf.ByteString getResourceIdBytes(); - } - - /** - * - * - *
-   * The type and ID of the Google Drive resource.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleDriveSource.ResourceId} - */ - public static final class ResourceId extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId) - ResourceIdOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ResourceId"); - } - - // Use ResourceId.newBuilder() to construct. - private ResourceId(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ResourceId() { - resourceType_ = 0; - resourceId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.class, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder.class); - } - - /** - * - * - *
-     * The type of the Google Drive resource.
-     * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType} - */ - public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Unspecified resource type.
-       * 
- * - * RESOURCE_TYPE_UNSPECIFIED = 0; - */ - RESOURCE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * File resource type.
-       * 
- * - * RESOURCE_TYPE_FILE = 1; - */ - RESOURCE_TYPE_FILE(1), - /** - * - * - *
-       * Folder resource type.
-       * 
- * - * RESOURCE_TYPE_FOLDER = 2; - */ - RESOURCE_TYPE_FOLDER(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ResourceType"); - } - - /** - * - * - *
-       * Unspecified resource type.
-       * 
- * - * RESOURCE_TYPE_UNSPECIFIED = 0; - */ - public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-       * File resource type.
-       * 
- * - * RESOURCE_TYPE_FILE = 1; - */ - public static final int RESOURCE_TYPE_FILE_VALUE = 1; - - /** - * - * - *
-       * Folder resource type.
-       * 
- * - * RESOURCE_TYPE_FOLDER = 2; - */ - public static final int RESOURCE_TYPE_FOLDER_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 ResourceType 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 ResourceType forNumber(int value) { - switch (value) { - case 0: - return RESOURCE_TYPE_UNSPECIFIED; - case 1: - return RESOURCE_TYPE_FILE; - case 2: - return RESOURCE_TYPE_FOLDER; - 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 ResourceType findValueByNumber(int number) { - return ResourceType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final ResourceType[] VALUES = values(); - - public static ResourceType 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 ResourceType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType) - } - - public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; - private int resourceType_ = 0; - - /** - * - * - *
-     * Required. The type of the Google Drive resource.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for resourceType. - */ - @java.lang.Override - public int getResourceTypeValue() { - return resourceType_; - } - - /** - * - * - *
-     * Required. The type of the Google Drive resource.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The resourceType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType - getResourceType() { - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType result = - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType.forNumber( - resourceType_); - return result == null - ? com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType.UNRECOGNIZED - : result; - } - - public static final int RESOURCE_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object resourceId_ = ""; - - /** - * - * - *
-     * Required. The ID of the Google Drive resource.
-     * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceId. - */ - @java.lang.Override - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - 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(); - resourceId_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The ID of the Google Drive resource.
-     * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceId_ = 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 (resourceType_ - != com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType - .RESOURCE_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, resourceType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (resourceType_ - != com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType - .RESOURCE_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resourceType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceId_); - } - 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.vertexai.api.GoogleDriveSource.ResourceId)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId other = - (com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId) obj; - - if (resourceType_ != other.resourceType_) return false; - if (!getResourceId().equals(other.getResourceId())) 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) + resourceType_; - hash = (37 * hash) + RESOURCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getResourceId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId 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.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId 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.vertexai.api.GoogleDriveSource.ResourceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GoogleDriveSource.ResourceId 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The type and ID of the Google Drive resource.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleDriveSource.ResourceId} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId) - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.class, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - resourceType_ = 0; - resourceId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId build() { - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId buildPartial() { - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId result = - new com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.resourceType_ = resourceType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.resourceId_ = resourceId_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId) { - return mergeFrom((com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId other) { - if (other - == com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.getDefaultInstance()) - return this; - if (other.resourceType_ != 0) { - setResourceTypeValue(other.getResourceTypeValue()); - } - if (!other.getResourceId().isEmpty()) { - resourceId_ = other.resourceId_; - 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: - { - resourceType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - resourceId_ = 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 resourceType_ = 0; - - /** - * - * - *
-       * Required. The type of the Google Drive resource.
-       * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for resourceType. - */ - @java.lang.Override - public int getResourceTypeValue() { - return resourceType_; - } - - /** - * - * - *
-       * Required. The type of the Google Drive resource.
-       * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for resourceType to set. - * @return This builder for chaining. - */ - public Builder setResourceTypeValue(int value) { - resourceType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The type of the Google Drive resource.
-       * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The resourceType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType - getResourceType() { - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType result = - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType.forNumber( - resourceType_); - return result == null - ? com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType.UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * Required. The type of the Google Drive resource.
-       * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The resourceType to set. - * @return This builder for chaining. - */ - public Builder setResourceType( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.ResourceType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - resourceType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The type of the Google Drive resource.
-       * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearResourceType() { - bitField0_ = (bitField0_ & ~0x00000001); - resourceType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object resourceId_ = ""; - - /** - * - * - *
-       * Required. The ID of the Google Drive resource.
-       * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The resourceId. - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The ID of the Google Drive resource.
-       * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for resourceId. - */ - public com.google.protobuf.ByteString getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The ID of the Google Drive resource.
-       * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - resourceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The ID of the Google Drive resource.
-       * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearResourceId() { - resourceId_ = getDefaultInstance().getResourceId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The ID of the Google Drive resource.
-       * 
- * - * string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - resourceId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GoogleDriveSource.ResourceId) - private static final com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId(); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourceId 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.vertexai.api.GoogleDriveSource.ResourceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int RESOURCE_IDS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List resourceIds_; - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getResourceIdsList() { - return resourceIds_; - } - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder> - getResourceIdsOrBuilderList() { - return resourceIds_; - } - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getResourceIdsCount() { - return resourceIds_.size(); - } - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId getResourceIds(int index) { - return resourceIds_.get(index); - } - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder - getResourceIdsOrBuilder(int index) { - return resourceIds_.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 < resourceIds_.size(); i++) { - output.writeMessage(1, resourceIds_.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 < resourceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resourceIds_.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.vertexai.api.GoogleDriveSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GoogleDriveSource other = - (com.google.cloud.vertexai.api.GoogleDriveSource) obj; - - if (!getResourceIdsList().equals(other.getResourceIdsList())) 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 (getResourceIdsCount() > 0) { - hash = (37 * hash) + RESOURCE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getResourceIdsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource 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.vertexai.api.GoogleDriveSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource 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.vertexai.api.GoogleDriveSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GoogleDriveSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Google Drive location for the input content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleDriveSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GoogleDriveSource) - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleDriveSource.class, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GoogleDriveSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (resourceIdsBuilder_ == null) { - resourceIds_ = java.util.Collections.emptyList(); - } else { - resourceIds_ = null; - resourceIdsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource build() { - com.google.cloud.vertexai.api.GoogleDriveSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource buildPartial() { - com.google.cloud.vertexai.api.GoogleDriveSource result = - new com.google.cloud.vertexai.api.GoogleDriveSource(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GoogleDriveSource result) { - if (resourceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - resourceIds_ = java.util.Collections.unmodifiableList(resourceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resourceIds_ = resourceIds_; - } else { - result.resourceIds_ = resourceIdsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.GoogleDriveSource result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GoogleDriveSource) { - return mergeFrom((com.google.cloud.vertexai.api.GoogleDriveSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GoogleDriveSource other) { - if (other == com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance()) - return this; - if (resourceIdsBuilder_ == null) { - if (!other.resourceIds_.isEmpty()) { - if (resourceIds_.isEmpty()) { - resourceIds_ = other.resourceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourceIdsIsMutable(); - resourceIds_.addAll(other.resourceIds_); - } - onChanged(); - } - } else { - if (!other.resourceIds_.isEmpty()) { - if (resourceIdsBuilder_.isEmpty()) { - resourceIdsBuilder_.dispose(); - resourceIdsBuilder_ = null; - resourceIds_ = other.resourceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - resourceIdsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetResourceIdsFieldBuilder() - : null; - } else { - resourceIdsBuilder_.addAllMessages(other.resourceIds_); - } - } - } - 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.vertexai.api.GoogleDriveSource.ResourceId m = - input.readMessage( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.parser(), - extensionRegistry); - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - resourceIds_.add(m); - } else { - resourceIdsBuilder_.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 - resourceIds_ = java.util.Collections.emptyList(); - - private void ensureResourceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resourceIds_ = - new java.util.ArrayList( - resourceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder> - resourceIdsBuilder_; - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getResourceIdsList() { - if (resourceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(resourceIds_); - } else { - return resourceIdsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getResourceIdsCount() { - if (resourceIdsBuilder_ == null) { - return resourceIds_.size(); - } else { - return resourceIdsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId getResourceIds(int index) { - if (resourceIdsBuilder_ == null) { - return resourceIds_.get(index); - } else { - return resourceIdsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setResourceIds( - int index, com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId value) { - if (resourceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceIdsIsMutable(); - resourceIds_.set(index, value); - onChanged(); - } else { - resourceIdsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setResourceIds( - int index, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder builderForValue) { - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - resourceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - resourceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addResourceIds( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId value) { - if (resourceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceIdsIsMutable(); - resourceIds_.add(value); - onChanged(); - } else { - resourceIdsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addResourceIds( - int index, com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId value) { - if (resourceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceIdsIsMutable(); - resourceIds_.add(index, value); - onChanged(); - } else { - resourceIdsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addResourceIds( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder builderForValue) { - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - resourceIds_.add(builderForValue.build()); - onChanged(); - } else { - resourceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addResourceIds( - int index, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder builderForValue) { - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - resourceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - resourceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllResourceIds( - java.lang.Iterable - values) { - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceIds_); - onChanged(); - } else { - resourceIdsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearResourceIds() { - if (resourceIdsBuilder_ == null) { - resourceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resourceIdsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeResourceIds(int index) { - if (resourceIdsBuilder_ == null) { - ensureResourceIdsIsMutable(); - resourceIds_.remove(index); - onChanged(); - } else { - resourceIdsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder getResourceIdsBuilder( - int index) { - return internalGetResourceIdsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder - getResourceIdsOrBuilder(int index) { - if (resourceIdsBuilder_ == null) { - return resourceIds_.get(index); - } else { - return resourceIdsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder> - getResourceIdsOrBuilderList() { - if (resourceIdsBuilder_ != null) { - return resourceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resourceIds_); - } - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder - addResourceIdsBuilder() { - return internalGetResourceIdsFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder addResourceIdsBuilder( - int index) { - return internalGetResourceIdsFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. Google Drive resource IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getResourceIdsBuilderList() { - return internalGetResourceIdsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder> - internalGetResourceIdsFieldBuilder() { - if (resourceIdsBuilder_ == null) { - resourceIdsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId.Builder, - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder>( - resourceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - resourceIds_ = null; - } - return resourceIdsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GoogleDriveSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GoogleDriveSource) - private static final com.google.cloud.vertexai.api.GoogleDriveSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GoogleDriveSource(); - } - - public static com.google.cloud.vertexai.api.GoogleDriveSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GoogleDriveSource 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.vertexai.api.GoogleDriveSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSourceOrBuilder.java deleted file mode 100644 index f0e458e63698..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleDriveSourceOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GoogleDriveSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GoogleDriveSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getResourceIdsList(); - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceId getResourceIds(int index); - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getResourceIdsCount(); - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getResourceIdsOrBuilderList(); - - /** - * - * - *
-   * Required. Google Drive resource IDs.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GoogleDriveSource.ResourceIdOrBuilder getResourceIdsOrBuilder( - int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMaps.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMaps.java deleted file mode 100644 index 17e1f4e9d5b5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMaps.java +++ /dev/null @@ -1,501 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool to retrieve public maps data for grounding, powered by Google.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleMaps} - */ -@com.google.protobuf.Generated -public final class GoogleMaps extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GoogleMaps) - GoogleMapsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GoogleMaps"); - } - - // Use GoogleMaps.newBuilder() to construct. - private GoogleMaps(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GoogleMaps() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleMaps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleMaps.class, - com.google.cloud.vertexai.api.GoogleMaps.Builder.class); - } - - public static final int ENABLE_WIDGET_FIELD_NUMBER = 1; - private boolean enableWidget_ = false; - - /** - * - * - *
-   * If true, include the widget context token in the response.
-   * 
- * - * bool enable_widget = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableWidget. - */ - @java.lang.Override - public boolean getEnableWidget() { - return enableWidget_; - } - - 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 (enableWidget_ != false) { - output.writeBool(1, enableWidget_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableWidget_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableWidget_); - } - 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.vertexai.api.GoogleMaps)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GoogleMaps other = (com.google.cloud.vertexai.api.GoogleMaps) obj; - - if (getEnableWidget() != other.getEnableWidget()) 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) + ENABLE_WIDGET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableWidget()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleMaps 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.vertexai.api.GoogleMaps parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleMaps 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.vertexai.api.GoogleMaps parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleMaps parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GoogleMaps 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool to retrieve public maps data for grounding, powered by Google.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleMaps} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GoogleMaps) - com.google.cloud.vertexai.api.GoogleMapsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleMaps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleMaps.class, - com.google.cloud.vertexai.api.GoogleMaps.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GoogleMaps.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enableWidget_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleMaps getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleMaps build() { - com.google.cloud.vertexai.api.GoogleMaps result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleMaps buildPartial() { - com.google.cloud.vertexai.api.GoogleMaps result = - new com.google.cloud.vertexai.api.GoogleMaps(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GoogleMaps result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enableWidget_ = enableWidget_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GoogleMaps) { - return mergeFrom((com.google.cloud.vertexai.api.GoogleMaps) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GoogleMaps other) { - if (other == com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance()) return this; - if (other.getEnableWidget() != false) { - setEnableWidget(other.getEnableWidget()); - } - 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: - { - enableWidget_ = input.readBool(); - 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 boolean enableWidget_; - - /** - * - * - *
-     * If true, include the widget context token in the response.
-     * 
- * - * bool enable_widget = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableWidget. - */ - @java.lang.Override - public boolean getEnableWidget() { - return enableWidget_; - } - - /** - * - * - *
-     * If true, include the widget context token in the response.
-     * 
- * - * bool enable_widget = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableWidget to set. - * @return This builder for chaining. - */ - public Builder setEnableWidget(boolean value) { - - enableWidget_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * If true, include the widget context token in the response.
-     * 
- * - * bool enable_widget = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableWidget() { - bitField0_ = (bitField0_ & ~0x00000001); - enableWidget_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GoogleMaps) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GoogleMaps) - private static final com.google.cloud.vertexai.api.GoogleMaps DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GoogleMaps(); - } - - public static com.google.cloud.vertexai.api.GoogleMaps getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GoogleMaps 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.vertexai.api.GoogleMaps getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMapsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMapsOrBuilder.java deleted file mode 100644 index 7825e4b07c4d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleMapsOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GoogleMapsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GoogleMaps) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * If true, include the widget context token in the response.
-   * 
- * - * bool enable_widget = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableWidget. - */ - boolean getEnableWidget(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrieval.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrieval.java deleted file mode 100644 index 60f872ba15aa..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrieval.java +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool to retrieve public web data for grounding, powered by Google.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleSearchRetrieval} - */ -@com.google.protobuf.Generated -public final class GoogleSearchRetrieval extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GoogleSearchRetrieval) - GoogleSearchRetrievalOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GoogleSearchRetrieval"); - } - - // Use GoogleSearchRetrieval.newBuilder() to construct. - private GoogleSearchRetrieval(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GoogleSearchRetrieval() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleSearchRetrieval.class, - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder.class); - } - - private int bitField0_; - public static final int DYNAMIC_RETRIEVAL_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.DynamicRetrievalConfig dynamicRetrievalConfig_; - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return Whether the dynamicRetrievalConfig field is set. - */ - @java.lang.Override - public boolean hasDynamicRetrievalConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return The dynamicRetrievalConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfig getDynamicRetrievalConfig() { - return dynamicRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance() - : dynamicRetrievalConfig_; - } - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder - getDynamicRetrievalConfigOrBuilder() { - return dynamicRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance() - : dynamicRetrievalConfig_; - } - - 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.writeMessage(2, getDynamicRetrievalConfig()); - } - 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.computeMessageSize(2, getDynamicRetrievalConfig()); - } - 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.vertexai.api.GoogleSearchRetrieval)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GoogleSearchRetrieval other = - (com.google.cloud.vertexai.api.GoogleSearchRetrieval) obj; - - if (hasDynamicRetrievalConfig() != other.hasDynamicRetrievalConfig()) return false; - if (hasDynamicRetrievalConfig()) { - if (!getDynamicRetrievalConfig().equals(other.getDynamicRetrievalConfig())) 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 (hasDynamicRetrievalConfig()) { - hash = (37 * hash) + DYNAMIC_RETRIEVAL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDynamicRetrievalConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval 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.vertexai.api.GoogleSearchRetrieval parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval 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.vertexai.api.GoogleSearchRetrieval parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GoogleSearchRetrieval 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool to retrieve public web data for grounding, powered by Google.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GoogleSearchRetrieval} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GoogleSearchRetrieval) - com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GoogleSearchRetrieval.class, - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GoogleSearchRetrieval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDynamicRetrievalConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dynamicRetrievalConfig_ = null; - if (dynamicRetrievalConfigBuilder_ != null) { - dynamicRetrievalConfigBuilder_.dispose(); - dynamicRetrievalConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleSearchRetrieval getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleSearchRetrieval build() { - com.google.cloud.vertexai.api.GoogleSearchRetrieval result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleSearchRetrieval buildPartial() { - com.google.cloud.vertexai.api.GoogleSearchRetrieval result = - new com.google.cloud.vertexai.api.GoogleSearchRetrieval(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GoogleSearchRetrieval result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dynamicRetrievalConfig_ = - dynamicRetrievalConfigBuilder_ == null - ? dynamicRetrievalConfig_ - : dynamicRetrievalConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GoogleSearchRetrieval) { - return mergeFrom((com.google.cloud.vertexai.api.GoogleSearchRetrieval) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GoogleSearchRetrieval other) { - if (other == com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance()) - return this; - if (other.hasDynamicRetrievalConfig()) { - mergeDynamicRetrievalConfig(other.getDynamicRetrievalConfig()); - } - 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: - { - input.readMessage( - internalGetDynamicRetrievalConfigFieldBuilder().getBuilder(), - extensionRegistry); - 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 com.google.cloud.vertexai.api.DynamicRetrievalConfig dynamicRetrievalConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DynamicRetrievalConfig, - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder, - com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder> - dynamicRetrievalConfigBuilder_; - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return Whether the dynamicRetrievalConfig field is set. - */ - public boolean hasDynamicRetrievalConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return The dynamicRetrievalConfig. - */ - public com.google.cloud.vertexai.api.DynamicRetrievalConfig getDynamicRetrievalConfig() { - if (dynamicRetrievalConfigBuilder_ == null) { - return dynamicRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance() - : dynamicRetrievalConfig_; - } else { - return dynamicRetrievalConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public Builder setDynamicRetrievalConfig( - com.google.cloud.vertexai.api.DynamicRetrievalConfig value) { - if (dynamicRetrievalConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dynamicRetrievalConfig_ = value; - } else { - dynamicRetrievalConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public Builder setDynamicRetrievalConfig( - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder builderForValue) { - if (dynamicRetrievalConfigBuilder_ == null) { - dynamicRetrievalConfig_ = builderForValue.build(); - } else { - dynamicRetrievalConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public Builder mergeDynamicRetrievalConfig( - com.google.cloud.vertexai.api.DynamicRetrievalConfig value) { - if (dynamicRetrievalConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && dynamicRetrievalConfig_ != null - && dynamicRetrievalConfig_ - != com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance()) { - getDynamicRetrievalConfigBuilder().mergeFrom(value); - } else { - dynamicRetrievalConfig_ = value; - } - } else { - dynamicRetrievalConfigBuilder_.mergeFrom(value); - } - if (dynamicRetrievalConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public Builder clearDynamicRetrievalConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - dynamicRetrievalConfig_ = null; - if (dynamicRetrievalConfigBuilder_ != null) { - dynamicRetrievalConfigBuilder_.dispose(); - dynamicRetrievalConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder - getDynamicRetrievalConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetDynamicRetrievalConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - public com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder - getDynamicRetrievalConfigOrBuilder() { - if (dynamicRetrievalConfigBuilder_ != null) { - return dynamicRetrievalConfigBuilder_.getMessageOrBuilder(); - } else { - return dynamicRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.DynamicRetrievalConfig.getDefaultInstance() - : dynamicRetrievalConfig_; - } - } - - /** - * - * - *
-     * Specifies the dynamic retrieval configuration for the given source.
-     * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DynamicRetrievalConfig, - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder, - com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder> - internalGetDynamicRetrievalConfigFieldBuilder() { - if (dynamicRetrievalConfigBuilder_ == null) { - dynamicRetrievalConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DynamicRetrievalConfig, - com.google.cloud.vertexai.api.DynamicRetrievalConfig.Builder, - com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder>( - getDynamicRetrievalConfig(), getParentForChildren(), isClean()); - dynamicRetrievalConfig_ = null; - } - return dynamicRetrievalConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GoogleSearchRetrieval) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GoogleSearchRetrieval) - private static final com.google.cloud.vertexai.api.GoogleSearchRetrieval DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GoogleSearchRetrieval(); - } - - public static com.google.cloud.vertexai.api.GoogleSearchRetrieval getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GoogleSearchRetrieval 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.vertexai.api.GoogleSearchRetrieval getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrievalOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrievalOrBuilder.java deleted file mode 100644 index 11a99d39d86a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GoogleSearchRetrievalOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GoogleSearchRetrievalOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GoogleSearchRetrieval) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return Whether the dynamicRetrievalConfig field is set. - */ - boolean hasDynamicRetrievalConfig(); - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - * - * @return The dynamicRetrievalConfig. - */ - com.google.cloud.vertexai.api.DynamicRetrievalConfig getDynamicRetrievalConfig(); - - /** - * - * - *
-   * Specifies the dynamic retrieval configuration for the given source.
-   * 
- * - * .google.cloud.vertexai.v1.DynamicRetrievalConfig dynamic_retrieval_config = 2; - */ - com.google.cloud.vertexai.api.DynamicRetrievalConfigOrBuilder - getDynamicRetrievalConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunk.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunk.java deleted file mode 100644 index d08370588433..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunk.java +++ /dev/null @@ -1,8344 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Grounding chunk.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk} - */ -@com.google.protobuf.Generated -public final class GroundingChunk extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk) - GroundingChunkOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GroundingChunk"); - } - - // Use GroundingChunk.newBuilder() to construct. - private GroundingChunk(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GroundingChunk() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.class, - com.google.cloud.vertexai.api.GroundingChunk.Builder.class); - } - - public interface WebOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk.Web) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - boolean hasUri(); - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - boolean hasTitle(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - } - - /** - * - * - *
-   * Chunk from the web.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Web} - */ - public static final class Web extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk.Web) - WebOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Web"); - } - - // Use Web.newBuilder() to construct. - private Web(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Web() { - uri_ = ""; - title_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Web.class, - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder.class); - } - - private int bitField0_; - public static final int URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional 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 reference of the chunk.
-     * 
- * - * optional 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 TITLE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - @java.lang.Override - public boolean hasTitle() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); - } - 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.GeneratedMessage.computeStringSize(1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); - } - 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.vertexai.api.GroundingChunk.Web)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk.Web other = - (com.google.cloud.vertexai.api.GroundingChunk.Web) obj; - - if (hasUri() != other.hasUri()) return false; - if (hasUri()) { - if (!getUri().equals(other.getUri())) return false; - } - if (hasTitle() != other.hasTitle()) return false; - if (hasTitle()) { - if (!getTitle().equals(other.getTitle())) 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 (hasUri()) { - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - } - if (hasTitle()) { - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web 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.vertexai.api.GroundingChunk.Web parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web 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.vertexai.api.GroundingChunk.Web parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk.Web 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Chunk from the web.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Web} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk.Web) - com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Web.class, - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingChunk.Web.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - title_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Web_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Web getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Web build() { - com.google.cloud.vertexai.api.GroundingChunk.Web result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Web buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk.Web result = - new com.google.cloud.vertexai.api.GroundingChunk.Web(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GroundingChunk.Web result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingChunk.Web) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingChunk.Web) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GroundingChunk.Web other) { - if (other == com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance()) - return this; - if (other.hasUri()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasTitle()) { - title_ = other.title_; - 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: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - title_ = 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 uri_ = ""; - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional 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 title_ = ""; - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - public boolean hasTitle() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk.Web) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk.Web) - private static final com.google.cloud.vertexai.api.GroundingChunk.Web DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingChunk.Web(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Web getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Web 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.vertexai.api.GroundingChunk.Web getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface RetrievedContextOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk.RetrievedContext) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return Whether the ragChunk field is set. - */ - boolean hasRagChunk(); - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return The ragChunk. - */ - com.google.cloud.vertexai.api.RagChunk getRagChunk(); - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - com.google.cloud.vertexai.api.RagChunkOrBuilder getRagChunkOrBuilder(); - - /** - * - * - *
-     * URI reference of the attribution.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - boolean hasUri(); - - /** - * - * - *
-     * URI reference of the attribution.
-     * 
- * - * optional string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); - - /** - * - * - *
-     * URI reference of the attribution.
-     * 
- * - * optional string uri = 1; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - boolean hasTitle(); - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - boolean hasText(); - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return The text. - */ - java.lang.String getText(); - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the documentName field is set. - */ - boolean hasDocumentName(); - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The documentName. - */ - java.lang.String getDocumentName(); - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for documentName. - */ - com.google.protobuf.ByteString getDocumentNameBytes(); - - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.ContextDetailsCase - getContextDetailsCase(); - } - - /** - * - * - *
-   * Chunk from context retrieved by the retrieval tools.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.RetrievedContext} - */ - public static final class RetrievedContext extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk.RetrievedContext) - RetrievedContextOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RetrievedContext"); - } - - // Use RetrievedContext.newBuilder() to construct. - private RetrievedContext(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RetrievedContext() { - uri_ = ""; - title_ = ""; - text_ = ""; - documentName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.class, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder.class); - } - - private int bitField0_; - private int contextDetailsCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object contextDetails_; - - public enum ContextDetailsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RAG_CHUNK(4), - CONTEXTDETAILS_NOT_SET(0); - private final int value; - - private ContextDetailsCase(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 ContextDetailsCase valueOf(int value) { - return forNumber(value); - } - - public static ContextDetailsCase forNumber(int value) { - switch (value) { - case 4: - return RAG_CHUNK; - case 0: - return CONTEXTDETAILS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ContextDetailsCase getContextDetailsCase() { - return ContextDetailsCase.forNumber(contextDetailsCase_); - } - - public static final int RAG_CHUNK_FIELD_NUMBER = 4; - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return Whether the ragChunk field is set. - */ - @java.lang.Override - public boolean hasRagChunk() { - return contextDetailsCase_ == 4; - } - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return The ragChunk. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk getRagChunk() { - if (contextDetailsCase_ == 4) { - return (com.google.cloud.vertexai.api.RagChunk) contextDetails_; - } - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - - /** - * - * - *
-     * Additional context for the RAG retrieval result. This is only populated
-     * when using the RAG retrieval tool.
-     * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunkOrBuilder getRagChunkOrBuilder() { - if (contextDetailsCase_ == 4) { - return (com.google.cloud.vertexai.api.RagChunk) contextDetails_; - } - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - - public static final int URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - - /** - * - * - *
-     * URI reference of the attribution.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * URI reference of the attribution.
-     * 
- * - * optional 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 reference of the attribution.
-     * 
- * - * optional 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 TITLE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - @java.lang.Override - public boolean hasTitle() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-     * Title of the attribution.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TEXT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - @java.lang.Override - public boolean hasText() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - - /** - * - * - *
-     * Text of the attribution.
-     * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DOCUMENT_NAME_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object documentName_ = ""; - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the documentName field is set. - */ - @java.lang.Override - public boolean hasDocumentName() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The documentName. - */ - @java.lang.Override - public java.lang.String getDocumentName() { - java.lang.Object ref = documentName_; - 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(); - documentName_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. The full document name for the referenced Vertex AI Search
-     * document.
-     * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for documentName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentNameBytes() { - java.lang.Object ref = documentName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentName_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, text_); - } - if (contextDetailsCase_ == 4) { - output.writeMessage(4, (com.google.cloud.vertexai.api.RagChunk) contextDetails_); - } - if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, documentName_); - } - 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.GeneratedMessage.computeStringSize(1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, text_); - } - if (contextDetailsCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.RagChunk) contextDetails_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, documentName_); - } - 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.vertexai.api.GroundingChunk.RetrievedContext)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext other = - (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) obj; - - if (hasUri() != other.hasUri()) return false; - if (hasUri()) { - if (!getUri().equals(other.getUri())) return false; - } - if (hasTitle() != other.hasTitle()) return false; - if (hasTitle()) { - if (!getTitle().equals(other.getTitle())) return false; - } - if (hasText() != other.hasText()) return false; - if (hasText()) { - if (!getText().equals(other.getText())) return false; - } - if (hasDocumentName() != other.hasDocumentName()) return false; - if (hasDocumentName()) { - if (!getDocumentName().equals(other.getDocumentName())) return false; - } - if (!getContextDetailsCase().equals(other.getContextDetailsCase())) return false; - switch (contextDetailsCase_) { - case 4: - if (!getRagChunk().equals(other.getRagChunk())) 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 (hasUri()) { - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - } - if (hasTitle()) { - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - } - if (hasText()) { - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - } - if (hasDocumentName()) { - hash = (37 * hash) + DOCUMENT_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDocumentName().hashCode(); - } - switch (contextDetailsCase_) { - case 4: - hash = (37 * hash) + RAG_CHUNK_FIELD_NUMBER; - hash = (53 * hash) + getRagChunk().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext 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.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext 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.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk.RetrievedContext 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Chunk from context retrieved by the retrieval tools.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.RetrievedContext} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk.RetrievedContext) - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.class, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (ragChunkBuilder_ != null) { - ragChunkBuilder_.clear(); - } - uri_ = ""; - title_ = ""; - text_ = ""; - documentName_ = ""; - contextDetailsCase_ = 0; - contextDetails_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_RetrievedContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext build() { - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext result = - new com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.text_ = text_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.documentName_ = documentName_; - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext result) { - result.contextDetailsCase_ = contextDetailsCase_; - result.contextDetails_ = this.contextDetails_; - if (contextDetailsCase_ == 4 && ragChunkBuilder_ != null) { - result.contextDetails_ = ragChunkBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext other) { - if (other - == com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance()) - return this; - if (other.hasUri()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasTitle()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasText()) { - text_ = other.text_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasDocumentName()) { - documentName_ = other.documentName_; - bitField0_ |= 0x00000010; - onChanged(); - } - switch (other.getContextDetailsCase()) { - case RAG_CHUNK: - { - mergeRagChunk(other.getRagChunk()); - break; - } - case CONTEXTDETAILS_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: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 10 - case 18: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 26: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetRagChunkFieldBuilder().getBuilder(), extensionRegistry); - contextDetailsCase_ = 4; - break; - } // case 34 - case 50: - { - documentName_ = 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 contextDetailsCase_ = 0; - private java.lang.Object contextDetails_; - - public ContextDetailsCase getContextDetailsCase() { - return ContextDetailsCase.forNumber(contextDetailsCase_); - } - - public Builder clearContextDetails() { - contextDetailsCase_ = 0; - contextDetails_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk, - com.google.cloud.vertexai.api.RagChunk.Builder, - com.google.cloud.vertexai.api.RagChunkOrBuilder> - ragChunkBuilder_; - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return Whether the ragChunk field is set. - */ - @java.lang.Override - public boolean hasRagChunk() { - return contextDetailsCase_ == 4; - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - * - * @return The ragChunk. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk getRagChunk() { - if (ragChunkBuilder_ == null) { - if (contextDetailsCase_ == 4) { - return (com.google.cloud.vertexai.api.RagChunk) contextDetails_; - } - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } else { - if (contextDetailsCase_ == 4) { - return ragChunkBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - public Builder setRagChunk(com.google.cloud.vertexai.api.RagChunk value) { - if (ragChunkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextDetails_ = value; - onChanged(); - } else { - ragChunkBuilder_.setMessage(value); - } - contextDetailsCase_ = 4; - return this; - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - public Builder setRagChunk(com.google.cloud.vertexai.api.RagChunk.Builder builderForValue) { - if (ragChunkBuilder_ == null) { - contextDetails_ = builderForValue.build(); - onChanged(); - } else { - ragChunkBuilder_.setMessage(builderForValue.build()); - } - contextDetailsCase_ = 4; - return this; - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - public Builder mergeRagChunk(com.google.cloud.vertexai.api.RagChunk value) { - if (ragChunkBuilder_ == null) { - if (contextDetailsCase_ == 4 - && contextDetails_ != com.google.cloud.vertexai.api.RagChunk.getDefaultInstance()) { - contextDetails_ = - com.google.cloud.vertexai.api.RagChunk.newBuilder( - (com.google.cloud.vertexai.api.RagChunk) contextDetails_) - .mergeFrom(value) - .buildPartial(); - } else { - contextDetails_ = value; - } - onChanged(); - } else { - if (contextDetailsCase_ == 4) { - ragChunkBuilder_.mergeFrom(value); - } else { - ragChunkBuilder_.setMessage(value); - } - } - contextDetailsCase_ = 4; - return this; - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - public Builder clearRagChunk() { - if (ragChunkBuilder_ == null) { - if (contextDetailsCase_ == 4) { - contextDetailsCase_ = 0; - contextDetails_ = null; - onChanged(); - } - } else { - if (contextDetailsCase_ == 4) { - contextDetailsCase_ = 0; - contextDetails_ = null; - } - ragChunkBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - public com.google.cloud.vertexai.api.RagChunk.Builder getRagChunkBuilder() { - return internalGetRagChunkFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunkOrBuilder getRagChunkOrBuilder() { - if ((contextDetailsCase_ == 4) && (ragChunkBuilder_ != null)) { - return ragChunkBuilder_.getMessageOrBuilder(); - } else { - if (contextDetailsCase_ == 4) { - return (com.google.cloud.vertexai.api.RagChunk) contextDetails_; - } - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - } - - /** - * - * - *
-       * Additional context for the RAG retrieval result. This is only populated
-       * when using the RAG retrieval tool.
-       * 
- * - * .google.cloud.vertexai.v1.RagChunk rag_chunk = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk, - com.google.cloud.vertexai.api.RagChunk.Builder, - com.google.cloud.vertexai.api.RagChunkOrBuilder> - internalGetRagChunkFieldBuilder() { - if (ragChunkBuilder_ == null) { - if (!(contextDetailsCase_ == 4)) { - contextDetails_ = com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - ragChunkBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk, - com.google.cloud.vertexai.api.RagChunk.Builder, - com.google.cloud.vertexai.api.RagChunkOrBuilder>( - (com.google.cloud.vertexai.api.RagChunk) contextDetails_, - getParentForChildren(), - isClean()); - contextDetails_ = null; - } - contextDetailsCase_ = 4; - onChanged(); - return ragChunkBuilder_; - } - - private java.lang.Object uri_ = ""; - - /** - * - * - *
-       * URI reference of the attribution.
-       * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * URI reference of the attribution.
-       * 
- * - * optional 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 reference of the attribution.
-       * 
- * - * optional 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 reference of the attribution.
-       * 
- * - * optional 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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * URI reference of the attribution.
-       * 
- * - * optional string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * URI reference of the attribution.
-       * 
- * - * optional 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_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object title_ = ""; - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - public boolean hasTitle() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the attribution.
-       * 
- * - * optional string title = 2; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object text_ = ""; - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - public boolean hasText() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - text_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-       * Text of the attribution.
-       * 
- * - * optional string text = 3; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - text_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object documentName_ = ""; - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the documentName field is set. - */ - public boolean hasDocumentName() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The documentName. - */ - public java.lang.String getDocumentName() { - java.lang.Object ref = documentName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for documentName. - */ - public com.google.protobuf.ByteString getDocumentNameBytes() { - java.lang.Object ref = documentName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - documentName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The documentName to set. - * @return This builder for chaining. - */ - public Builder setDocumentName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - documentName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDocumentName() { - documentName_ = getDefaultInstance().getDocumentName(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The full document name for the referenced Vertex AI Search
-       * document.
-       * 
- * - * optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for documentName to set. - * @return This builder for chaining. - */ - public Builder setDocumentNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - documentName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk.RetrievedContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk.RetrievedContext) - private static final com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RetrievedContext 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.vertexai.api.GroundingChunk.RetrievedContext - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface MapsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk.Maps) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - boolean hasUri(); - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - boolean hasTitle(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - boolean hasText(); - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return The text. - */ - java.lang.String getText(); - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return Whether the placeId field is set. - */ - boolean hasPlaceId(); - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return The placeId. - */ - java.lang.String getPlaceId(); - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return The bytes for placeId. - */ - com.google.protobuf.ByteString getPlaceIdBytes(); - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return Whether the placeAnswerSources field is set. - */ - boolean hasPlaceAnswerSources(); - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return The placeAnswerSources. - */ - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources getPlaceAnswerSources(); - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder - getPlaceAnswerSourcesOrBuilder(); - } - - /** - * - * - *
-   * Chunk from Google Maps.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Maps} - */ - public static final class Maps extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk.Maps) - MapsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Maps"); - } - - // Use Maps.newBuilder() to construct. - private Maps(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Maps() { - uri_ = ""; - title_ = ""; - text_ = ""; - placeId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder.class); - } - - public interface PlaceAnswerSourcesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - java.util.List< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet> - getReviewSnippetsList(); - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - getReviewSnippets(int index); - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - int getReviewSnippetsCount(); - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder> - getReviewSnippetsOrBuilderList(); - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippetOrBuilder - getReviewSnippetsOrBuilder(int index); - } - - /** Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources} */ - public static final class PlaceAnswerSources extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources) - PlaceAnswerSourcesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PlaceAnswerSources"); - } - - // Use PlaceAnswerSources.newBuilder() to construct. - private PlaceAnswerSources(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PlaceAnswerSources() { - reviewSnippets_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder.class); - } - - public interface ReviewSnippetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-         * Id of the review referencing the place.
-         * 
- * - * string review_id = 1; - * - * @return The reviewId. - */ - java.lang.String getReviewId(); - - /** - * - * - *
-         * Id of the review referencing the place.
-         * 
- * - * string review_id = 1; - * - * @return The bytes for reviewId. - */ - com.google.protobuf.ByteString getReviewIdBytes(); - - /** - * - * - *
-         * A link to show the review on Google Maps.
-         * 
- * - * string google_maps_uri = 2; - * - * @return The googleMapsUri. - */ - java.lang.String getGoogleMapsUri(); - - /** - * - * - *
-         * A link to show the review on Google Maps.
-         * 
- * - * string google_maps_uri = 2; - * - * @return The bytes for googleMapsUri. - */ - com.google.protobuf.ByteString getGoogleMapsUriBytes(); - - /** - * - * - *
-         * Title of the review.
-         * 
- * - * string title = 3; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-         * Title of the review.
-         * 
- * - * string title = 3; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - } - - /** - * - * - *
-       * Encapsulates a review snippet.
-       * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet} - */ - public static final class ReviewSnippet extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - ReviewSnippetOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ReviewSnippet"); - } - - // Use ReviewSnippet.newBuilder() to construct. - private ReviewSnippet(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ReviewSnippet() { - reviewId_ = ""; - googleMapsUri_ = ""; - title_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder.class); - } - - public static final int REVIEW_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object reviewId_ = ""; - - /** - * - * - *
-         * Id of the review referencing the place.
-         * 
- * - * string review_id = 1; - * - * @return The reviewId. - */ - @java.lang.Override - public java.lang.String getReviewId() { - java.lang.Object ref = reviewId_; - 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(); - reviewId_ = s; - return s; - } - } - - /** - * - * - *
-         * Id of the review referencing the place.
-         * 
- * - * string review_id = 1; - * - * @return The bytes for reviewId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getReviewIdBytes() { - java.lang.Object ref = reviewId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reviewId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GOOGLE_MAPS_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object googleMapsUri_ = ""; - - /** - * - * - *
-         * A link to show the review on Google Maps.
-         * 
- * - * string google_maps_uri = 2; - * - * @return The googleMapsUri. - */ - @java.lang.Override - public java.lang.String getGoogleMapsUri() { - java.lang.Object ref = googleMapsUri_; - 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(); - googleMapsUri_ = s; - return s; - } - } - - /** - * - * - *
-         * A link to show the review on Google Maps.
-         * 
- * - * string google_maps_uri = 2; - * - * @return The bytes for googleMapsUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGoogleMapsUriBytes() { - java.lang.Object ref = googleMapsUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - googleMapsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TITLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-         * Title of the review.
-         * 
- * - * string title = 3; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-         * Title of the review.
-         * 
- * - * string title = 3; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = 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.GeneratedMessage.isStringEmpty(reviewId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, reviewId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleMapsUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, googleMapsUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(reviewId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, reviewId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleMapsUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, googleMapsUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); - } - 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet other = - (com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - obj; - - if (!getReviewId().equals(other.getReviewId())) return false; - if (!getGoogleMapsUri().equals(other.getGoogleMapsUri())) return false; - if (!getTitle().equals(other.getTitle())) 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) + REVIEW_ID_FIELD_NUMBER; - hash = (53 * hash) + getReviewId().hashCode(); - hash = (37 * hash) + GOOGLE_MAPS_URI_FIELD_NUMBER; - hash = (53 * hash) + getGoogleMapsUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-         * Encapsulates a review snippet.
-         * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - reviewId_ = ""; - googleMapsUri_ = ""; - title_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_ReviewSnippet_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - build() { - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - result = - new com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.reviewId_ = reviewId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.googleMapsUri_ = googleMapsUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet) { - return mergeFrom( - (com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - other) { - if (other - == com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.getDefaultInstance()) return this; - if (!other.getReviewId().isEmpty()) { - reviewId_ = other.reviewId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getGoogleMapsUri().isEmpty()) { - googleMapsUri_ = other.googleMapsUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - 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: - { - reviewId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - googleMapsUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - title_ = 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 reviewId_ = ""; - - /** - * - * - *
-           * Id of the review referencing the place.
-           * 
- * - * string review_id = 1; - * - * @return The reviewId. - */ - public java.lang.String getReviewId() { - java.lang.Object ref = reviewId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reviewId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-           * Id of the review referencing the place.
-           * 
- * - * string review_id = 1; - * - * @return The bytes for reviewId. - */ - public com.google.protobuf.ByteString getReviewIdBytes() { - java.lang.Object ref = reviewId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - reviewId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-           * Id of the review referencing the place.
-           * 
- * - * string review_id = 1; - * - * @param value The reviewId to set. - * @return This builder for chaining. - */ - public Builder setReviewId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - reviewId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-           * Id of the review referencing the place.
-           * 
- * - * string review_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearReviewId() { - reviewId_ = getDefaultInstance().getReviewId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-           * Id of the review referencing the place.
-           * 
- * - * string review_id = 1; - * - * @param value The bytes for reviewId to set. - * @return This builder for chaining. - */ - public Builder setReviewIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - reviewId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object googleMapsUri_ = ""; - - /** - * - * - *
-           * A link to show the review on Google Maps.
-           * 
- * - * string google_maps_uri = 2; - * - * @return The googleMapsUri. - */ - public java.lang.String getGoogleMapsUri() { - java.lang.Object ref = googleMapsUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - googleMapsUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-           * A link to show the review on Google Maps.
-           * 
- * - * string google_maps_uri = 2; - * - * @return The bytes for googleMapsUri. - */ - public com.google.protobuf.ByteString getGoogleMapsUriBytes() { - java.lang.Object ref = googleMapsUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - googleMapsUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-           * A link to show the review on Google Maps.
-           * 
- * - * string google_maps_uri = 2; - * - * @param value The googleMapsUri to set. - * @return This builder for chaining. - */ - public Builder setGoogleMapsUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - googleMapsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-           * A link to show the review on Google Maps.
-           * 
- * - * string google_maps_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearGoogleMapsUri() { - googleMapsUri_ = getDefaultInstance().getGoogleMapsUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-           * A link to show the review on Google Maps.
-           * 
- * - * string google_maps_uri = 2; - * - * @param value The bytes for googleMapsUri to set. - * @return This builder for chaining. - */ - public Builder setGoogleMapsUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - googleMapsUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object title_ = ""; - - /** - * - * - *
-           * Title of the review.
-           * 
- * - * string title = 3; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-           * Title of the review.
-           * 
- * - * string title = 3; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-           * Title of the review.
-           * 
- * - * string title = 3; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-           * Title of the review.
-           * 
- * - * string title = 3; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-           * Title of the review.
-           * 
- * - * string title = 3; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet) - private static final com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReviewSnippet 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int REVIEW_SNIPPETS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet> - reviewSnippets_; - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet> - getReviewSnippetsList() { - return reviewSnippets_; - } - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder> - getReviewSnippetsOrBuilderList() { - return reviewSnippets_; - } - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - @java.lang.Override - public int getReviewSnippetsCount() { - return reviewSnippets_.size(); - } - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - getReviewSnippets(int index) { - return reviewSnippets_.get(index); - } - - /** - * - * - *
-       * Snippets of reviews that are used to generate the answer.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder - getReviewSnippetsOrBuilder(int index) { - return reviewSnippets_.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 < reviewSnippets_.size(); i++) { - output.writeMessage(1, reviewSnippets_.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 < reviewSnippets_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, reviewSnippets_.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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources other = - (com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources) obj; - - if (!getReviewSnippetsList().equals(other.getReviewSnippetsList())) 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 (getReviewSnippetsCount() > 0) { - hash = (37 * hash) + REVIEW_SNIPPETS_FIELD_NUMBER; - hash = (53 * hash) + getReviewSnippetsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources) - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (reviewSnippetsBuilder_ == null) { - reviewSnippets_ = java.util.Collections.emptyList(); - } else { - reviewSnippets_ = null; - reviewSnippetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_PlaceAnswerSources_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources build() { - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources result = - new com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources result) { - if (reviewSnippetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - reviewSnippets_ = java.util.Collections.unmodifiableList(reviewSnippets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.reviewSnippets_ = reviewSnippets_; - } else { - result.reviewSnippets_ = reviewSnippetsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources) { - return mergeFrom( - (com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources other) { - if (other - == com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance()) return this; - if (reviewSnippetsBuilder_ == null) { - if (!other.reviewSnippets_.isEmpty()) { - if (reviewSnippets_.isEmpty()) { - reviewSnippets_ = other.reviewSnippets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.addAll(other.reviewSnippets_); - } - onChanged(); - } - } else { - if (!other.reviewSnippets_.isEmpty()) { - if (reviewSnippetsBuilder_.isEmpty()) { - reviewSnippetsBuilder_.dispose(); - reviewSnippetsBuilder_ = null; - reviewSnippets_ = other.reviewSnippets_; - bitField0_ = (bitField0_ & ~0x00000001); - reviewSnippetsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetReviewSnippetsFieldBuilder() - : null; - } else { - reviewSnippetsBuilder_.addAllMessages(other.reviewSnippets_); - } - } - } - 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet - m = - input.readMessage( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.parser(), - extensionRegistry); - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.add(m); - } else { - reviewSnippetsBuilder_.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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet> - reviewSnippets_ = java.util.Collections.emptyList(); - - private void ensureReviewSnippetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - reviewSnippets_ = - new java.util.ArrayList< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet>(reviewSnippets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder> - reviewSnippetsBuilder_; - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public java.util.List< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet> - getReviewSnippetsList() { - if (reviewSnippetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(reviewSnippets_); - } else { - return reviewSnippetsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public int getReviewSnippetsCount() { - if (reviewSnippetsBuilder_ == null) { - return reviewSnippets_.size(); - } else { - return reviewSnippetsBuilder_.getCount(); - } - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - getReviewSnippets(int index) { - if (reviewSnippetsBuilder_ == null) { - return reviewSnippets_.get(index); - } else { - return reviewSnippetsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder setReviewSnippets( - int index, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - value) { - if (reviewSnippetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReviewSnippetsIsMutable(); - reviewSnippets_.set(index, value); - onChanged(); - } else { - reviewSnippetsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder setReviewSnippets( - int index, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - builderForValue) { - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.set(index, builderForValue.build()); - onChanged(); - } else { - reviewSnippetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder addReviewSnippets( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - value) { - if (reviewSnippetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReviewSnippetsIsMutable(); - reviewSnippets_.add(value); - onChanged(); - } else { - reviewSnippetsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder addReviewSnippets( - int index, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - value) { - if (reviewSnippetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReviewSnippetsIsMutable(); - reviewSnippets_.add(index, value); - onChanged(); - } else { - reviewSnippetsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder addReviewSnippets( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - builderForValue) { - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.add(builderForValue.build()); - onChanged(); - } else { - reviewSnippetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder addReviewSnippets( - int index, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - builderForValue) { - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.add(index, builderForValue.build()); - onChanged(); - } else { - reviewSnippetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder addAllReviewSnippets( - java.lang.Iterable< - ? extends - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet> - values) { - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reviewSnippets_); - onChanged(); - } else { - reviewSnippetsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder clearReviewSnippets() { - if (reviewSnippetsBuilder_ == null) { - reviewSnippets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - reviewSnippetsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public Builder removeReviewSnippets(int index) { - if (reviewSnippetsBuilder_ == null) { - ensureReviewSnippetsIsMutable(); - reviewSnippets_.remove(index); - onChanged(); - } else { - reviewSnippetsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - getReviewSnippetsBuilder(int index) { - return internalGetReviewSnippetsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder - getReviewSnippetsOrBuilder(int index) { - if (reviewSnippetsBuilder_ == null) { - return reviewSnippets_.get(index); - } else { - return reviewSnippetsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder> - getReviewSnippetsOrBuilderList() { - if (reviewSnippetsBuilder_ != null) { - return reviewSnippetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(reviewSnippets_); - } - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - addReviewSnippetsBuilder() { - return internalGetReviewSnippetsFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .getDefaultInstance()); - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder - addReviewSnippetsBuilder(int index) { - return internalGetReviewSnippetsFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .getDefaultInstance()); - } - - /** - * - * - *
-         * Snippets of reviews that are used to generate the answer.
-         * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet review_snippets = 1; - * - */ - public java.util.List< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder> - getReviewSnippetsBuilderList() { - return internalGetReviewSnippetsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet - .Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder> - internalGetReviewSnippetsFieldBuilder() { - if (reviewSnippetsBuilder_ == null) { - reviewSnippetsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippet.Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .ReviewSnippetOrBuilder>( - reviewSnippets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - reviewSnippets_ = null; - } - return reviewSnippetsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources) - private static final com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PlaceAnswerSources 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.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * URI reference of the chunk.
-     * 
- * - * optional 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 reference of the chunk.
-     * 
- * - * optional 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 TITLE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - @java.lang.Override - public boolean hasTitle() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-     * Title of the chunk.
-     * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TEXT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - @java.lang.Override - public boolean hasText() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - - /** - * - * - *
-     * Text of the chunk.
-     * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PLACE_ID_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object placeId_ = ""; - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return Whether the placeId field is set. - */ - @java.lang.Override - public boolean hasPlaceId() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return The placeId. - */ - @java.lang.Override - public java.lang.String getPlaceId() { - java.lang.Object ref = placeId_; - 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(); - placeId_ = s; - return s; - } - } - - /** - * - * - *
-     * This Place's resource name, in `places/{place_id}` format.  Can be used
-     * to look up the Place.
-     * 
- * - * optional string place_id = 4; - * - * @return The bytes for placeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPlaceIdBytes() { - java.lang.Object ref = placeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - placeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PLACE_ANSWER_SOURCES_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - placeAnswerSources_; - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return Whether the placeAnswerSources field is set. - */ - @java.lang.Override - public boolean hasPlaceAnswerSources() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return The placeAnswerSources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - getPlaceAnswerSources() { - return placeAnswerSources_ == null - ? com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance() - : placeAnswerSources_; - } - - /** - * - * - *
-     * Sources used to generate the place answer.
-     * This includes review snippets and photos that were used to generate the
-     * answer, as well as uris to flag content.
-     * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder - getPlaceAnswerSourcesOrBuilder() { - return placeAnswerSources_ == null - ? com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance() - : placeAnswerSources_; - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, text_); - } - if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, placeId_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(5, getPlaceAnswerSources()); - } - 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.GeneratedMessage.computeStringSize(1, uri_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, text_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, placeId_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPlaceAnswerSources()); - } - 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.vertexai.api.GroundingChunk.Maps)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk.Maps other = - (com.google.cloud.vertexai.api.GroundingChunk.Maps) obj; - - if (hasUri() != other.hasUri()) return false; - if (hasUri()) { - if (!getUri().equals(other.getUri())) return false; - } - if (hasTitle() != other.hasTitle()) return false; - if (hasTitle()) { - if (!getTitle().equals(other.getTitle())) return false; - } - if (hasText() != other.hasText()) return false; - if (hasText()) { - if (!getText().equals(other.getText())) return false; - } - if (hasPlaceId() != other.hasPlaceId()) return false; - if (hasPlaceId()) { - if (!getPlaceId().equals(other.getPlaceId())) return false; - } - if (hasPlaceAnswerSources() != other.hasPlaceAnswerSources()) return false; - if (hasPlaceAnswerSources()) { - if (!getPlaceAnswerSources().equals(other.getPlaceAnswerSources())) 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 (hasUri()) { - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - } - if (hasTitle()) { - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - } - if (hasText()) { - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - } - if (hasPlaceId()) { - hash = (37 * hash) + PLACE_ID_FIELD_NUMBER; - hash = (53 * hash) + getPlaceId().hashCode(); - } - if (hasPlaceAnswerSources()) { - hash = (37 * hash) + PLACE_ANSWER_SOURCES_FIELD_NUMBER; - hash = (53 * hash) + getPlaceAnswerSources().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps 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.vertexai.api.GroundingChunk.Maps parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps 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.vertexai.api.GroundingChunk.Maps parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk.Maps 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Chunk from Google Maps.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk.Maps} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk.Maps) - com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.Maps.class, - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingChunk.Maps.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPlaceAnswerSourcesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - title_ = ""; - text_ = ""; - placeId_ = ""; - placeAnswerSources_ = null; - if (placeAnswerSourcesBuilder_ != null) { - placeAnswerSourcesBuilder_.dispose(); - placeAnswerSourcesBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_Maps_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps build() { - com.google.cloud.vertexai.api.GroundingChunk.Maps result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk.Maps result = - new com.google.cloud.vertexai.api.GroundingChunk.Maps(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GroundingChunk.Maps result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.text_ = text_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.placeId_ = placeId_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.placeAnswerSources_ = - placeAnswerSourcesBuilder_ == null - ? placeAnswerSources_ - : placeAnswerSourcesBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingChunk.Maps) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingChunk.Maps) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GroundingChunk.Maps other) { - if (other == com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance()) - return this; - if (other.hasUri()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasTitle()) { - title_ = other.title_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasText()) { - text_ = other.text_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasPlaceId()) { - placeId_ = other.placeId_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasPlaceAnswerSources()) { - mergePlaceAnswerSources(other.getPlaceAnswerSources()); - } - 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: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - placeId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetPlaceAnswerSourcesFieldBuilder().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 bitField0_; - - private java.lang.Object uri_ = ""; - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional string uri = 1; - * - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional 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 reference of the chunk.
-       * 
- * - * optional string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * URI reference of the chunk.
-       * 
- * - * optional 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 title_ = ""; - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return Whether the title field is set. - */ - public boolean hasTitle() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Title of the chunk.
-       * 
- * - * optional string title = 2; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object text_ = ""; - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @return Whether the text field is set. - */ - public boolean hasText() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - text_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Text of the chunk.
-       * 
- * - * optional string text = 3; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - text_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object placeId_ = ""; - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @return Whether the placeId field is set. - */ - public boolean hasPlaceId() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @return The placeId. - */ - public java.lang.String getPlaceId() { - java.lang.Object ref = placeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - placeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @return The bytes for placeId. - */ - public com.google.protobuf.ByteString getPlaceIdBytes() { - java.lang.Object ref = placeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - placeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @param value The placeId to set. - * @return This builder for chaining. - */ - public Builder setPlaceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - placeId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @return This builder for chaining. - */ - public Builder clearPlaceId() { - placeId_ = getDefaultInstance().getPlaceId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-       * This Place's resource name, in `places/{place_id}` format.  Can be used
-       * to look up the Place.
-       * 
- * - * optional string place_id = 4; - * - * @param value The bytes for placeId to set. - * @return This builder for chaining. - */ - public Builder setPlaceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - placeId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - placeAnswerSources_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder> - placeAnswerSourcesBuilder_; - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return Whether the placeAnswerSources field is set. - */ - public boolean hasPlaceAnswerSources() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - * - * @return The placeAnswerSources. - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - getPlaceAnswerSources() { - if (placeAnswerSourcesBuilder_ == null) { - return placeAnswerSources_ == null - ? com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance() - : placeAnswerSources_; - } else { - return placeAnswerSourcesBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public Builder setPlaceAnswerSources( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources value) { - if (placeAnswerSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placeAnswerSources_ = value; - } else { - placeAnswerSourcesBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public Builder setPlaceAnswerSources( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder - builderForValue) { - if (placeAnswerSourcesBuilder_ == null) { - placeAnswerSources_ = builderForValue.build(); - } else { - placeAnswerSourcesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public Builder mergePlaceAnswerSources( - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources value) { - if (placeAnswerSourcesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && placeAnswerSources_ != null - && placeAnswerSources_ - != com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance()) { - getPlaceAnswerSourcesBuilder().mergeFrom(value); - } else { - placeAnswerSources_ = value; - } - } else { - placeAnswerSourcesBuilder_.mergeFrom(value); - } - if (placeAnswerSources_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public Builder clearPlaceAnswerSources() { - bitField0_ = (bitField0_ & ~0x00000010); - placeAnswerSources_ = null; - if (placeAnswerSourcesBuilder_ != null) { - placeAnswerSourcesBuilder_.dispose(); - placeAnswerSourcesBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder - getPlaceAnswerSourcesBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetPlaceAnswerSourcesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder - getPlaceAnswerSourcesOrBuilder() { - if (placeAnswerSourcesBuilder_ != null) { - return placeAnswerSourcesBuilder_.getMessageOrBuilder(); - } else { - return placeAnswerSources_ == null - ? com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources - .getDefaultInstance() - : placeAnswerSources_; - } - } - - /** - * - * - *
-       * Sources used to generate the place answer.
-       * This includes review snippets and photos that were used to generate the
-       * answer, as well as uris to flag content.
-       * 
- * - * - * .google.cloud.vertexai.v1.GroundingChunk.Maps.PlaceAnswerSources place_answer_sources = 5; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder> - internalGetPlaceAnswerSourcesFieldBuilder() { - if (placeAnswerSourcesBuilder_ == null) { - placeAnswerSourcesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSources.Builder, - com.google.cloud.vertexai.api.GroundingChunk.Maps.PlaceAnswerSourcesOrBuilder>( - getPlaceAnswerSources(), getParentForChildren(), isClean()); - placeAnswerSources_ = null; - } - return placeAnswerSourcesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk.Maps) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk.Maps) - private static final com.google.cloud.vertexai.api.GroundingChunk.Maps DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingChunk.Maps(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk.Maps getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Maps 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.vertexai.api.GroundingChunk.Maps getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int chunkTypeCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object chunkType_; - - public enum ChunkTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - WEB(1), - RETRIEVED_CONTEXT(2), - MAPS(3), - CHUNKTYPE_NOT_SET(0); - private final int value; - - private ChunkTypeCase(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 ChunkTypeCase valueOf(int value) { - return forNumber(value); - } - - public static ChunkTypeCase forNumber(int value) { - switch (value) { - case 1: - return WEB; - case 2: - return RETRIEVED_CONTEXT; - case 3: - return MAPS; - case 0: - return CHUNKTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ChunkTypeCase getChunkTypeCase() { - return ChunkTypeCase.forNumber(chunkTypeCase_); - } - - public static final int WEB_FIELD_NUMBER = 1; - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return Whether the web field is set. - */ - @java.lang.Override - public boolean hasWeb() { - return chunkTypeCase_ == 1; - } - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return The web. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Web getWeb() { - if (chunkTypeCase_ == 1) { - return (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder getWebOrBuilder() { - if (chunkTypeCase_ == 1) { - return (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - - public static final int RETRIEVED_CONTEXT_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return Whether the retrievedContext field is set. - */ - @java.lang.Override - public boolean hasRetrievedContext() { - return chunkTypeCase_ == 2; - } - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return The retrievedContext. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext getRetrievedContext() { - if (chunkTypeCase_ == 2) { - return (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder - getRetrievedContextOrBuilder() { - if (chunkTypeCase_ == 2) { - return (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - - public static final int MAPS_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return Whether the maps field is set. - */ - @java.lang.Override - public boolean hasMaps() { - return chunkTypeCase_ == 3; - } - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return The maps. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps getMaps() { - if (chunkTypeCase_ == 3) { - return (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder getMapsOrBuilder() { - if (chunkTypeCase_ == 3) { - return (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Maps.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 (chunkTypeCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_); - } - if (chunkTypeCase_ == 2) { - output.writeMessage( - 2, (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_); - } - if (chunkTypeCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (chunkTypeCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_); - } - if (chunkTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_); - } - if (chunkTypeCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_); - } - 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.vertexai.api.GroundingChunk)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingChunk other = - (com.google.cloud.vertexai.api.GroundingChunk) obj; - - if (!getChunkTypeCase().equals(other.getChunkTypeCase())) return false; - switch (chunkTypeCase_) { - case 1: - if (!getWeb().equals(other.getWeb())) return false; - break; - case 2: - if (!getRetrievedContext().equals(other.getRetrievedContext())) return false; - break; - case 3: - if (!getMaps().equals(other.getMaps())) 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 (chunkTypeCase_) { - case 1: - hash = (37 * hash) + WEB_FIELD_NUMBER; - hash = (53 * hash) + getWeb().hashCode(); - break; - case 2: - hash = (37 * hash) + RETRIEVED_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getRetrievedContext().hashCode(); - break; - case 3: - hash = (37 * hash) + MAPS_FIELD_NUMBER; - hash = (53 * hash) + getMaps().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk 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.vertexai.api.GroundingChunk parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk 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.vertexai.api.GroundingChunk parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingChunk parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingChunk 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Grounding chunk.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingChunk} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingChunk) - com.google.cloud.vertexai.api.GroundingChunkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingChunk.class, - com.google.cloud.vertexai.api.GroundingChunk.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingChunk.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (webBuilder_ != null) { - webBuilder_.clear(); - } - if (retrievedContextBuilder_ != null) { - retrievedContextBuilder_.clear(); - } - if (mapsBuilder_ != null) { - mapsBuilder_.clear(); - } - chunkTypeCase_ = 0; - chunkType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingChunk_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingChunk.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk build() { - com.google.cloud.vertexai.api.GroundingChunk result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk buildPartial() { - com.google.cloud.vertexai.api.GroundingChunk result = - new com.google.cloud.vertexai.api.GroundingChunk(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GroundingChunk result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.GroundingChunk result) { - result.chunkTypeCase_ = chunkTypeCase_; - result.chunkType_ = this.chunkType_; - if (chunkTypeCase_ == 1 && webBuilder_ != null) { - result.chunkType_ = webBuilder_.build(); - } - if (chunkTypeCase_ == 2 && retrievedContextBuilder_ != null) { - result.chunkType_ = retrievedContextBuilder_.build(); - } - if (chunkTypeCase_ == 3 && mapsBuilder_ != null) { - result.chunkType_ = mapsBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingChunk) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingChunk) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GroundingChunk other) { - if (other == com.google.cloud.vertexai.api.GroundingChunk.getDefaultInstance()) return this; - switch (other.getChunkTypeCase()) { - case WEB: - { - mergeWeb(other.getWeb()); - break; - } - case RETRIEVED_CONTEXT: - { - mergeRetrievedContext(other.getRetrievedContext()); - break; - } - case MAPS: - { - mergeMaps(other.getMaps()); - break; - } - case CHUNKTYPE_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(internalGetWebFieldBuilder().getBuilder(), extensionRegistry); - chunkTypeCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetRetrievedContextFieldBuilder().getBuilder(), extensionRegistry); - chunkTypeCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(internalGetMapsFieldBuilder().getBuilder(), extensionRegistry); - chunkTypeCase_ = 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 chunkTypeCase_ = 0; - private java.lang.Object chunkType_; - - public ChunkTypeCase getChunkTypeCase() { - return ChunkTypeCase.forNumber(chunkTypeCase_); - } - - public Builder clearChunkType() { - chunkTypeCase_ = 0; - chunkType_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Web, - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder, - com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder> - webBuilder_; - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return Whether the web field is set. - */ - @java.lang.Override - public boolean hasWeb() { - return chunkTypeCase_ == 1; - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return The web. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Web getWeb() { - if (webBuilder_ == null) { - if (chunkTypeCase_ == 1) { - return (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } else { - if (chunkTypeCase_ == 1) { - return webBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - public Builder setWeb(com.google.cloud.vertexai.api.GroundingChunk.Web value) { - if (webBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkType_ = value; - onChanged(); - } else { - webBuilder_.setMessage(value); - } - chunkTypeCase_ = 1; - return this; - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - public Builder setWeb( - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder builderForValue) { - if (webBuilder_ == null) { - chunkType_ = builderForValue.build(); - onChanged(); - } else { - webBuilder_.setMessage(builderForValue.build()); - } - chunkTypeCase_ = 1; - return this; - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - public Builder mergeWeb(com.google.cloud.vertexai.api.GroundingChunk.Web value) { - if (webBuilder_ == null) { - if (chunkTypeCase_ == 1 - && chunkType_ - != com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance()) { - chunkType_ = - com.google.cloud.vertexai.api.GroundingChunk.Web.newBuilder( - (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_) - .mergeFrom(value) - .buildPartial(); - } else { - chunkType_ = value; - } - onChanged(); - } else { - if (chunkTypeCase_ == 1) { - webBuilder_.mergeFrom(value); - } else { - webBuilder_.setMessage(value); - } - } - chunkTypeCase_ = 1; - return this; - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - public Builder clearWeb() { - if (webBuilder_ == null) { - if (chunkTypeCase_ == 1) { - chunkTypeCase_ = 0; - chunkType_ = null; - onChanged(); - } - } else { - if (chunkTypeCase_ == 1) { - chunkTypeCase_ = 0; - chunkType_ = null; - } - webBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - public com.google.cloud.vertexai.api.GroundingChunk.Web.Builder getWebBuilder() { - return internalGetWebFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder getWebOrBuilder() { - if ((chunkTypeCase_ == 1) && (webBuilder_ != null)) { - return webBuilder_.getMessageOrBuilder(); - } else { - if (chunkTypeCase_ == 1) { - return (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from the web.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Web, - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder, - com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder> - internalGetWebFieldBuilder() { - if (webBuilder_ == null) { - if (!(chunkTypeCase_ == 1)) { - chunkType_ = com.google.cloud.vertexai.api.GroundingChunk.Web.getDefaultInstance(); - } - webBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Web, - com.google.cloud.vertexai.api.GroundingChunk.Web.Builder, - com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder>( - (com.google.cloud.vertexai.api.GroundingChunk.Web) chunkType_, - getParentForChildren(), - isClean()); - chunkType_ = null; - } - chunkTypeCase_ = 1; - onChanged(); - return webBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder> - retrievedContextBuilder_; - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return Whether the retrievedContext field is set. - */ - @java.lang.Override - public boolean hasRetrievedContext() { - return chunkTypeCase_ == 2; - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return The retrievedContext. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext getRetrievedContext() { - if (retrievedContextBuilder_ == null) { - if (chunkTypeCase_ == 2) { - return (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } else { - if (chunkTypeCase_ == 2) { - return retrievedContextBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - public Builder setRetrievedContext( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext value) { - if (retrievedContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkType_ = value; - onChanged(); - } else { - retrievedContextBuilder_.setMessage(value); - } - chunkTypeCase_ = 2; - return this; - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - public Builder setRetrievedContext( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder builderForValue) { - if (retrievedContextBuilder_ == null) { - chunkType_ = builderForValue.build(); - onChanged(); - } else { - retrievedContextBuilder_.setMessage(builderForValue.build()); - } - chunkTypeCase_ = 2; - return this; - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - public Builder mergeRetrievedContext( - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext value) { - if (retrievedContextBuilder_ == null) { - if (chunkTypeCase_ == 2 - && chunkType_ - != com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext - .getDefaultInstance()) { - chunkType_ = - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.newBuilder( - (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_) - .mergeFrom(value) - .buildPartial(); - } else { - chunkType_ = value; - } - onChanged(); - } else { - if (chunkTypeCase_ == 2) { - retrievedContextBuilder_.mergeFrom(value); - } else { - retrievedContextBuilder_.setMessage(value); - } - } - chunkTypeCase_ = 2; - return this; - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - public Builder clearRetrievedContext() { - if (retrievedContextBuilder_ == null) { - if (chunkTypeCase_ == 2) { - chunkTypeCase_ = 0; - chunkType_ = null; - onChanged(); - } - } else { - if (chunkTypeCase_ == 2) { - chunkTypeCase_ = 0; - chunkType_ = null; - } - retrievedContextBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder - getRetrievedContextBuilder() { - return internalGetRetrievedContextFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder - getRetrievedContextOrBuilder() { - if ((chunkTypeCase_ == 2) && (retrievedContextBuilder_ != null)) { - return retrievedContextBuilder_.getMessageOrBuilder(); - } else { - if (chunkTypeCase_ == 2) { - return (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from context retrieved by the retrieval tools.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder> - internalGetRetrievedContextFieldBuilder() { - if (retrievedContextBuilder_ == null) { - if (!(chunkTypeCase_ == 2)) { - chunkType_ = - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.getDefaultInstance(); - } - retrievedContextBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext.Builder, - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder>( - (com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext) chunkType_, - getParentForChildren(), - isClean()); - chunkType_ = null; - } - chunkTypeCase_ = 2; - onChanged(); - return retrievedContextBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps, - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder, - com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder> - mapsBuilder_; - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return Whether the maps field is set. - */ - @java.lang.Override - public boolean hasMaps() { - return chunkTypeCase_ == 3; - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return The maps. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.Maps getMaps() { - if (mapsBuilder_ == null) { - if (chunkTypeCase_ == 3) { - return (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } else { - if (chunkTypeCase_ == 3) { - return mapsBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - public Builder setMaps(com.google.cloud.vertexai.api.GroundingChunk.Maps value) { - if (mapsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkType_ = value; - onChanged(); - } else { - mapsBuilder_.setMessage(value); - } - chunkTypeCase_ = 3; - return this; - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - public Builder setMaps( - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder builderForValue) { - if (mapsBuilder_ == null) { - chunkType_ = builderForValue.build(); - onChanged(); - } else { - mapsBuilder_.setMessage(builderForValue.build()); - } - chunkTypeCase_ = 3; - return this; - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - public Builder mergeMaps(com.google.cloud.vertexai.api.GroundingChunk.Maps value) { - if (mapsBuilder_ == null) { - if (chunkTypeCase_ == 3 - && chunkType_ - != com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance()) { - chunkType_ = - com.google.cloud.vertexai.api.GroundingChunk.Maps.newBuilder( - (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_) - .mergeFrom(value) - .buildPartial(); - } else { - chunkType_ = value; - } - onChanged(); - } else { - if (chunkTypeCase_ == 3) { - mapsBuilder_.mergeFrom(value); - } else { - mapsBuilder_.setMessage(value); - } - } - chunkTypeCase_ = 3; - return this; - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - public Builder clearMaps() { - if (mapsBuilder_ == null) { - if (chunkTypeCase_ == 3) { - chunkTypeCase_ = 0; - chunkType_ = null; - onChanged(); - } - } else { - if (chunkTypeCase_ == 3) { - chunkTypeCase_ = 0; - chunkType_ = null; - } - mapsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - public com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder getMapsBuilder() { - return internalGetMapsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder getMapsOrBuilder() { - if ((chunkTypeCase_ == 3) && (mapsBuilder_ != null)) { - return mapsBuilder_.getMessageOrBuilder(); - } else { - if (chunkTypeCase_ == 3) { - return (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_; - } - return com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Grounding chunk from Google Maps.
-     * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps, - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder, - com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder> - internalGetMapsFieldBuilder() { - if (mapsBuilder_ == null) { - if (!(chunkTypeCase_ == 3)) { - chunkType_ = com.google.cloud.vertexai.api.GroundingChunk.Maps.getDefaultInstance(); - } - mapsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk.Maps, - com.google.cloud.vertexai.api.GroundingChunk.Maps.Builder, - com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder>( - (com.google.cloud.vertexai.api.GroundingChunk.Maps) chunkType_, - getParentForChildren(), - isClean()); - chunkType_ = null; - } - chunkTypeCase_ = 3; - onChanged(); - return mapsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingChunk) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingChunk) - private static final com.google.cloud.vertexai.api.GroundingChunk DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingChunk(); - } - - public static com.google.cloud.vertexai.api.GroundingChunk getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroundingChunk 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.vertexai.api.GroundingChunk getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunkOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunkOrBuilder.java deleted file mode 100644 index b527d2d0b97d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingChunkOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GroundingChunkOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingChunk) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return Whether the web field is set. - */ - boolean hasWeb(); - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - * - * @return The web. - */ - com.google.cloud.vertexai.api.GroundingChunk.Web getWeb(); - - /** - * - * - *
-   * Grounding chunk from the web.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Web web = 1; - */ - com.google.cloud.vertexai.api.GroundingChunk.WebOrBuilder getWebOrBuilder(); - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return Whether the retrievedContext field is set. - */ - boolean hasRetrievedContext(); - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - * - * @return The retrievedContext. - */ - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContext getRetrievedContext(); - - /** - * - * - *
-   * Grounding chunk from context retrieved by the retrieval tools.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.RetrievedContext retrieved_context = 2; - */ - com.google.cloud.vertexai.api.GroundingChunk.RetrievedContextOrBuilder - getRetrievedContextOrBuilder(); - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return Whether the maps field is set. - */ - boolean hasMaps(); - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - * - * @return The maps. - */ - com.google.cloud.vertexai.api.GroundingChunk.Maps getMaps(); - - /** - * - * - *
-   * Grounding chunk from Google Maps.
-   * 
- * - * .google.cloud.vertexai.v1.GroundingChunk.Maps maps = 3; - */ - com.google.cloud.vertexai.api.GroundingChunk.MapsOrBuilder getMapsOrBuilder(); - - com.google.cloud.vertexai.api.GroundingChunk.ChunkTypeCase getChunkTypeCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadata.java deleted file mode 100644 index 3f1b644a3ef3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadata.java +++ /dev/null @@ -1,4174 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Metadata returned to client when grounding is enabled.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingMetadata} - */ -@com.google.protobuf.Generated -public final class GroundingMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingMetadata) - GroundingMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GroundingMetadata"); - } - - // Use GroundingMetadata.newBuilder() to construct. - private GroundingMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GroundingMetadata() { - webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - groundingChunks_ = java.util.Collections.emptyList(); - groundingSupports_ = java.util.Collections.emptyList(); - googleMapsWidgetContextToken_ = ""; - sourceFlaggingUris_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingMetadata.class, - com.google.cloud.vertexai.api.GroundingMetadata.Builder.class); - } - - public interface SourceFlaggingUriOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Id of the place or review.
-     * 
- * - * string source_id = 1; - * - * @return The sourceId. - */ - java.lang.String getSourceId(); - - /** - * - * - *
-     * Id of the place or review.
-     * 
- * - * string source_id = 1; - * - * @return The bytes for sourceId. - */ - com.google.protobuf.ByteString getSourceIdBytes(); - - /** - * - * - *
-     * A link where users can flag a problem with the source (place or review).
-     * (-- The link is generated by Google and it does not contain
-     * information from the user query. It may contain information of the
-     * content it is flagging, which can be used to identify places. --)
-     * 
- * - * string flag_content_uri = 2; - * - * @return The flagContentUri. - */ - java.lang.String getFlagContentUri(); - - /** - * - * - *
-     * A link where users can flag a problem with the source (place or review).
-     * (-- The link is generated by Google and it does not contain
-     * information from the user query. It may contain information of the
-     * content it is flagging, which can be used to identify places. --)
-     * 
- * - * string flag_content_uri = 2; - * - * @return The bytes for flagContentUri. - */ - com.google.protobuf.ByteString getFlagContentUriBytes(); - } - - /** - * - * - *
-   * Source content flagging uri for a place or review. This is currently
-   * populated only for Google Maps grounding.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri} - */ - public static final class SourceFlaggingUri extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri) - SourceFlaggingUriOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SourceFlaggingUri"); - } - - // Use SourceFlaggingUri.newBuilder() to construct. - private SourceFlaggingUri(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SourceFlaggingUri() { - sourceId_ = ""; - flagContentUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.class, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder.class); - } - - public static final int SOURCE_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object sourceId_ = ""; - - /** - * - * - *
-     * Id of the place or review.
-     * 
- * - * string source_id = 1; - * - * @return The sourceId. - */ - @java.lang.Override - public java.lang.String getSourceId() { - java.lang.Object ref = sourceId_; - 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(); - sourceId_ = s; - return s; - } - } - - /** - * - * - *
-     * Id of the place or review.
-     * 
- * - * string source_id = 1; - * - * @return The bytes for sourceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSourceIdBytes() { - java.lang.Object ref = sourceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FLAG_CONTENT_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object flagContentUri_ = ""; - - /** - * - * - *
-     * A link where users can flag a problem with the source (place or review).
-     * (-- The link is generated by Google and it does not contain
-     * information from the user query. It may contain information of the
-     * content it is flagging, which can be used to identify places. --)
-     * 
- * - * string flag_content_uri = 2; - * - * @return The flagContentUri. - */ - @java.lang.Override - public java.lang.String getFlagContentUri() { - java.lang.Object ref = flagContentUri_; - 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(); - flagContentUri_ = s; - return s; - } - } - - /** - * - * - *
-     * A link where users can flag a problem with the source (place or review).
-     * (-- The link is generated by Google and it does not contain
-     * information from the user query. It may contain information of the
-     * content it is flagging, which can be used to identify places. --)
-     * 
- * - * string flag_content_uri = 2; - * - * @return The bytes for flagContentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFlagContentUriBytes() { - java.lang.Object ref = flagContentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - flagContentUri_ = 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.GeneratedMessage.isStringEmpty(sourceId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, sourceId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(flagContentUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, flagContentUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sourceId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(flagContentUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, flagContentUri_); - } - 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.vertexai.api.GroundingMetadata.SourceFlaggingUri)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri other = - (com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri) obj; - - if (!getSourceId().equals(other.getSourceId())) return false; - if (!getFlagContentUri().equals(other.getFlagContentUri())) 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) + SOURCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSourceId().hashCode(); - hash = (37 * hash) + FLAG_CONTENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getFlagContentUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri 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.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri 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.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingMetadata.SourceFlaggingUri 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Source content flagging uri for a place or review. This is currently
-     * populated only for Google Maps grounding.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri) - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.class, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - sourceId_ = ""; - flagContentUri_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_SourceFlaggingUri_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri build() { - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri buildPartial() { - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri result = - new com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.sourceId_ = sourceId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.flagContentUri_ = flagContentUri_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri) { - return mergeFrom( - (com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri other) { - if (other - == com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - .getDefaultInstance()) return this; - if (!other.getSourceId().isEmpty()) { - sourceId_ = other.sourceId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFlagContentUri().isEmpty()) { - flagContentUri_ = other.flagContentUri_; - 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: - { - sourceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - flagContentUri_ = 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 sourceId_ = ""; - - /** - * - * - *
-       * Id of the place or review.
-       * 
- * - * string source_id = 1; - * - * @return The sourceId. - */ - public java.lang.String getSourceId() { - java.lang.Object ref = sourceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Id of the place or review.
-       * 
- * - * string source_id = 1; - * - * @return The bytes for sourceId. - */ - public com.google.protobuf.ByteString getSourceIdBytes() { - java.lang.Object ref = sourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Id of the place or review.
-       * 
- * - * string source_id = 1; - * - * @param value The sourceId to set. - * @return This builder for chaining. - */ - public Builder setSourceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Id of the place or review.
-       * 
- * - * string source_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearSourceId() { - sourceId_ = getDefaultInstance().getSourceId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Id of the place or review.
-       * 
- * - * string source_id = 1; - * - * @param value The bytes for sourceId to set. - * @return This builder for chaining. - */ - public Builder setSourceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object flagContentUri_ = ""; - - /** - * - * - *
-       * A link where users can flag a problem with the source (place or review).
-       * (-- The link is generated by Google and it does not contain
-       * information from the user query. It may contain information of the
-       * content it is flagging, which can be used to identify places. --)
-       * 
- * - * string flag_content_uri = 2; - * - * @return The flagContentUri. - */ - public java.lang.String getFlagContentUri() { - java.lang.Object ref = flagContentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - flagContentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * A link where users can flag a problem with the source (place or review).
-       * (-- The link is generated by Google and it does not contain
-       * information from the user query. It may contain information of the
-       * content it is flagging, which can be used to identify places. --)
-       * 
- * - * string flag_content_uri = 2; - * - * @return The bytes for flagContentUri. - */ - public com.google.protobuf.ByteString getFlagContentUriBytes() { - java.lang.Object ref = flagContentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - flagContentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * A link where users can flag a problem with the source (place or review).
-       * (-- The link is generated by Google and it does not contain
-       * information from the user query. It may contain information of the
-       * content it is flagging, which can be used to identify places. --)
-       * 
- * - * string flag_content_uri = 2; - * - * @param value The flagContentUri to set. - * @return This builder for chaining. - */ - public Builder setFlagContentUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - flagContentUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * A link where users can flag a problem with the source (place or review).
-       * (-- The link is generated by Google and it does not contain
-       * information from the user query. It may contain information of the
-       * content it is flagging, which can be used to identify places. --)
-       * 
- * - * string flag_content_uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearFlagContentUri() { - flagContentUri_ = getDefaultInstance().getFlagContentUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * A link where users can flag a problem with the source (place or review).
-       * (-- The link is generated by Google and it does not contain
-       * information from the user query. It may contain information of the
-       * content it is flagging, which can be used to identify places. --)
-       * 
- * - * string flag_content_uri = 2; - * - * @param value The bytes for flagContentUri to set. - * @return This builder for chaining. - */ - public Builder setFlagContentUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - flagContentUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri) - private static final com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri(); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SourceFlaggingUri 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.vertexai.api.GroundingMetadata.SourceFlaggingUri - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int WEB_SEARCH_QUERIES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList webSearchQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the webSearchQueries. - */ - public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { - return webSearchQueries_; - } - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of webSearchQueries. - */ - public int getWebSearchQueriesCount() { - return webSearchQueries_.size(); - } - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The webSearchQueries at the given index. - */ - public java.lang.String getWebSearchQueries(int index) { - return webSearchQueries_.get(index); - } - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the webSearchQueries at the given index. - */ - public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { - return webSearchQueries_.getByteString(index); - } - - public static final int SEARCH_ENTRY_POINT_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.SearchEntryPoint searchEntryPoint_; - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the searchEntryPoint field is set. - */ - @java.lang.Override - public boolean hasSearchEntryPoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The searchEntryPoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SearchEntryPoint getSearchEntryPoint() { - return searchEntryPoint_ == null - ? com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SearchEntryPointOrBuilder getSearchEntryPointOrBuilder() { - return searchEntryPoint_ == null - ? com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } - - public static final int GROUNDING_CHUNKS_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private java.util.List groundingChunks_; - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - @java.lang.Override - public java.util.List getGroundingChunksList() { - return groundingChunks_; - } - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - @java.lang.Override - public java.util.List - getGroundingChunksOrBuilderList() { - return groundingChunks_; - } - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - @java.lang.Override - public int getGroundingChunksCount() { - return groundingChunks_.size(); - } - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunk getGroundingChunks(int index) { - return groundingChunks_.get(index); - } - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingChunkOrBuilder getGroundingChunksOrBuilder( - int index) { - return groundingChunks_.get(index); - } - - public static final int GROUNDING_SUPPORTS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private java.util.List groundingSupports_; - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getGroundingSupportsList() { - return groundingSupports_; - } - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getGroundingSupportsOrBuilderList() { - return groundingSupports_; - } - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getGroundingSupportsCount() { - return groundingSupports_.size(); - } - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingSupport getGroundingSupports(int index) { - return groundingSupports_.get(index); - } - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingSupportOrBuilder getGroundingSupportsOrBuilder( - int index) { - return groundingSupports_.get(index); - } - - public static final int RETRIEVAL_METADATA_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.RetrievalMetadata retrievalMetadata_; - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the retrievalMetadata field is set. - */ - @java.lang.Override - public boolean hasRetrievalMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The retrievalMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalMetadata getRetrievalMetadata() { - return retrievalMetadata_ == null - ? com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance() - : retrievalMetadata_; - } - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder getRetrievalMetadataOrBuilder() { - return retrievalMetadata_ == null - ? com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance() - : retrievalMetadata_; - } - - public static final int GOOGLE_MAPS_WIDGET_CONTEXT_TOKEN_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object googleMapsWidgetContextToken_ = ""; - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleMapsWidgetContextToken field is set. - */ - @java.lang.Override - public boolean hasGoogleMapsWidgetContextToken() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleMapsWidgetContextToken. - */ - @java.lang.Override - public java.lang.String getGoogleMapsWidgetContextToken() { - java.lang.Object ref = googleMapsWidgetContextToken_; - 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(); - googleMapsWidgetContextToken_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for googleMapsWidgetContextToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGoogleMapsWidgetContextTokenBytes() { - java.lang.Object ref = googleMapsWidgetContextToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - googleMapsWidgetContextToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_FLAGGING_URIS_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private java.util.List - sourceFlaggingUris_; - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - @java.lang.Override - public java.util.List - getSourceFlaggingUrisList() { - return sourceFlaggingUris_; - } - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder> - getSourceFlaggingUrisOrBuilderList() { - return sourceFlaggingUris_; - } - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - @java.lang.Override - public int getSourceFlaggingUrisCount() { - return sourceFlaggingUris_.size(); - } - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri getSourceFlaggingUris( - int index) { - return sourceFlaggingUris_.get(index); - } - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder - getSourceFlaggingUrisOrBuilder(int index) { - return sourceFlaggingUris_.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 < webSearchQueries_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, webSearchQueries_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getSearchEntryPoint()); - } - for (int i = 0; i < groundingChunks_.size(); i++) { - output.writeMessage(5, groundingChunks_.get(i)); - } - for (int i = 0; i < groundingSupports_.size(); i++) { - output.writeMessage(6, groundingSupports_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getRetrievalMetadata()); - } - if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, googleMapsWidgetContextToken_); - } - for (int i = 0; i < sourceFlaggingUris_.size(); i++) { - output.writeMessage(9, sourceFlaggingUris_.get(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 < webSearchQueries_.size(); i++) { - dataSize += computeStringSizeNoTag(webSearchQueries_.getRaw(i)); - } - size += dataSize; - size += 1 * getWebSearchQueriesList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSearchEntryPoint()); - } - for (int i = 0; i < groundingChunks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, groundingChunks_.get(i)); - } - for (int i = 0; i < groundingSupports_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(6, groundingSupports_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRetrievalMetadata()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += - com.google.protobuf.GeneratedMessage.computeStringSize(8, googleMapsWidgetContextToken_); - } - for (int i = 0; i < sourceFlaggingUris_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(9, sourceFlaggingUris_.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.vertexai.api.GroundingMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingMetadata other = - (com.google.cloud.vertexai.api.GroundingMetadata) obj; - - if (!getWebSearchQueriesList().equals(other.getWebSearchQueriesList())) return false; - if (hasSearchEntryPoint() != other.hasSearchEntryPoint()) return false; - if (hasSearchEntryPoint()) { - if (!getSearchEntryPoint().equals(other.getSearchEntryPoint())) return false; - } - if (!getGroundingChunksList().equals(other.getGroundingChunksList())) return false; - if (!getGroundingSupportsList().equals(other.getGroundingSupportsList())) return false; - if (hasRetrievalMetadata() != other.hasRetrievalMetadata()) return false; - if (hasRetrievalMetadata()) { - if (!getRetrievalMetadata().equals(other.getRetrievalMetadata())) return false; - } - if (hasGoogleMapsWidgetContextToken() != other.hasGoogleMapsWidgetContextToken()) return false; - if (hasGoogleMapsWidgetContextToken()) { - if (!getGoogleMapsWidgetContextToken().equals(other.getGoogleMapsWidgetContextToken())) - return false; - } - if (!getSourceFlaggingUrisList().equals(other.getSourceFlaggingUrisList())) 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 (getWebSearchQueriesCount() > 0) { - hash = (37 * hash) + WEB_SEARCH_QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getWebSearchQueriesList().hashCode(); - } - if (hasSearchEntryPoint()) { - hash = (37 * hash) + SEARCH_ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getSearchEntryPoint().hashCode(); - } - if (getGroundingChunksCount() > 0) { - hash = (37 * hash) + GROUNDING_CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + getGroundingChunksList().hashCode(); - } - if (getGroundingSupportsCount() > 0) { - hash = (37 * hash) + GROUNDING_SUPPORTS_FIELD_NUMBER; - hash = (53 * hash) + getGroundingSupportsList().hashCode(); - } - if (hasRetrievalMetadata()) { - hash = (37 * hash) + RETRIEVAL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getRetrievalMetadata().hashCode(); - } - if (hasGoogleMapsWidgetContextToken()) { - hash = (37 * hash) + GOOGLE_MAPS_WIDGET_CONTEXT_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getGoogleMapsWidgetContextToken().hashCode(); - } - if (getSourceFlaggingUrisCount() > 0) { - hash = (37 * hash) + SOURCE_FLAGGING_URIS_FIELD_NUMBER; - hash = (53 * hash) + getSourceFlaggingUrisList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata 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.vertexai.api.GroundingMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata 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.vertexai.api.GroundingMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Metadata returned to client when grounding is enabled.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingMetadata) - com.google.cloud.vertexai.api.GroundingMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingMetadata.class, - com.google.cloud.vertexai.api.GroundingMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSearchEntryPointFieldBuilder(); - internalGetGroundingChunksFieldBuilder(); - internalGetGroundingSupportsFieldBuilder(); - internalGetRetrievalMetadataFieldBuilder(); - internalGetSourceFlaggingUrisFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - searchEntryPoint_ = null; - if (searchEntryPointBuilder_ != null) { - searchEntryPointBuilder_.dispose(); - searchEntryPointBuilder_ = null; - } - if (groundingChunksBuilder_ == null) { - groundingChunks_ = java.util.Collections.emptyList(); - } else { - groundingChunks_ = null; - groundingChunksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (groundingSupportsBuilder_ == null) { - groundingSupports_ = java.util.Collections.emptyList(); - } else { - groundingSupports_ = null; - groundingSupportsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - retrievalMetadata_ = null; - if (retrievalMetadataBuilder_ != null) { - retrievalMetadataBuilder_.dispose(); - retrievalMetadataBuilder_ = null; - } - googleMapsWidgetContextToken_ = ""; - if (sourceFlaggingUrisBuilder_ == null) { - sourceFlaggingUris_ = java.util.Collections.emptyList(); - } else { - sourceFlaggingUris_ = null; - sourceFlaggingUrisBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata build() { - com.google.cloud.vertexai.api.GroundingMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingMetadata buildPartial() { - com.google.cloud.vertexai.api.GroundingMetadata result = - new com.google.cloud.vertexai.api.GroundingMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.GroundingMetadata result) { - if (groundingChunksBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - groundingChunks_ = java.util.Collections.unmodifiableList(groundingChunks_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.groundingChunks_ = groundingChunks_; - } else { - result.groundingChunks_ = groundingChunksBuilder_.build(); - } - if (groundingSupportsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - groundingSupports_ = java.util.Collections.unmodifiableList(groundingSupports_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.groundingSupports_ = groundingSupports_; - } else { - result.groundingSupports_ = groundingSupportsBuilder_.build(); - } - if (sourceFlaggingUrisBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - sourceFlaggingUris_ = java.util.Collections.unmodifiableList(sourceFlaggingUris_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.sourceFlaggingUris_ = sourceFlaggingUris_; - } else { - result.sourceFlaggingUris_ = sourceFlaggingUrisBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.GroundingMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - webSearchQueries_.makeImmutable(); - result.webSearchQueries_ = webSearchQueries_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.searchEntryPoint_ = - searchEntryPointBuilder_ == null ? searchEntryPoint_ : searchEntryPointBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.retrievalMetadata_ = - retrievalMetadataBuilder_ == null - ? retrievalMetadata_ - : retrievalMetadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.googleMapsWidgetContextToken_ = googleMapsWidgetContextToken_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GroundingMetadata other) { - if (other == com.google.cloud.vertexai.api.GroundingMetadata.getDefaultInstance()) - return this; - if (!other.webSearchQueries_.isEmpty()) { - if (webSearchQueries_.isEmpty()) { - webSearchQueries_ = other.webSearchQueries_; - bitField0_ |= 0x00000001; - } else { - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.addAll(other.webSearchQueries_); - } - onChanged(); - } - if (other.hasSearchEntryPoint()) { - mergeSearchEntryPoint(other.getSearchEntryPoint()); - } - if (groundingChunksBuilder_ == null) { - if (!other.groundingChunks_.isEmpty()) { - if (groundingChunks_.isEmpty()) { - groundingChunks_ = other.groundingChunks_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureGroundingChunksIsMutable(); - groundingChunks_.addAll(other.groundingChunks_); - } - onChanged(); - } - } else { - if (!other.groundingChunks_.isEmpty()) { - if (groundingChunksBuilder_.isEmpty()) { - groundingChunksBuilder_.dispose(); - groundingChunksBuilder_ = null; - groundingChunks_ = other.groundingChunks_; - bitField0_ = (bitField0_ & ~0x00000004); - groundingChunksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetGroundingChunksFieldBuilder() - : null; - } else { - groundingChunksBuilder_.addAllMessages(other.groundingChunks_); - } - } - } - if (groundingSupportsBuilder_ == null) { - if (!other.groundingSupports_.isEmpty()) { - if (groundingSupports_.isEmpty()) { - groundingSupports_ = other.groundingSupports_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureGroundingSupportsIsMutable(); - groundingSupports_.addAll(other.groundingSupports_); - } - onChanged(); - } - } else { - if (!other.groundingSupports_.isEmpty()) { - if (groundingSupportsBuilder_.isEmpty()) { - groundingSupportsBuilder_.dispose(); - groundingSupportsBuilder_ = null; - groundingSupports_ = other.groundingSupports_; - bitField0_ = (bitField0_ & ~0x00000008); - groundingSupportsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetGroundingSupportsFieldBuilder() - : null; - } else { - groundingSupportsBuilder_.addAllMessages(other.groundingSupports_); - } - } - } - if (other.hasRetrievalMetadata()) { - mergeRetrievalMetadata(other.getRetrievalMetadata()); - } - if (other.hasGoogleMapsWidgetContextToken()) { - googleMapsWidgetContextToken_ = other.googleMapsWidgetContextToken_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (sourceFlaggingUrisBuilder_ == null) { - if (!other.sourceFlaggingUris_.isEmpty()) { - if (sourceFlaggingUris_.isEmpty()) { - sourceFlaggingUris_ = other.sourceFlaggingUris_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.addAll(other.sourceFlaggingUris_); - } - onChanged(); - } - } else { - if (!other.sourceFlaggingUris_.isEmpty()) { - if (sourceFlaggingUrisBuilder_.isEmpty()) { - sourceFlaggingUrisBuilder_.dispose(); - sourceFlaggingUrisBuilder_ = null; - sourceFlaggingUris_ = other.sourceFlaggingUris_; - bitField0_ = (bitField0_ & ~0x00000040); - sourceFlaggingUrisBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSourceFlaggingUrisFieldBuilder() - : null; - } else { - sourceFlaggingUrisBuilder_.addAllMessages(other.sourceFlaggingUris_); - } - } - } - 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(); - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(s); - break; - } // case 10 - case 34: - { - input.readMessage( - internalGetSearchEntryPointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 34 - case 42: - { - com.google.cloud.vertexai.api.GroundingChunk m = - input.readMessage( - com.google.cloud.vertexai.api.GroundingChunk.parser(), extensionRegistry); - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - groundingChunks_.add(m); - } else { - groundingChunksBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - com.google.cloud.vertexai.api.GroundingSupport m = - input.readMessage( - com.google.cloud.vertexai.api.GroundingSupport.parser(), extensionRegistry); - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - groundingSupports_.add(m); - } else { - groundingSupportsBuilder_.addMessage(m); - } - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetRetrievalMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 58 - case 66: - { - googleMapsWidgetContextToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 66 - case 74: - { - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri m = - input.readMessage( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.parser(), - extensionRegistry); - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.add(m); - } else { - sourceFlaggingUrisBuilder_.addMessage(m); - } - 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 bitField0_; - - private com.google.protobuf.LazyStringArrayList webSearchQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureWebSearchQueriesIsMutable() { - if (!webSearchQueries_.isModifiable()) { - webSearchQueries_ = new com.google.protobuf.LazyStringArrayList(webSearchQueries_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the webSearchQueries. - */ - public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { - webSearchQueries_.makeImmutable(); - return webSearchQueries_; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of webSearchQueries. - */ - public int getWebSearchQueriesCount() { - return webSearchQueries_.size(); - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The webSearchQueries at the given index. - */ - public java.lang.String getWebSearchQueries(int index) { - return webSearchQueries_.get(index); - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the webSearchQueries at the given index. - */ - public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { - return webSearchQueries_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The webSearchQueries to set. - * @return This builder for chaining. - */ - public Builder setWebSearchQueries(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The webSearchQueries to add. - * @return This builder for chaining. - */ - public Builder addWebSearchQueries(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The webSearchQueries to add. - * @return This builder for chaining. - */ - public Builder addAllWebSearchQueries(java.lang.Iterable values) { - ensureWebSearchQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webSearchQueries_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearWebSearchQueries() { - webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web search queries for the following-up web search.
-     * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the webSearchQueries to add. - * @return This builder for chaining. - */ - public Builder addWebSearchQueriesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.SearchEntryPoint searchEntryPoint_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SearchEntryPoint, - com.google.cloud.vertexai.api.SearchEntryPoint.Builder, - com.google.cloud.vertexai.api.SearchEntryPointOrBuilder> - searchEntryPointBuilder_; - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the searchEntryPoint field is set. - */ - public boolean hasSearchEntryPoint() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The searchEntryPoint. - */ - public com.google.cloud.vertexai.api.SearchEntryPoint getSearchEntryPoint() { - if (searchEntryPointBuilder_ == null) { - return searchEntryPoint_ == null - ? com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } else { - return searchEntryPointBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSearchEntryPoint(com.google.cloud.vertexai.api.SearchEntryPoint value) { - if (searchEntryPointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - searchEntryPoint_ = value; - } else { - searchEntryPointBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSearchEntryPoint( - com.google.cloud.vertexai.api.SearchEntryPoint.Builder builderForValue) { - if (searchEntryPointBuilder_ == null) { - searchEntryPoint_ = builderForValue.build(); - } else { - searchEntryPointBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSearchEntryPoint(com.google.cloud.vertexai.api.SearchEntryPoint value) { - if (searchEntryPointBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && searchEntryPoint_ != null - && searchEntryPoint_ - != com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance()) { - getSearchEntryPointBuilder().mergeFrom(value); - } else { - searchEntryPoint_ = value; - } - } else { - searchEntryPointBuilder_.mergeFrom(value); - } - if (searchEntryPoint_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSearchEntryPoint() { - bitField0_ = (bitField0_ & ~0x00000002); - searchEntryPoint_ = null; - if (searchEntryPointBuilder_ != null) { - searchEntryPointBuilder_.dispose(); - searchEntryPointBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SearchEntryPoint.Builder getSearchEntryPointBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetSearchEntryPointFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SearchEntryPointOrBuilder getSearchEntryPointOrBuilder() { - if (searchEntryPointBuilder_ != null) { - return searchEntryPointBuilder_.getMessageOrBuilder(); - } else { - return searchEntryPoint_ == null - ? com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } - } - - /** - * - * - *
-     * Optional. Google search entry for the following-up web searches.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SearchEntryPoint, - com.google.cloud.vertexai.api.SearchEntryPoint.Builder, - com.google.cloud.vertexai.api.SearchEntryPointOrBuilder> - internalGetSearchEntryPointFieldBuilder() { - if (searchEntryPointBuilder_ == null) { - searchEntryPointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SearchEntryPoint, - com.google.cloud.vertexai.api.SearchEntryPoint.Builder, - com.google.cloud.vertexai.api.SearchEntryPointOrBuilder>( - getSearchEntryPoint(), getParentForChildren(), isClean()); - searchEntryPoint_ = null; - } - return searchEntryPointBuilder_; - } - - private java.util.List groundingChunks_ = - java.util.Collections.emptyList(); - - private void ensureGroundingChunksIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - groundingChunks_ = - new java.util.ArrayList(groundingChunks_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk, - com.google.cloud.vertexai.api.GroundingChunk.Builder, - com.google.cloud.vertexai.api.GroundingChunkOrBuilder> - groundingChunksBuilder_; - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public java.util.List getGroundingChunksList() { - if (groundingChunksBuilder_ == null) { - return java.util.Collections.unmodifiableList(groundingChunks_); - } else { - return groundingChunksBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public int getGroundingChunksCount() { - if (groundingChunksBuilder_ == null) { - return groundingChunks_.size(); - } else { - return groundingChunksBuilder_.getCount(); - } - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public com.google.cloud.vertexai.api.GroundingChunk getGroundingChunks(int index) { - if (groundingChunksBuilder_ == null) { - return groundingChunks_.get(index); - } else { - return groundingChunksBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder setGroundingChunks( - int index, com.google.cloud.vertexai.api.GroundingChunk value) { - if (groundingChunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingChunksIsMutable(); - groundingChunks_.set(index, value); - onChanged(); - } else { - groundingChunksBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder setGroundingChunks( - int index, com.google.cloud.vertexai.api.GroundingChunk.Builder builderForValue) { - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - groundingChunks_.set(index, builderForValue.build()); - onChanged(); - } else { - groundingChunksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder addGroundingChunks(com.google.cloud.vertexai.api.GroundingChunk value) { - if (groundingChunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingChunksIsMutable(); - groundingChunks_.add(value); - onChanged(); - } else { - groundingChunksBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder addGroundingChunks( - int index, com.google.cloud.vertexai.api.GroundingChunk value) { - if (groundingChunksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingChunksIsMutable(); - groundingChunks_.add(index, value); - onChanged(); - } else { - groundingChunksBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder addGroundingChunks( - com.google.cloud.vertexai.api.GroundingChunk.Builder builderForValue) { - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - groundingChunks_.add(builderForValue.build()); - onChanged(); - } else { - groundingChunksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder addGroundingChunks( - int index, com.google.cloud.vertexai.api.GroundingChunk.Builder builderForValue) { - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - groundingChunks_.add(index, builderForValue.build()); - onChanged(); - } else { - groundingChunksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder addAllGroundingChunks( - java.lang.Iterable values) { - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingChunks_); - onChanged(); - } else { - groundingChunksBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder clearGroundingChunks() { - if (groundingChunksBuilder_ == null) { - groundingChunks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - groundingChunksBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public Builder removeGroundingChunks(int index) { - if (groundingChunksBuilder_ == null) { - ensureGroundingChunksIsMutable(); - groundingChunks_.remove(index); - onChanged(); - } else { - groundingChunksBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public com.google.cloud.vertexai.api.GroundingChunk.Builder getGroundingChunksBuilder( - int index) { - return internalGetGroundingChunksFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public com.google.cloud.vertexai.api.GroundingChunkOrBuilder getGroundingChunksOrBuilder( - int index) { - if (groundingChunksBuilder_ == null) { - return groundingChunks_.get(index); - } else { - return groundingChunksBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public java.util.List - getGroundingChunksOrBuilderList() { - if (groundingChunksBuilder_ != null) { - return groundingChunksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(groundingChunks_); - } - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public com.google.cloud.vertexai.api.GroundingChunk.Builder addGroundingChunksBuilder() { - return internalGetGroundingChunksFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.GroundingChunk.getDefaultInstance()); - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public com.google.cloud.vertexai.api.GroundingChunk.Builder addGroundingChunksBuilder( - int index) { - return internalGetGroundingChunksFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.GroundingChunk.getDefaultInstance()); - } - - /** - * - * - *
-     * List of supporting references retrieved from specified grounding source.
-     * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - public java.util.List - getGroundingChunksBuilderList() { - return internalGetGroundingChunksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk, - com.google.cloud.vertexai.api.GroundingChunk.Builder, - com.google.cloud.vertexai.api.GroundingChunkOrBuilder> - internalGetGroundingChunksFieldBuilder() { - if (groundingChunksBuilder_ == null) { - groundingChunksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingChunk, - com.google.cloud.vertexai.api.GroundingChunk.Builder, - com.google.cloud.vertexai.api.GroundingChunkOrBuilder>( - groundingChunks_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - groundingChunks_ = null; - } - return groundingChunksBuilder_; - } - - private java.util.List groundingSupports_ = - java.util.Collections.emptyList(); - - private void ensureGroundingSupportsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - groundingSupports_ = - new java.util.ArrayList( - groundingSupports_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingSupport, - com.google.cloud.vertexai.api.GroundingSupport.Builder, - com.google.cloud.vertexai.api.GroundingSupportOrBuilder> - groundingSupportsBuilder_; - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getGroundingSupportsList() { - if (groundingSupportsBuilder_ == null) { - return java.util.Collections.unmodifiableList(groundingSupports_); - } else { - return groundingSupportsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getGroundingSupportsCount() { - if (groundingSupportsBuilder_ == null) { - return groundingSupports_.size(); - } else { - return groundingSupportsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GroundingSupport getGroundingSupports(int index) { - if (groundingSupportsBuilder_ == null) { - return groundingSupports_.get(index); - } else { - return groundingSupportsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGroundingSupports( - int index, com.google.cloud.vertexai.api.GroundingSupport value) { - if (groundingSupportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingSupportsIsMutable(); - groundingSupports_.set(index, value); - onChanged(); - } else { - groundingSupportsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGroundingSupports( - int index, com.google.cloud.vertexai.api.GroundingSupport.Builder builderForValue) { - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - groundingSupports_.set(index, builderForValue.build()); - onChanged(); - } else { - groundingSupportsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addGroundingSupports(com.google.cloud.vertexai.api.GroundingSupport value) { - if (groundingSupportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingSupportsIsMutable(); - groundingSupports_.add(value); - onChanged(); - } else { - groundingSupportsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addGroundingSupports( - int index, com.google.cloud.vertexai.api.GroundingSupport value) { - if (groundingSupportsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroundingSupportsIsMutable(); - groundingSupports_.add(index, value); - onChanged(); - } else { - groundingSupportsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addGroundingSupports( - com.google.cloud.vertexai.api.GroundingSupport.Builder builderForValue) { - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - groundingSupports_.add(builderForValue.build()); - onChanged(); - } else { - groundingSupportsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addGroundingSupports( - int index, com.google.cloud.vertexai.api.GroundingSupport.Builder builderForValue) { - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - groundingSupports_.add(index, builderForValue.build()); - onChanged(); - } else { - groundingSupportsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllGroundingSupports( - java.lang.Iterable values) { - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingSupports_); - onChanged(); - } else { - groundingSupportsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGroundingSupports() { - if (groundingSupportsBuilder_ == null) { - groundingSupports_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - groundingSupportsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeGroundingSupports(int index) { - if (groundingSupportsBuilder_ == null) { - ensureGroundingSupportsIsMutable(); - groundingSupports_.remove(index); - onChanged(); - } else { - groundingSupportsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GroundingSupport.Builder getGroundingSupportsBuilder( - int index) { - return internalGetGroundingSupportsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GroundingSupportOrBuilder getGroundingSupportsOrBuilder( - int index) { - if (groundingSupportsBuilder_ == null) { - return groundingSupports_.get(index); - } else { - return groundingSupportsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getGroundingSupportsOrBuilderList() { - if (groundingSupportsBuilder_ != null) { - return groundingSupportsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(groundingSupports_); - } - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GroundingSupport.Builder addGroundingSupportsBuilder() { - return internalGetGroundingSupportsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.GroundingSupport.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GroundingSupport.Builder addGroundingSupportsBuilder( - int index) { - return internalGetGroundingSupportsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.GroundingSupport.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. List of grounding support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getGroundingSupportsBuilderList() { - return internalGetGroundingSupportsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingSupport, - com.google.cloud.vertexai.api.GroundingSupport.Builder, - com.google.cloud.vertexai.api.GroundingSupportOrBuilder> - internalGetGroundingSupportsFieldBuilder() { - if (groundingSupportsBuilder_ == null) { - groundingSupportsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingSupport, - com.google.cloud.vertexai.api.GroundingSupport.Builder, - com.google.cloud.vertexai.api.GroundingSupportOrBuilder>( - groundingSupports_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - groundingSupports_ = null; - } - return groundingSupportsBuilder_; - } - - private com.google.cloud.vertexai.api.RetrievalMetadata retrievalMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalMetadata, - com.google.cloud.vertexai.api.RetrievalMetadata.Builder, - com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder> - retrievalMetadataBuilder_; - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the retrievalMetadata field is set. - */ - public boolean hasRetrievalMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The retrievalMetadata. - */ - public com.google.cloud.vertexai.api.RetrievalMetadata getRetrievalMetadata() { - if (retrievalMetadataBuilder_ == null) { - return retrievalMetadata_ == null - ? com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance() - : retrievalMetadata_; - } else { - return retrievalMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRetrievalMetadata(com.google.cloud.vertexai.api.RetrievalMetadata value) { - if (retrievalMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retrievalMetadata_ = value; - } else { - retrievalMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRetrievalMetadata( - com.google.cloud.vertexai.api.RetrievalMetadata.Builder builderForValue) { - if (retrievalMetadataBuilder_ == null) { - retrievalMetadata_ = builderForValue.build(); - } else { - retrievalMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeRetrievalMetadata(com.google.cloud.vertexai.api.RetrievalMetadata value) { - if (retrievalMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && retrievalMetadata_ != null - && retrievalMetadata_ - != com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance()) { - getRetrievalMetadataBuilder().mergeFrom(value); - } else { - retrievalMetadata_ = value; - } - } else { - retrievalMetadataBuilder_.mergeFrom(value); - } - if (retrievalMetadata_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRetrievalMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - retrievalMetadata_ = null; - if (retrievalMetadataBuilder_ != null) { - retrievalMetadataBuilder_.dispose(); - retrievalMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.RetrievalMetadata.Builder getRetrievalMetadataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetRetrievalMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder - getRetrievalMetadataOrBuilder() { - if (retrievalMetadataBuilder_ != null) { - return retrievalMetadataBuilder_.getMessageOrBuilder(); - } else { - return retrievalMetadata_ == null - ? com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance() - : retrievalMetadata_; - } - } - - /** - * - * - *
-     * Optional. Output only. Retrieval metadata.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalMetadata, - com.google.cloud.vertexai.api.RetrievalMetadata.Builder, - com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder> - internalGetRetrievalMetadataFieldBuilder() { - if (retrievalMetadataBuilder_ == null) { - retrievalMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalMetadata, - com.google.cloud.vertexai.api.RetrievalMetadata.Builder, - com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder>( - getRetrievalMetadata(), getParentForChildren(), isClean()); - retrievalMetadata_ = null; - } - return retrievalMetadataBuilder_; - } - - private java.lang.Object googleMapsWidgetContextToken_ = ""; - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleMapsWidgetContextToken field is set. - */ - public boolean hasGoogleMapsWidgetContextToken() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleMapsWidgetContextToken. - */ - public java.lang.String getGoogleMapsWidgetContextToken() { - java.lang.Object ref = googleMapsWidgetContextToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - googleMapsWidgetContextToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for googleMapsWidgetContextToken. - */ - public com.google.protobuf.ByteString getGoogleMapsWidgetContextTokenBytes() { - java.lang.Object ref = googleMapsWidgetContextToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - googleMapsWidgetContextToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The googleMapsWidgetContextToken to set. - * @return This builder for chaining. - */ - public Builder setGoogleMapsWidgetContextToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - googleMapsWidgetContextToken_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearGoogleMapsWidgetContextToken() { - googleMapsWidgetContextToken_ = getDefaultInstance().getGoogleMapsWidgetContextToken(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Output only. Resource name of the Google Maps widget context
-     * token to be used with the PlacesContextElement widget to render contextual
-     * data. This is populated only for Google Maps grounding.
-     * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for googleMapsWidgetContextToken to set. - * @return This builder for chaining. - */ - public Builder setGoogleMapsWidgetContextTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - googleMapsWidgetContextToken_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.util.List - sourceFlaggingUris_ = java.util.Collections.emptyList(); - - private void ensureSourceFlaggingUrisIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - sourceFlaggingUris_ = - new java.util.ArrayList< - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri>( - sourceFlaggingUris_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder> - sourceFlaggingUrisBuilder_; - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public java.util.List - getSourceFlaggingUrisList() { - if (sourceFlaggingUrisBuilder_ == null) { - return java.util.Collections.unmodifiableList(sourceFlaggingUris_); - } else { - return sourceFlaggingUrisBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public int getSourceFlaggingUrisCount() { - if (sourceFlaggingUrisBuilder_ == null) { - return sourceFlaggingUris_.size(); - } else { - return sourceFlaggingUrisBuilder_.getCount(); - } - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri getSourceFlaggingUris( - int index) { - if (sourceFlaggingUrisBuilder_ == null) { - return sourceFlaggingUris_.get(index); - } else { - return sourceFlaggingUrisBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder setSourceFlaggingUris( - int index, com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri value) { - if (sourceFlaggingUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.set(index, value); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder setSourceFlaggingUris( - int index, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder builderForValue) { - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.set(index, builderForValue.build()); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder addSourceFlaggingUris( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri value) { - if (sourceFlaggingUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.add(value); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder addSourceFlaggingUris( - int index, com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri value) { - if (sourceFlaggingUrisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.add(index, value); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder addSourceFlaggingUris( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder builderForValue) { - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.add(builderForValue.build()); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder addSourceFlaggingUris( - int index, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder builderForValue) { - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.add(index, builderForValue.build()); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder addAllSourceFlaggingUris( - java.lang.Iterable< - ? extends com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri> - values) { - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceFlaggingUris_); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder clearSourceFlaggingUris() { - if (sourceFlaggingUrisBuilder_ == null) { - sourceFlaggingUris_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public Builder removeSourceFlaggingUris(int index) { - if (sourceFlaggingUrisBuilder_ == null) { - ensureSourceFlaggingUrisIsMutable(); - sourceFlaggingUris_.remove(index); - onChanged(); - } else { - sourceFlaggingUrisBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder - getSourceFlaggingUrisBuilder(int index) { - return internalGetSourceFlaggingUrisFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder - getSourceFlaggingUrisOrBuilder(int index) { - if (sourceFlaggingUrisBuilder_ == null) { - return sourceFlaggingUris_.get(index); - } else { - return sourceFlaggingUrisBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder> - getSourceFlaggingUrisOrBuilderList() { - if (sourceFlaggingUrisBuilder_ != null) { - return sourceFlaggingUrisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sourceFlaggingUris_); - } - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder - addSourceFlaggingUrisBuilder() { - return internalGetSourceFlaggingUrisFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - .getDefaultInstance()); - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder - addSourceFlaggingUrisBuilder(int index) { - return internalGetSourceFlaggingUrisFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri - .getDefaultInstance()); - } - - /** - * - * - *
-     * List of source flagging uris. This is currently populated only for Google
-     * Maps grounding.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - public java.util.List - getSourceFlaggingUrisBuilderList() { - return internalGetSourceFlaggingUrisFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder> - internalGetSourceFlaggingUrisFieldBuilder() { - if (sourceFlaggingUrisBuilder_ == null) { - sourceFlaggingUrisBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri.Builder, - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder>( - sourceFlaggingUris_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - sourceFlaggingUris_ = null; - } - return sourceFlaggingUrisBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingMetadata) - private static final com.google.cloud.vertexai.api.GroundingMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingMetadata(); - } - - public static com.google.cloud.vertexai.api.GroundingMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroundingMetadata 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.vertexai.api.GroundingMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadataOrBuilder.java deleted file mode 100644 index ea2d2e7eeee0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingMetadataOrBuilder.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GroundingMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the webSearchQueries. - */ - java.util.List getWebSearchQueriesList(); - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of webSearchQueries. - */ - int getWebSearchQueriesCount(); - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The webSearchQueries at the given index. - */ - java.lang.String getWebSearchQueries(int index); - - /** - * - * - *
-   * Optional. Web search queries for the following-up web search.
-   * 
- * - * repeated string web_search_queries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the webSearchQueries at the given index. - */ - com.google.protobuf.ByteString getWebSearchQueriesBytes(int index); - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the searchEntryPoint field is set. - */ - boolean hasSearchEntryPoint(); - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The searchEntryPoint. - */ - com.google.cloud.vertexai.api.SearchEntryPoint getSearchEntryPoint(); - - /** - * - * - *
-   * Optional. Google search entry for the following-up web searches.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SearchEntryPointOrBuilder getSearchEntryPointOrBuilder(); - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - java.util.List getGroundingChunksList(); - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - com.google.cloud.vertexai.api.GroundingChunk getGroundingChunks(int index); - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - int getGroundingChunksCount(); - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - java.util.List - getGroundingChunksOrBuilderList(); - - /** - * - * - *
-   * List of supporting references retrieved from specified grounding source.
-   * 
- * - * repeated .google.cloud.vertexai.v1.GroundingChunk grounding_chunks = 5; - */ - com.google.cloud.vertexai.api.GroundingChunkOrBuilder getGroundingChunksOrBuilder(int index); - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getGroundingSupportsList(); - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GroundingSupport getGroundingSupports(int index); - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getGroundingSupportsCount(); - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getGroundingSupportsOrBuilderList(); - - /** - * - * - *
-   * Optional. List of grounding support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingSupport grounding_supports = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GroundingSupportOrBuilder getGroundingSupportsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the retrievalMetadata field is set. - */ - boolean hasRetrievalMetadata(); - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The retrievalMetadata. - */ - com.google.cloud.vertexai.api.RetrievalMetadata getRetrievalMetadata(); - - /** - * - * - *
-   * Optional. Output only. Retrieval metadata.
-   * 
- * - * - * optional .google.cloud.vertexai.v1.RetrievalMetadata retrieval_metadata = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder getRetrievalMetadataOrBuilder(); - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleMapsWidgetContextToken field is set. - */ - boolean hasGoogleMapsWidgetContextToken(); - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleMapsWidgetContextToken. - */ - java.lang.String getGoogleMapsWidgetContextToken(); - - /** - * - * - *
-   * Optional. Output only. Resource name of the Google Maps widget context
-   * token to be used with the PlacesContextElement widget to render contextual
-   * data. This is populated only for Google Maps grounding.
-   * 
- * - * - * optional string google_maps_widget_context_token = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for googleMapsWidgetContextToken. - */ - com.google.protobuf.ByteString getGoogleMapsWidgetContextTokenBytes(); - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - java.util.List - getSourceFlaggingUrisList(); - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUri getSourceFlaggingUris( - int index); - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - int getSourceFlaggingUrisCount(); - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - java.util.List< - ? extends com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder> - getSourceFlaggingUrisOrBuilderList(); - - /** - * - * - *
-   * List of source flagging uris. This is currently populated only for Google
-   * Maps grounding.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.GroundingMetadata.SourceFlaggingUri source_flagging_uris = 9; - * - */ - com.google.cloud.vertexai.api.GroundingMetadata.SourceFlaggingUriOrBuilder - getSourceFlaggingUrisOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupport.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupport.java deleted file mode 100644 index 81e4e40d0ca0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupport.java +++ /dev/null @@ -1,1253 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Grounding support.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingSupport} - */ -@com.google.protobuf.Generated -public final class GroundingSupport extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.GroundingSupport) - GroundingSupportOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GroundingSupport"); - } - - // Use GroundingSupport.newBuilder() to construct. - private GroundingSupport(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GroundingSupport() { - groundingChunkIndices_ = emptyIntList(); - confidenceScores_ = emptyFloatList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingSupport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingSupport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingSupport.class, - com.google.cloud.vertexai.api.GroundingSupport.Builder.class); - } - - private int bitField0_; - public static final int SEGMENT_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.Segment segment_; - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return Whether the segment field is set. - */ - @java.lang.Override - public boolean hasSegment() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return The segment. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Segment getSegment() { - return segment_ == null ? com.google.cloud.vertexai.api.Segment.getDefaultInstance() : segment_; - } - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SegmentOrBuilder getSegmentOrBuilder() { - return segment_ == null ? com.google.cloud.vertexai.api.Segment.getDefaultInstance() : segment_; - } - - public static final int GROUNDING_CHUNK_INDICES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList groundingChunkIndices_ = emptyIntList(); - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return A list containing the groundingChunkIndices. - */ - @java.lang.Override - public java.util.List getGroundingChunkIndicesList() { - return groundingChunkIndices_; - } - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return The count of groundingChunkIndices. - */ - public int getGroundingChunkIndicesCount() { - return groundingChunkIndices_.size(); - } - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param index The index of the element to return. - * @return The groundingChunkIndices at the given index. - */ - public int getGroundingChunkIndices(int index) { - return groundingChunkIndices_.getInt(index); - } - - private int groundingChunkIndicesMemoizedSerializedSize = -1; - - public static final int CONFIDENCE_SCORES_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList confidenceScores_ = emptyFloatList(); - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @return A list containing the confidenceScores. - */ - @java.lang.Override - public java.util.List getConfidenceScoresList() { - return confidenceScores_; - } - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @return The count of confidenceScores. - */ - public int getConfidenceScoresCount() { - return confidenceScores_.size(); - } - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @param index The index of the element to return. - * @return The confidenceScores at the given index. - */ - public float getConfidenceScores(int index) { - return confidenceScores_.getFloat(index); - } - - private int confidenceScoresMemoizedSerializedSize = -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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSegment()); - } - if (getGroundingChunkIndicesList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(groundingChunkIndicesMemoizedSerializedSize); - } - for (int i = 0; i < groundingChunkIndices_.size(); i++) { - output.writeInt32NoTag(groundingChunkIndices_.getInt(i)); - } - if (getConfidenceScoresList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(confidenceScoresMemoizedSerializedSize); - } - for (int i = 0; i < confidenceScores_.size(); i++) { - output.writeFloatNoTag(confidenceScores_.getFloat(i)); - } - 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.computeMessageSize(1, getSegment()); - } - { - int dataSize = 0; - for (int i = 0; i < groundingChunkIndices_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( - groundingChunkIndices_.getInt(i)); - } - size += dataSize; - if (!getGroundingChunkIndicesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - groundingChunkIndicesMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * getConfidenceScoresList().size(); - size += dataSize; - if (!getConfidenceScoresList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - confidenceScoresMemoizedSerializedSize = 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.vertexai.api.GroundingSupport)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.GroundingSupport other = - (com.google.cloud.vertexai.api.GroundingSupport) obj; - - if (hasSegment() != other.hasSegment()) return false; - if (hasSegment()) { - if (!getSegment().equals(other.getSegment())) return false; - } - if (!getGroundingChunkIndicesList().equals(other.getGroundingChunkIndicesList())) return false; - if (!getConfidenceScoresList().equals(other.getConfidenceScoresList())) 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 (hasSegment()) { - hash = (37 * hash) + SEGMENT_FIELD_NUMBER; - hash = (53 * hash) + getSegment().hashCode(); - } - if (getGroundingChunkIndicesCount() > 0) { - hash = (37 * hash) + GROUNDING_CHUNK_INDICES_FIELD_NUMBER; - hash = (53 * hash) + getGroundingChunkIndicesList().hashCode(); - } - if (getConfidenceScoresCount() > 0) { - hash = (37 * hash) + CONFIDENCE_SCORES_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceScoresList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingSupport 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.vertexai.api.GroundingSupport parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingSupport 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.vertexai.api.GroundingSupport parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.GroundingSupport parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.GroundingSupport 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Grounding support.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.GroundingSupport} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.GroundingSupport) - com.google.cloud.vertexai.api.GroundingSupportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingSupport_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingSupport_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.GroundingSupport.class, - com.google.cloud.vertexai.api.GroundingSupport.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.GroundingSupport.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSegmentFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - segment_ = null; - if (segmentBuilder_ != null) { - segmentBuilder_.dispose(); - segmentBuilder_ = null; - } - groundingChunkIndices_ = emptyIntList(); - confidenceScores_ = emptyFloatList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_GroundingSupport_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingSupport getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.GroundingSupport.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingSupport build() { - com.google.cloud.vertexai.api.GroundingSupport result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.GroundingSupport buildPartial() { - com.google.cloud.vertexai.api.GroundingSupport result = - new com.google.cloud.vertexai.api.GroundingSupport(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.GroundingSupport result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.segment_ = segmentBuilder_ == null ? segment_ : segmentBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - groundingChunkIndices_.makeImmutable(); - result.groundingChunkIndices_ = groundingChunkIndices_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - confidenceScores_.makeImmutable(); - result.confidenceScores_ = confidenceScores_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.GroundingSupport) { - return mergeFrom((com.google.cloud.vertexai.api.GroundingSupport) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.GroundingSupport other) { - if (other == com.google.cloud.vertexai.api.GroundingSupport.getDefaultInstance()) return this; - if (other.hasSegment()) { - mergeSegment(other.getSegment()); - } - if (!other.groundingChunkIndices_.isEmpty()) { - if (groundingChunkIndices_.isEmpty()) { - groundingChunkIndices_ = other.groundingChunkIndices_; - groundingChunkIndices_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureGroundingChunkIndicesIsMutable(); - groundingChunkIndices_.addAll(other.groundingChunkIndices_); - } - onChanged(); - } - if (!other.confidenceScores_.isEmpty()) { - if (confidenceScores_.isEmpty()) { - confidenceScores_ = other.confidenceScores_; - confidenceScores_.makeImmutable(); - bitField0_ |= 0x00000004; - } else { - ensureConfidenceScoresIsMutable(); - confidenceScores_.addAll(other.confidenceScores_); - } - 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(internalGetSegmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - int v = input.readInt32(); - ensureGroundingChunkIndicesIsMutable(); - groundingChunkIndices_.addInt(v); - break; - } // case 16 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureGroundingChunkIndicesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - groundingChunkIndices_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 18 - case 29: - { - float v = input.readFloat(); - ensureConfidenceScoresIsMutable(); - confidenceScores_.addFloat(v); - break; - } // case 29 - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureConfidenceScoresIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - confidenceScores_.addFloat(input.readFloat()); - } - input.popLimit(limit); - 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.vertexai.api.Segment segment_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Segment, - com.google.cloud.vertexai.api.Segment.Builder, - com.google.cloud.vertexai.api.SegmentOrBuilder> - segmentBuilder_; - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return Whether the segment field is set. - */ - public boolean hasSegment() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return The segment. - */ - public com.google.cloud.vertexai.api.Segment getSegment() { - if (segmentBuilder_ == null) { - return segment_ == null - ? com.google.cloud.vertexai.api.Segment.getDefaultInstance() - : segment_; - } else { - return segmentBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public Builder setSegment(com.google.cloud.vertexai.api.Segment value) { - if (segmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - segment_ = value; - } else { - segmentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public Builder setSegment(com.google.cloud.vertexai.api.Segment.Builder builderForValue) { - if (segmentBuilder_ == null) { - segment_ = builderForValue.build(); - } else { - segmentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public Builder mergeSegment(com.google.cloud.vertexai.api.Segment value) { - if (segmentBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && segment_ != null - && segment_ != com.google.cloud.vertexai.api.Segment.getDefaultInstance()) { - getSegmentBuilder().mergeFrom(value); - } else { - segment_ = value; - } - } else { - segmentBuilder_.mergeFrom(value); - } - if (segment_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public Builder clearSegment() { - bitField0_ = (bitField0_ & ~0x00000001); - segment_ = null; - if (segmentBuilder_ != null) { - segmentBuilder_.dispose(); - segmentBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public com.google.cloud.vertexai.api.Segment.Builder getSegmentBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetSegmentFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - public com.google.cloud.vertexai.api.SegmentOrBuilder getSegmentOrBuilder() { - if (segmentBuilder_ != null) { - return segmentBuilder_.getMessageOrBuilder(); - } else { - return segment_ == null - ? com.google.cloud.vertexai.api.Segment.getDefaultInstance() - : segment_; - } - } - - /** - * - * - *
-     * Segment of the content this support belongs to.
-     * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Segment, - com.google.cloud.vertexai.api.Segment.Builder, - com.google.cloud.vertexai.api.SegmentOrBuilder> - internalGetSegmentFieldBuilder() { - if (segmentBuilder_ == null) { - segmentBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Segment, - com.google.cloud.vertexai.api.Segment.Builder, - com.google.cloud.vertexai.api.SegmentOrBuilder>( - getSegment(), getParentForChildren(), isClean()); - segment_ = null; - } - return segmentBuilder_; - } - - private com.google.protobuf.Internal.IntList groundingChunkIndices_ = emptyIntList(); - - private void ensureGroundingChunkIndicesIsMutable() { - if (!groundingChunkIndices_.isModifiable()) { - groundingChunkIndices_ = makeMutableCopy(groundingChunkIndices_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return A list containing the groundingChunkIndices. - */ - public java.util.List getGroundingChunkIndicesList() { - groundingChunkIndices_.makeImmutable(); - return groundingChunkIndices_; - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return The count of groundingChunkIndices. - */ - public int getGroundingChunkIndicesCount() { - return groundingChunkIndices_.size(); - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param index The index of the element to return. - * @return The groundingChunkIndices at the given index. - */ - public int getGroundingChunkIndices(int index) { - return groundingChunkIndices_.getInt(index); - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param index The index to set the value at. - * @param value The groundingChunkIndices to set. - * @return This builder for chaining. - */ - public Builder setGroundingChunkIndices(int index, int value) { - - ensureGroundingChunkIndicesIsMutable(); - groundingChunkIndices_.setInt(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param value The groundingChunkIndices to add. - * @return This builder for chaining. - */ - public Builder addGroundingChunkIndices(int value) { - - ensureGroundingChunkIndicesIsMutable(); - groundingChunkIndices_.addInt(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param values The groundingChunkIndices to add. - * @return This builder for chaining. - */ - public Builder addAllGroundingChunkIndices( - java.lang.Iterable values) { - ensureGroundingChunkIndicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingChunkIndices_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of indices (into 'grounding_chunk') specifying the
-     * citations associated with the claim. For instance [1,3,4] means
-     * that grounding_chunk[1], grounding_chunk[3],
-     * grounding_chunk[4] are the retrieved content attributed to the claim.
-     * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return This builder for chaining. - */ - public Builder clearGroundingChunkIndices() { - groundingChunkIndices_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.FloatList confidenceScores_ = emptyFloatList(); - - private void ensureConfidenceScoresIsMutable() { - if (!confidenceScores_.isModifiable()) { - confidenceScores_ = makeMutableCopy(confidenceScores_); - } - bitField0_ |= 0x00000004; - } - - private void ensureConfidenceScoresIsMutable(int capacity) { - if (!confidenceScores_.isModifiable()) { - confidenceScores_ = makeMutableCopy(confidenceScores_, capacity); - } - bitField0_ |= 0x00000004; - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @return A list containing the confidenceScores. - */ - public java.util.List getConfidenceScoresList() { - confidenceScores_.makeImmutable(); - return confidenceScores_; - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @return The count of confidenceScores. - */ - public int getConfidenceScoresCount() { - return confidenceScores_.size(); - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @param index The index of the element to return. - * @return The confidenceScores at the given index. - */ - public float getConfidenceScores(int index) { - return confidenceScores_.getFloat(index); - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @param index The index to set the value at. - * @param value The confidenceScores to set. - * @return This builder for chaining. - */ - public Builder setConfidenceScores(int index, float value) { - - ensureConfidenceScoresIsMutable(); - confidenceScores_.setFloat(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @param value The confidenceScores to add. - * @return This builder for chaining. - */ - public Builder addConfidenceScores(float value) { - - ensureConfidenceScoresIsMutable(); - confidenceScores_.addFloat(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @param values The confidenceScores to add. - * @return This builder for chaining. - */ - public Builder addAllConfidenceScores(java.lang.Iterable values) { - ensureConfidenceScoresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidenceScores_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-     * most confident. This list must have the same size as the
-     * grounding_chunk_indices.
-     * 
- * - * repeated float confidence_scores = 3; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceScores() { - confidenceScores_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.GroundingSupport) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.GroundingSupport) - private static final com.google.cloud.vertexai.api.GroundingSupport DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.GroundingSupport(); - } - - public static com.google.cloud.vertexai.api.GroundingSupport getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroundingSupport 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.vertexai.api.GroundingSupport getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupportOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupportOrBuilder.java deleted file mode 100644 index 355931175e8c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GroundingSupportOrBuilder.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface GroundingSupportOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.GroundingSupport) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return Whether the segment field is set. - */ - boolean hasSegment(); - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - * - * @return The segment. - */ - com.google.cloud.vertexai.api.Segment getSegment(); - - /** - * - * - *
-   * Segment of the content this support belongs to.
-   * 
- * - * optional .google.cloud.vertexai.v1.Segment segment = 1; - */ - com.google.cloud.vertexai.api.SegmentOrBuilder getSegmentOrBuilder(); - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return A list containing the groundingChunkIndices. - */ - java.util.List getGroundingChunkIndicesList(); - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @return The count of groundingChunkIndices. - */ - int getGroundingChunkIndicesCount(); - - /** - * - * - *
-   * A list of indices (into 'grounding_chunk') specifying the
-   * citations associated with the claim. For instance [1,3,4] means
-   * that grounding_chunk[1], grounding_chunk[3],
-   * grounding_chunk[4] are the retrieved content attributed to the claim.
-   * 
- * - * repeated int32 grounding_chunk_indices = 2; - * - * @param index The index of the element to return. - * @return The groundingChunkIndices at the given index. - */ - int getGroundingChunkIndices(int index); - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @return A list containing the confidenceScores. - */ - java.util.List getConfidenceScoresList(); - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @return The count of confidenceScores. - */ - int getConfidenceScoresCount(); - - /** - * - * - *
-   * Confidence score of the support references. Ranges from 0 to 1. 1 is the
-   * most confident. This list must have the same size as the
-   * grounding_chunk_indices.
-   * 
- * - * repeated float confidence_scores = 3; - * - * @param index The index of the element to return. - * @return The confidenceScores at the given index. - */ - float getConfidenceScores(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java deleted file mode 100644 index 19e03c709db8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Harm categories that will block the content.
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.HarmCategory} - */ -@com.google.protobuf.Generated -public enum HarmCategory implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * The harm category is unspecified.
-   * 
- * - * HARM_CATEGORY_UNSPECIFIED = 0; - */ - HARM_CATEGORY_UNSPECIFIED(0), - /** - * - * - *
-   * The harm category is hate speech.
-   * 
- * - * HARM_CATEGORY_HATE_SPEECH = 1; - */ - HARM_CATEGORY_HATE_SPEECH(1), - /** - * - * - *
-   * The harm category is dangerous content.
-   * 
- * - * HARM_CATEGORY_DANGEROUS_CONTENT = 2; - */ - HARM_CATEGORY_DANGEROUS_CONTENT(2), - /** - * - * - *
-   * The harm category is harassment.
-   * 
- * - * HARM_CATEGORY_HARASSMENT = 3; - */ - HARM_CATEGORY_HARASSMENT(3), - /** - * - * - *
-   * The harm category is sexually explicit content.
-   * 
- * - * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; - */ - HARM_CATEGORY_SEXUALLY_EXPLICIT(4), - /** - * - * - *
-   * Deprecated: Election filter is not longer supported.
-   * The harm category is civic integrity.
-   * 
- * - * HARM_CATEGORY_CIVIC_INTEGRITY = 5 [deprecated = true]; - */ - @java.lang.Deprecated - HARM_CATEGORY_CIVIC_INTEGRITY(5), - /** - * - * - *
-   * The harm category is for jailbreak prompts.
-   * 
- * - * HARM_CATEGORY_JAILBREAK = 6; - */ - HARM_CATEGORY_JAILBREAK(6), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "HarmCategory"); - } - - /** - * - * - *
-   * The harm category is unspecified.
-   * 
- * - * HARM_CATEGORY_UNSPECIFIED = 0; - */ - public static final int HARM_CATEGORY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * The harm category is hate speech.
-   * 
- * - * HARM_CATEGORY_HATE_SPEECH = 1; - */ - public static final int HARM_CATEGORY_HATE_SPEECH_VALUE = 1; - - /** - * - * - *
-   * The harm category is dangerous content.
-   * 
- * - * HARM_CATEGORY_DANGEROUS_CONTENT = 2; - */ - public static final int HARM_CATEGORY_DANGEROUS_CONTENT_VALUE = 2; - - /** - * - * - *
-   * The harm category is harassment.
-   * 
- * - * HARM_CATEGORY_HARASSMENT = 3; - */ - public static final int HARM_CATEGORY_HARASSMENT_VALUE = 3; - - /** - * - * - *
-   * The harm category is sexually explicit content.
-   * 
- * - * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; - */ - public static final int HARM_CATEGORY_SEXUALLY_EXPLICIT_VALUE = 4; - - /** - * - * - *
-   * Deprecated: Election filter is not longer supported.
-   * The harm category is civic integrity.
-   * 
- * - * HARM_CATEGORY_CIVIC_INTEGRITY = 5 [deprecated = true]; - */ - @java.lang.Deprecated public static final int HARM_CATEGORY_CIVIC_INTEGRITY_VALUE = 5; - - /** - * - * - *
-   * The harm category is for jailbreak prompts.
-   * 
- * - * HARM_CATEGORY_JAILBREAK = 6; - */ - public static final int HARM_CATEGORY_JAILBREAK_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 HarmCategory 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 HarmCategory forNumber(int value) { - switch (value) { - case 0: - return HARM_CATEGORY_UNSPECIFIED; - case 1: - return HARM_CATEGORY_HATE_SPEECH; - case 2: - return HARM_CATEGORY_DANGEROUS_CONTENT; - case 3: - return HARM_CATEGORY_HARASSMENT; - case 4: - return HARM_CATEGORY_SEXUALLY_EXPLICIT; - case 5: - return HARM_CATEGORY_CIVIC_INTEGRITY; - case 6: - return HARM_CATEGORY_JAILBREAK; - 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 HarmCategory findValueByNumber(int number) { - return HarmCategory.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto.getDescriptor().getEnumTypes().get(0); - } - - private static final HarmCategory[] VALUES = values(); - - public static HarmCategory 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 HarmCategory(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.HarmCategory) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfig.java deleted file mode 100644 index 46113e941f86..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfig.java +++ /dev/null @@ -1,707 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for image generation features.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ImageConfig} - */ -@com.google.protobuf.Generated -public final class ImageConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ImageConfig) - ImageConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ImageConfig"); - } - - // Use ImageConfig.newBuilder() to construct. - private ImageConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ImageConfig() { - aspectRatio_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ImageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ImageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ImageConfig.class, - com.google.cloud.vertexai.api.ImageConfig.Builder.class); - } - - private int bitField0_; - public static final int ASPECT_RATIO_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object aspectRatio_ = ""; - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the aspectRatio field is set. - */ - @java.lang.Override - public boolean hasAspectRatio() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The aspectRatio. - */ - @java.lang.Override - public java.lang.String getAspectRatio() { - java.lang.Object ref = aspectRatio_; - 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(); - aspectRatio_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for aspectRatio. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAspectRatioBytes() { - java.lang.Object ref = aspectRatio_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - aspectRatio_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, aspectRatio_); - } - 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.GeneratedMessage.computeStringSize(2, aspectRatio_); - } - 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.vertexai.api.ImageConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ImageConfig other = - (com.google.cloud.vertexai.api.ImageConfig) obj; - - if (hasAspectRatio() != other.hasAspectRatio()) return false; - if (hasAspectRatio()) { - if (!getAspectRatio().equals(other.getAspectRatio())) 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 (hasAspectRatio()) { - hash = (37 * hash) + ASPECT_RATIO_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatio().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImageConfig 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.vertexai.api.ImageConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImageConfig 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.vertexai.api.ImageConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImageConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ImageConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for image generation features.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ImageConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ImageConfig) - com.google.cloud.vertexai.api.ImageConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ImageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ImageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ImageConfig.class, - com.google.cloud.vertexai.api.ImageConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ImageConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - aspectRatio_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ImageConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImageConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImageConfig build() { - com.google.cloud.vertexai.api.ImageConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImageConfig buildPartial() { - com.google.cloud.vertexai.api.ImageConfig result = - new com.google.cloud.vertexai.api.ImageConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ImageConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.aspectRatio_ = aspectRatio_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ImageConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ImageConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ImageConfig other) { - if (other == com.google.cloud.vertexai.api.ImageConfig.getDefaultInstance()) return this; - if (other.hasAspectRatio()) { - aspectRatio_ = other.aspectRatio_; - 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: - { - aspectRatio_ = 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 aspectRatio_ = ""; - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the aspectRatio field is set. - */ - public boolean hasAspectRatio() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The aspectRatio. - */ - public java.lang.String getAspectRatio() { - java.lang.Object ref = aspectRatio_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - aspectRatio_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for aspectRatio. - */ - public com.google.protobuf.ByteString getAspectRatioBytes() { - java.lang.Object ref = aspectRatio_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - aspectRatio_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The aspectRatio to set. - * @return This builder for chaining. - */ - public Builder setAspectRatio(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - aspectRatio_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearAspectRatio() { - aspectRatio_ = getDefaultInstance().getAspectRatio(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The desired aspect ratio for the generated images. The following
-     * aspect ratios are supported:
-     *
-     * "1:1"
-     * "2:3", "3:2"
-     * "3:4", "4:3"
-     * "4:5", "5:4"
-     * "9:16", "16:9"
-     * "21:9"
-     * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for aspectRatio to set. - * @return This builder for chaining. - */ - public Builder setAspectRatioBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - aspectRatio_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ImageConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ImageConfig) - private static final com.google.cloud.vertexai.api.ImageConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ImageConfig(); - } - - public static com.google.cloud.vertexai.api.ImageConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageConfig 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.vertexai.api.ImageConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfigOrBuilder.java deleted file mode 100644 index 3a800b04b58d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImageConfigOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ImageConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ImageConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the aspectRatio field is set. - */ - boolean hasAspectRatio(); - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The aspectRatio. - */ - java.lang.String getAspectRatio(); - - /** - * - * - *
-   * Optional. The desired aspect ratio for the generated images. The following
-   * aspect ratios are supported:
-   *
-   * "1:1"
-   * "2:3", "3:2"
-   * "3:4", "4:3"
-   * "4:5", "5:4"
-   * "9:16", "16:9"
-   * "21:9"
-   * 
- * - * optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for aspectRatio. - */ - com.google.protobuf.ByteString getAspectRatioBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfig.java deleted file mode 100644 index a5eaea96d815..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfig.java +++ /dev/null @@ -1,4617 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for importing RagFiles.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ImportRagFilesConfig} - */ -@com.google.protobuf.Generated -public final class ImportRagFilesConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ImportRagFilesConfig) - ImportRagFilesConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ImportRagFilesConfig"); - } - - // Use ImportRagFilesConfig.newBuilder() to construct. - private ImportRagFilesConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ImportRagFilesConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ImportRagFilesConfig.class, - com.google.cloud.vertexai.api.ImportRagFilesConfig.Builder.class); - } - - private int bitField0_; - private int importSourceCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object importSource_; - - public enum ImportSourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_SOURCE(2), - GOOGLE_DRIVE_SOURCE(3), - SLACK_SOURCE(6), - JIRA_SOURCE(7), - SHARE_POINT_SOURCES(13), - IMPORTSOURCE_NOT_SET(0); - private final int value; - - private ImportSourceCase(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 ImportSourceCase valueOf(int value) { - return forNumber(value); - } - - public static ImportSourceCase forNumber(int value) { - switch (value) { - case 2: - return GCS_SOURCE; - case 3: - return GOOGLE_DRIVE_SOURCE; - case 6: - return SLACK_SOURCE; - case 7: - return JIRA_SOURCE; - case 13: - return SHARE_POINT_SOURCES; - case 0: - return IMPORTSOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ImportSourceCase getImportSourceCase() { - return ImportSourceCase.forNumber(importSourceCase_); - } - - private int partialFailureSinkCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object partialFailureSink_; - - public enum PartialFailureSinkCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - @java.lang.Deprecated - PARTIAL_FAILURE_GCS_SINK(11), - @java.lang.Deprecated - PARTIAL_FAILURE_BIGQUERY_SINK(12), - PARTIALFAILURESINK_NOT_SET(0); - private final int value; - - private PartialFailureSinkCase(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 PartialFailureSinkCase valueOf(int value) { - return forNumber(value); - } - - public static PartialFailureSinkCase forNumber(int value) { - switch (value) { - case 11: - return PARTIAL_FAILURE_GCS_SINK; - case 12: - return PARTIAL_FAILURE_BIGQUERY_SINK; - case 0: - return PARTIALFAILURESINK_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PartialFailureSinkCase getPartialFailureSinkCase() { - return PartialFailureSinkCase.forNumber(partialFailureSinkCase_); - } - - private int importResultSinkCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object importResultSink_; - - public enum ImportResultSinkCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IMPORT_RESULT_GCS_SINK(14), - IMPORT_RESULT_BIGQUERY_SINK(15), - IMPORTRESULTSINK_NOT_SET(0); - private final int value; - - private ImportResultSinkCase(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 ImportResultSinkCase valueOf(int value) { - return forNumber(value); - } - - public static ImportResultSinkCase forNumber(int value) { - switch (value) { - case 14: - return IMPORT_RESULT_GCS_SINK; - case 15: - return IMPORT_RESULT_BIGQUERY_SINK; - case 0: - return IMPORTRESULTSINK_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ImportResultSinkCase getImportResultSinkCase() { - return ImportResultSinkCase.forNumber(importResultSinkCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return importSourceCase_ == 2; - } - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (importSourceCase_ == 2) { - return (com.google.cloud.vertexai.api.GcsSource) importSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (importSourceCase_ == 2) { - return (com.google.cloud.vertexai.api.GcsSource) importSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - - public static final int GOOGLE_DRIVE_SOURCE_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return Whether the googleDriveSource field is set. - */ - @java.lang.Override - public boolean hasGoogleDriveSource() { - return importSourceCase_ == 3; - } - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return The googleDriveSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource() { - if (importSourceCase_ == 3) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder() { - if (importSourceCase_ == 3) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - - public static final int SLACK_SOURCE_FIELD_NUMBER = 6; - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return Whether the slackSource field is set. - */ - @java.lang.Override - public boolean hasSlackSource() { - return importSourceCase_ == 6; - } - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return The slackSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource getSlackSource() { - if (importSourceCase_ == 6) { - return (com.google.cloud.vertexai.api.SlackSource) importSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder() { - if (importSourceCase_ == 6) { - return (com.google.cloud.vertexai.api.SlackSource) importSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - - public static final int JIRA_SOURCE_FIELD_NUMBER = 7; - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return Whether the jiraSource field is set. - */ - @java.lang.Override - public boolean hasJiraSource() { - return importSourceCase_ == 7; - } - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return The jiraSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource getJiraSource() { - if (importSourceCase_ == 7) { - return (com.google.cloud.vertexai.api.JiraSource) importSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder() { - if (importSourceCase_ == 7) { - return (com.google.cloud.vertexai.api.JiraSource) importSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - - public static final int SHARE_POINT_SOURCES_FIELD_NUMBER = 13; - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return Whether the sharePointSources field is set. - */ - @java.lang.Override - public boolean hasSharePointSources() { - return importSourceCase_ == 13; - } - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return The sharePointSources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources getSharePointSources() { - if (importSourceCase_ == 13) { - return (com.google.cloud.vertexai.api.SharePointSources) importSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSourcesOrBuilder getSharePointSourcesOrBuilder() { - if (importSourceCase_ == 13) { - return (com.google.cloud.vertexai.api.SharePointSources) importSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - - public static final int PARTIAL_FAILURE_GCS_SINK_FIELD_NUMBER = 11; - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return Whether the partialFailureGcsSink field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasPartialFailureGcsSink() { - return partialFailureSinkCase_ == 11; - } - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return The partialFailureGcsSink. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.GcsDestination getPartialFailureGcsSink() { - if (partialFailureSinkCase_ == 11) { - return (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getPartialFailureGcsSinkOrBuilder() { - if (partialFailureSinkCase_ == 11) { - return (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - - public static final int PARTIAL_FAILURE_BIGQUERY_SINK_FIELD_NUMBER = 12; - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return Whether the partialFailureBigquerySink field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasPartialFailureBigquerySink() { - return partialFailureSinkCase_ == 12; - } - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return The partialFailureBigquerySink. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.BigQueryDestination getPartialFailureBigquerySink() { - if (partialFailureSinkCase_ == 12) { - return (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getPartialFailureBigquerySinkOrBuilder() { - if (partialFailureSinkCase_ == 12) { - return (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - - public static final int IMPORT_RESULT_GCS_SINK_FIELD_NUMBER = 14; - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return Whether the importResultGcsSink field is set. - */ - @java.lang.Override - public boolean hasImportResultGcsSink() { - return importResultSinkCase_ == 14; - } - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return The importResultGcsSink. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination getImportResultGcsSink() { - if (importResultSinkCase_ == 14) { - return (com.google.cloud.vertexai.api.GcsDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getImportResultGcsSinkOrBuilder() { - if (importResultSinkCase_ == 14) { - return (com.google.cloud.vertexai.api.GcsDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - - public static final int IMPORT_RESULT_BIGQUERY_SINK_FIELD_NUMBER = 15; - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return Whether the importResultBigquerySink field is set. - */ - @java.lang.Override - public boolean hasImportResultBigquerySink() { - return importResultSinkCase_ == 15; - } - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return The importResultBigquerySink. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination getImportResultBigquerySink() { - if (importResultSinkCase_ == 15) { - return (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getImportResultBigquerySinkOrBuilder() { - if (importResultSinkCase_ == 15) { - return (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - - public static final int RAG_FILE_TRANSFORMATION_CONFIG_FIELD_NUMBER = 16; - private com.google.cloud.vertexai.api.RagFileTransformationConfig ragFileTransformationConfig_; - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - @java.lang.Override - public boolean hasRagFileTransformationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return The ragFileTransformationConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfig - getRagFileTransformationConfig() { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder() { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - - public static final int RAG_FILE_PARSING_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.vertexai.api.RagFileParsingConfig ragFileParsingConfig_; - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragFileParsingConfig field is set. - */ - @java.lang.Override - public boolean hasRagFileParsingConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragFileParsingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig getRagFileParsingConfig() { - return ragFileParsingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance() - : ragFileParsingConfig_; - } - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder - getRagFileParsingConfigOrBuilder() { - return ragFileParsingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance() - : ragFileParsingConfig_; - } - - public static final int MAX_EMBEDDING_REQUESTS_PER_MIN_FIELD_NUMBER = 5; - private int maxEmbeddingRequestsPerMin_ = 0; - - /** - * - * - *
-   * Optional. The max number of queries per minute that this job is allowed to
-   * make to the embedding model specified on the corpus. This value is specific
-   * to this job and not shared across other import jobs. Consult the Quotas
-   * page on the project to set an appropriate value here.
-   * If unspecified, a default value of 1,000 QPM would be used.
-   * 
- * - * int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The maxEmbeddingRequestsPerMin. - */ - @java.lang.Override - public int getMaxEmbeddingRequestsPerMin() { - return maxEmbeddingRequestsPerMin_; - } - - public static final int REBUILD_ANN_INDEX_FIELD_NUMBER = 19; - private boolean rebuildAnnIndex_ = false; - - /** - * - * - *
-   * Rebuilds the ANN index to optimize for recall on the imported data.
-   * Only applicable for RagCorpora running on RagManagedDb with
-   * `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
-   * existing ANN config set on the RagCorpus. To change the ANN config, please
-   * use the UpdateRagCorpus API.
-   *
-   * Default is false, i.e., index is not rebuilt.
-   * 
- * - * bool rebuild_ann_index = 19; - * - * @return The rebuildAnnIndex. - */ - @java.lang.Override - public boolean getRebuildAnnIndex() { - return rebuildAnnIndex_; - } - - 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 (importSourceCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.GcsSource) importSource_); - } - if (importSourceCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_); - } - if (maxEmbeddingRequestsPerMin_ != 0) { - output.writeInt32(5, maxEmbeddingRequestsPerMin_); - } - if (importSourceCase_ == 6) { - output.writeMessage(6, (com.google.cloud.vertexai.api.SlackSource) importSource_); - } - if (importSourceCase_ == 7) { - output.writeMessage(7, (com.google.cloud.vertexai.api.JiraSource) importSource_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(8, getRagFileParsingConfig()); - } - if (partialFailureSinkCase_ == 11) { - output.writeMessage(11, (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_); - } - if (partialFailureSinkCase_ == 12) { - output.writeMessage( - 12, (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_); - } - if (importSourceCase_ == 13) { - output.writeMessage(13, (com.google.cloud.vertexai.api.SharePointSources) importSource_); - } - if (importResultSinkCase_ == 14) { - output.writeMessage(14, (com.google.cloud.vertexai.api.GcsDestination) importResultSink_); - } - if (importResultSinkCase_ == 15) { - output.writeMessage( - 15, (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(16, getRagFileTransformationConfig()); - } - if (rebuildAnnIndex_ != false) { - output.writeBool(19, rebuildAnnIndex_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (importSourceCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.GcsSource) importSource_); - } - if (importSourceCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_); - } - if (maxEmbeddingRequestsPerMin_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxEmbeddingRequestsPerMin_); - } - if (importSourceCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.vertexai.api.SlackSource) importSource_); - } - if (importSourceCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.vertexai.api.JiraSource) importSource_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(8, getRagFileParsingConfig()); - } - if (partialFailureSinkCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_); - } - if (partialFailureSinkCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_); - } - if (importSourceCase_ == 13) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 13, (com.google.cloud.vertexai.api.SharePointSources) importSource_); - } - if (importResultSinkCase_ == 14) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 14, (com.google.cloud.vertexai.api.GcsDestination) importResultSink_); - } - if (importResultSinkCase_ == 15) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 15, (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 16, getRagFileTransformationConfig()); - } - if (rebuildAnnIndex_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, rebuildAnnIndex_); - } - 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.vertexai.api.ImportRagFilesConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ImportRagFilesConfig other = - (com.google.cloud.vertexai.api.ImportRagFilesConfig) obj; - - if (hasRagFileTransformationConfig() != other.hasRagFileTransformationConfig()) return false; - if (hasRagFileTransformationConfig()) { - if (!getRagFileTransformationConfig().equals(other.getRagFileTransformationConfig())) - return false; - } - if (hasRagFileParsingConfig() != other.hasRagFileParsingConfig()) return false; - if (hasRagFileParsingConfig()) { - if (!getRagFileParsingConfig().equals(other.getRagFileParsingConfig())) return false; - } - if (getMaxEmbeddingRequestsPerMin() != other.getMaxEmbeddingRequestsPerMin()) return false; - if (getRebuildAnnIndex() != other.getRebuildAnnIndex()) return false; - if (!getImportSourceCase().equals(other.getImportSourceCase())) return false; - switch (importSourceCase_) { - case 2: - if (!getGcsSource().equals(other.getGcsSource())) return false; - break; - case 3: - if (!getGoogleDriveSource().equals(other.getGoogleDriveSource())) return false; - break; - case 6: - if (!getSlackSource().equals(other.getSlackSource())) return false; - break; - case 7: - if (!getJiraSource().equals(other.getJiraSource())) return false; - break; - case 13: - if (!getSharePointSources().equals(other.getSharePointSources())) return false; - break; - case 0: - default: - } - if (!getPartialFailureSinkCase().equals(other.getPartialFailureSinkCase())) return false; - switch (partialFailureSinkCase_) { - case 11: - if (!getPartialFailureGcsSink().equals(other.getPartialFailureGcsSink())) return false; - break; - case 12: - if (!getPartialFailureBigquerySink().equals(other.getPartialFailureBigquerySink())) - return false; - break; - case 0: - default: - } - if (!getImportResultSinkCase().equals(other.getImportResultSinkCase())) return false; - switch (importResultSinkCase_) { - case 14: - if (!getImportResultGcsSink().equals(other.getImportResultGcsSink())) return false; - break; - case 15: - if (!getImportResultBigquerySink().equals(other.getImportResultBigquerySink())) - 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 (hasRagFileTransformationConfig()) { - hash = (37 * hash) + RAG_FILE_TRANSFORMATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagFileTransformationConfig().hashCode(); - } - if (hasRagFileParsingConfig()) { - hash = (37 * hash) + RAG_FILE_PARSING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagFileParsingConfig().hashCode(); - } - hash = (37 * hash) + MAX_EMBEDDING_REQUESTS_PER_MIN_FIELD_NUMBER; - hash = (53 * hash) + getMaxEmbeddingRequestsPerMin(); - hash = (37 * hash) + REBUILD_ANN_INDEX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRebuildAnnIndex()); - switch (importSourceCase_) { - case 2: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 3: - hash = (37 * hash) + GOOGLE_DRIVE_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGoogleDriveSource().hashCode(); - break; - case 6: - hash = (37 * hash) + SLACK_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSlackSource().hashCode(); - break; - case 7: - hash = (37 * hash) + JIRA_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getJiraSource().hashCode(); - break; - case 13: - hash = (37 * hash) + SHARE_POINT_SOURCES_FIELD_NUMBER; - hash = (53 * hash) + getSharePointSources().hashCode(); - break; - case 0: - default: - } - switch (partialFailureSinkCase_) { - case 11: - hash = (37 * hash) + PARTIAL_FAILURE_GCS_SINK_FIELD_NUMBER; - hash = (53 * hash) + getPartialFailureGcsSink().hashCode(); - break; - case 12: - hash = (37 * hash) + PARTIAL_FAILURE_BIGQUERY_SINK_FIELD_NUMBER; - hash = (53 * hash) + getPartialFailureBigquerySink().hashCode(); - break; - case 0: - default: - } - switch (importResultSinkCase_) { - case 14: - hash = (37 * hash) + IMPORT_RESULT_GCS_SINK_FIELD_NUMBER; - hash = (53 * hash) + getImportResultGcsSink().hashCode(); - break; - case 15: - hash = (37 * hash) + IMPORT_RESULT_BIGQUERY_SINK_FIELD_NUMBER; - hash = (53 * hash) + getImportResultBigquerySink().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig 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.vertexai.api.ImportRagFilesConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig 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.vertexai.api.ImportRagFilesConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ImportRagFilesConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for importing RagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ImportRagFilesConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ImportRagFilesConfig) - com.google.cloud.vertexai.api.ImportRagFilesConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ImportRagFilesConfig.class, - com.google.cloud.vertexai.api.ImportRagFilesConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ImportRagFilesConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagFileTransformationConfigFieldBuilder(); - internalGetRagFileParsingConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.clear(); - } - if (googleDriveSourceBuilder_ != null) { - googleDriveSourceBuilder_.clear(); - } - if (slackSourceBuilder_ != null) { - slackSourceBuilder_.clear(); - } - if (jiraSourceBuilder_ != null) { - jiraSourceBuilder_.clear(); - } - if (sharePointSourcesBuilder_ != null) { - sharePointSourcesBuilder_.clear(); - } - if (partialFailureGcsSinkBuilder_ != null) { - partialFailureGcsSinkBuilder_.clear(); - } - if (partialFailureBigquerySinkBuilder_ != null) { - partialFailureBigquerySinkBuilder_.clear(); - } - if (importResultGcsSinkBuilder_ != null) { - importResultGcsSinkBuilder_.clear(); - } - if (importResultBigquerySinkBuilder_ != null) { - importResultBigquerySinkBuilder_.clear(); - } - ragFileTransformationConfig_ = null; - if (ragFileTransformationConfigBuilder_ != null) { - ragFileTransformationConfigBuilder_.dispose(); - ragFileTransformationConfigBuilder_ = null; - } - ragFileParsingConfig_ = null; - if (ragFileParsingConfigBuilder_ != null) { - ragFileParsingConfigBuilder_.dispose(); - ragFileParsingConfigBuilder_ = null; - } - maxEmbeddingRequestsPerMin_ = 0; - rebuildAnnIndex_ = false; - importSourceCase_ = 0; - importSource_ = null; - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - importResultSinkCase_ = 0; - importResultSink_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImportRagFilesConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ImportRagFilesConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImportRagFilesConfig build() { - com.google.cloud.vertexai.api.ImportRagFilesConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ImportRagFilesConfig buildPartial() { - com.google.cloud.vertexai.api.ImportRagFilesConfig result = - new com.google.cloud.vertexai.api.ImportRagFilesConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ImportRagFilesConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000200) != 0)) { - result.ragFileTransformationConfig_ = - ragFileTransformationConfigBuilder_ == null - ? ragFileTransformationConfig_ - : ragFileTransformationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.ragFileParsingConfig_ = - ragFileParsingConfigBuilder_ == null - ? ragFileParsingConfig_ - : ragFileParsingConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.maxEmbeddingRequestsPerMin_ = maxEmbeddingRequestsPerMin_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.rebuildAnnIndex_ = rebuildAnnIndex_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.ImportRagFilesConfig result) { - result.importSourceCase_ = importSourceCase_; - result.importSource_ = this.importSource_; - if (importSourceCase_ == 2 && gcsSourceBuilder_ != null) { - result.importSource_ = gcsSourceBuilder_.build(); - } - if (importSourceCase_ == 3 && googleDriveSourceBuilder_ != null) { - result.importSource_ = googleDriveSourceBuilder_.build(); - } - if (importSourceCase_ == 6 && slackSourceBuilder_ != null) { - result.importSource_ = slackSourceBuilder_.build(); - } - if (importSourceCase_ == 7 && jiraSourceBuilder_ != null) { - result.importSource_ = jiraSourceBuilder_.build(); - } - if (importSourceCase_ == 13 && sharePointSourcesBuilder_ != null) { - result.importSource_ = sharePointSourcesBuilder_.build(); - } - result.partialFailureSinkCase_ = partialFailureSinkCase_; - result.partialFailureSink_ = this.partialFailureSink_; - if (partialFailureSinkCase_ == 11 && partialFailureGcsSinkBuilder_ != null) { - result.partialFailureSink_ = partialFailureGcsSinkBuilder_.build(); - } - if (partialFailureSinkCase_ == 12 && partialFailureBigquerySinkBuilder_ != null) { - result.partialFailureSink_ = partialFailureBigquerySinkBuilder_.build(); - } - result.importResultSinkCase_ = importResultSinkCase_; - result.importResultSink_ = this.importResultSink_; - if (importResultSinkCase_ == 14 && importResultGcsSinkBuilder_ != null) { - result.importResultSink_ = importResultGcsSinkBuilder_.build(); - } - if (importResultSinkCase_ == 15 && importResultBigquerySinkBuilder_ != null) { - result.importResultSink_ = importResultBigquerySinkBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ImportRagFilesConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ImportRagFilesConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ImportRagFilesConfig other) { - if (other == com.google.cloud.vertexai.api.ImportRagFilesConfig.getDefaultInstance()) - return this; - if (other.hasRagFileTransformationConfig()) { - mergeRagFileTransformationConfig(other.getRagFileTransformationConfig()); - } - if (other.hasRagFileParsingConfig()) { - mergeRagFileParsingConfig(other.getRagFileParsingConfig()); - } - if (other.getMaxEmbeddingRequestsPerMin() != 0) { - setMaxEmbeddingRequestsPerMin(other.getMaxEmbeddingRequestsPerMin()); - } - if (other.getRebuildAnnIndex() != false) { - setRebuildAnnIndex(other.getRebuildAnnIndex()); - } - switch (other.getImportSourceCase()) { - case GCS_SOURCE: - { - mergeGcsSource(other.getGcsSource()); - break; - } - case GOOGLE_DRIVE_SOURCE: - { - mergeGoogleDriveSource(other.getGoogleDriveSource()); - break; - } - case SLACK_SOURCE: - { - mergeSlackSource(other.getSlackSource()); - break; - } - case JIRA_SOURCE: - { - mergeJiraSource(other.getJiraSource()); - break; - } - case SHARE_POINT_SOURCES: - { - mergeSharePointSources(other.getSharePointSources()); - break; - } - case IMPORTSOURCE_NOT_SET: - { - break; - } - } - switch (other.getPartialFailureSinkCase()) { - case PARTIAL_FAILURE_GCS_SINK: - { - mergePartialFailureGcsSink(other.getPartialFailureGcsSink()); - break; - } - case PARTIAL_FAILURE_BIGQUERY_SINK: - { - mergePartialFailureBigquerySink(other.getPartialFailureBigquerySink()); - break; - } - case PARTIALFAILURESINK_NOT_SET: - { - break; - } - } - switch (other.getImportResultSinkCase()) { - case IMPORT_RESULT_GCS_SINK: - { - mergeImportResultGcsSink(other.getImportResultGcsSink()); - break; - } - case IMPORT_RESULT_BIGQUERY_SINK: - { - mergeImportResultBigquerySink(other.getImportResultBigquerySink()); - break; - } - case IMPORTRESULTSINK_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 18: - { - input.readMessage( - internalGetGcsSourceFieldBuilder().getBuilder(), extensionRegistry); - importSourceCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetGoogleDriveSourceFieldBuilder().getBuilder(), extensionRegistry); - importSourceCase_ = 3; - break; - } // case 26 - case 40: - { - maxEmbeddingRequestsPerMin_ = input.readInt32(); - bitField0_ |= 0x00000800; - break; - } // case 40 - case 50: - { - input.readMessage( - internalGetSlackSourceFieldBuilder().getBuilder(), extensionRegistry); - importSourceCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetJiraSourceFieldBuilder().getBuilder(), extensionRegistry); - importSourceCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetRagFileParsingConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 66 - case 90: - { - input.readMessage( - internalGetPartialFailureGcsSinkFieldBuilder().getBuilder(), extensionRegistry); - partialFailureSinkCase_ = 11; - break; - } // case 90 - case 98: - { - input.readMessage( - internalGetPartialFailureBigquerySinkFieldBuilder().getBuilder(), - extensionRegistry); - partialFailureSinkCase_ = 12; - break; - } // case 98 - case 106: - { - input.readMessage( - internalGetSharePointSourcesFieldBuilder().getBuilder(), extensionRegistry); - importSourceCase_ = 13; - break; - } // case 106 - case 114: - { - input.readMessage( - internalGetImportResultGcsSinkFieldBuilder().getBuilder(), extensionRegistry); - importResultSinkCase_ = 14; - break; - } // case 114 - case 122: - { - input.readMessage( - internalGetImportResultBigquerySinkFieldBuilder().getBuilder(), - extensionRegistry); - importResultSinkCase_ = 15; - break; - } // case 122 - case 130: - { - input.readMessage( - internalGetRagFileTransformationConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 130 - case 152: - { - rebuildAnnIndex_ = input.readBool(); - bitField0_ |= 0x00001000; - break; - } // case 152 - 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 importSourceCase_ = 0; - private java.lang.Object importSource_; - - public ImportSourceCase getImportSourceCase() { - return ImportSourceCase.forNumber(importSourceCase_); - } - - public Builder clearImportSource() { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - return this; - } - - private int partialFailureSinkCase_ = 0; - private java.lang.Object partialFailureSink_; - - public PartialFailureSinkCase getPartialFailureSinkCase() { - return PartialFailureSinkCase.forNumber(partialFailureSinkCase_); - } - - public Builder clearPartialFailureSink() { - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - onChanged(); - return this; - } - - private int importResultSinkCase_ = 0; - private java.lang.Object importResultSink_; - - public ImportResultSinkCase getImportResultSinkCase() { - return ImportResultSinkCase.forNumber(importResultSinkCase_); - } - - public Builder clearImportResultSink() { - importResultSinkCase_ = 0; - importResultSink_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - gcsSourceBuilder_; - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return importSourceCase_ == 2; - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (importSourceCase_ == 2) { - return (com.google.cloud.vertexai.api.GcsSource) importSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } else { - if (importSourceCase_ == 2) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - importSourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - importSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - importSourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (importSourceCase_ == 2 - && importSource_ != com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) { - importSource_ = - com.google.cloud.vertexai.api.GcsSource.newBuilder( - (com.google.cloud.vertexai.api.GcsSource) importSource_) - .mergeFrom(value) - .buildPartial(); - } else { - importSource_ = value; - } - onChanged(); - } else { - if (importSourceCase_ == 2) { - gcsSourceBuilder_.mergeFrom(value); - } else { - gcsSourceBuilder_.setMessage(value); - } - } - importSourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (importSourceCase_ == 2) { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - } - } else { - if (importSourceCase_ == 2) { - importSourceCase_ = 0; - importSource_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - public com.google.cloud.vertexai.api.GcsSource.Builder getGcsSourceBuilder() { - return internalGetGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((importSourceCase_ == 2) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (importSourceCase_ == 2) { - return (com.google.cloud.vertexai.api.GcsSource) importSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Google Cloud Storage location. Supports importing individual files as
-     * well as entire Google Cloud Storage directories. Sample formats:
-     * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-     * - `gs://bucket_name/my_directory`
-     * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - internalGetGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(importSourceCase_ == 2)) { - importSource_ = com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder>( - (com.google.cloud.vertexai.api.GcsSource) importSource_, - getParentForChildren(), - isClean()); - importSource_ = null; - } - importSourceCase_ = 2; - onChanged(); - return gcsSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder> - googleDriveSourceBuilder_; - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return Whether the googleDriveSource field is set. - */ - @java.lang.Override - public boolean hasGoogleDriveSource() { - return importSourceCase_ == 3; - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return The googleDriveSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource() { - if (googleDriveSourceBuilder_ == null) { - if (importSourceCase_ == 3) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } else { - if (importSourceCase_ == 3) { - return googleDriveSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - public Builder setGoogleDriveSource(com.google.cloud.vertexai.api.GoogleDriveSource value) { - if (googleDriveSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importSource_ = value; - onChanged(); - } else { - googleDriveSourceBuilder_.setMessage(value); - } - importSourceCase_ = 3; - return this; - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - public Builder setGoogleDriveSource( - com.google.cloud.vertexai.api.GoogleDriveSource.Builder builderForValue) { - if (googleDriveSourceBuilder_ == null) { - importSource_ = builderForValue.build(); - onChanged(); - } else { - googleDriveSourceBuilder_.setMessage(builderForValue.build()); - } - importSourceCase_ = 3; - return this; - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - public Builder mergeGoogleDriveSource(com.google.cloud.vertexai.api.GoogleDriveSource value) { - if (googleDriveSourceBuilder_ == null) { - if (importSourceCase_ == 3 - && importSource_ - != com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance()) { - importSource_ = - com.google.cloud.vertexai.api.GoogleDriveSource.newBuilder( - (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_) - .mergeFrom(value) - .buildPartial(); - } else { - importSource_ = value; - } - onChanged(); - } else { - if (importSourceCase_ == 3) { - googleDriveSourceBuilder_.mergeFrom(value); - } else { - googleDriveSourceBuilder_.setMessage(value); - } - } - importSourceCase_ = 3; - return this; - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - public Builder clearGoogleDriveSource() { - if (googleDriveSourceBuilder_ == null) { - if (importSourceCase_ == 3) { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - } - } else { - if (importSourceCase_ == 3) { - importSourceCase_ = 0; - importSource_ = null; - } - googleDriveSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.Builder getGoogleDriveSourceBuilder() { - return internalGetGoogleDriveSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder - getGoogleDriveSourceOrBuilder() { - if ((importSourceCase_ == 3) && (googleDriveSourceBuilder_ != null)) { - return googleDriveSourceBuilder_.getMessageOrBuilder(); - } else { - if (importSourceCase_ == 3) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Google Drive location. Supports importing individual files as
-     * well as Google Drive folders.
-     * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder> - internalGetGoogleDriveSourceFieldBuilder() { - if (googleDriveSourceBuilder_ == null) { - if (!(importSourceCase_ == 3)) { - importSource_ = com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - googleDriveSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder>( - (com.google.cloud.vertexai.api.GoogleDriveSource) importSource_, - getParentForChildren(), - isClean()); - importSource_ = null; - } - importSourceCase_ = 3; - onChanged(); - return googleDriveSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder> - slackSourceBuilder_; - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return Whether the slackSource field is set. - */ - @java.lang.Override - public boolean hasSlackSource() { - return importSourceCase_ == 6; - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return The slackSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource getSlackSource() { - if (slackSourceBuilder_ == null) { - if (importSourceCase_ == 6) { - return (com.google.cloud.vertexai.api.SlackSource) importSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } else { - if (importSourceCase_ == 6) { - return slackSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - public Builder setSlackSource(com.google.cloud.vertexai.api.SlackSource value) { - if (slackSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importSource_ = value; - onChanged(); - } else { - slackSourceBuilder_.setMessage(value); - } - importSourceCase_ = 6; - return this; - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - public Builder setSlackSource( - com.google.cloud.vertexai.api.SlackSource.Builder builderForValue) { - if (slackSourceBuilder_ == null) { - importSource_ = builderForValue.build(); - onChanged(); - } else { - slackSourceBuilder_.setMessage(builderForValue.build()); - } - importSourceCase_ = 6; - return this; - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - public Builder mergeSlackSource(com.google.cloud.vertexai.api.SlackSource value) { - if (slackSourceBuilder_ == null) { - if (importSourceCase_ == 6 - && importSource_ != com.google.cloud.vertexai.api.SlackSource.getDefaultInstance()) { - importSource_ = - com.google.cloud.vertexai.api.SlackSource.newBuilder( - (com.google.cloud.vertexai.api.SlackSource) importSource_) - .mergeFrom(value) - .buildPartial(); - } else { - importSource_ = value; - } - onChanged(); - } else { - if (importSourceCase_ == 6) { - slackSourceBuilder_.mergeFrom(value); - } else { - slackSourceBuilder_.setMessage(value); - } - } - importSourceCase_ = 6; - return this; - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - public Builder clearSlackSource() { - if (slackSourceBuilder_ == null) { - if (importSourceCase_ == 6) { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - } - } else { - if (importSourceCase_ == 6) { - importSourceCase_ = 0; - importSource_ = null; - } - slackSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - public com.google.cloud.vertexai.api.SlackSource.Builder getSlackSourceBuilder() { - return internalGetSlackSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder() { - if ((importSourceCase_ == 6) && (slackSourceBuilder_ != null)) { - return slackSourceBuilder_.getMessageOrBuilder(); - } else { - if (importSourceCase_ == 6) { - return (com.google.cloud.vertexai.api.SlackSource) importSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Slack channels with their corresponding access tokens.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder> - internalGetSlackSourceFieldBuilder() { - if (slackSourceBuilder_ == null) { - if (!(importSourceCase_ == 6)) { - importSource_ = com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - slackSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder>( - (com.google.cloud.vertexai.api.SlackSource) importSource_, - getParentForChildren(), - isClean()); - importSource_ = null; - } - importSourceCase_ = 6; - onChanged(); - return slackSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder> - jiraSourceBuilder_; - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return Whether the jiraSource field is set. - */ - @java.lang.Override - public boolean hasJiraSource() { - return importSourceCase_ == 7; - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return The jiraSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource getJiraSource() { - if (jiraSourceBuilder_ == null) { - if (importSourceCase_ == 7) { - return (com.google.cloud.vertexai.api.JiraSource) importSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } else { - if (importSourceCase_ == 7) { - return jiraSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - public Builder setJiraSource(com.google.cloud.vertexai.api.JiraSource value) { - if (jiraSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importSource_ = value; - onChanged(); - } else { - jiraSourceBuilder_.setMessage(value); - } - importSourceCase_ = 7; - return this; - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - public Builder setJiraSource(com.google.cloud.vertexai.api.JiraSource.Builder builderForValue) { - if (jiraSourceBuilder_ == null) { - importSource_ = builderForValue.build(); - onChanged(); - } else { - jiraSourceBuilder_.setMessage(builderForValue.build()); - } - importSourceCase_ = 7; - return this; - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - public Builder mergeJiraSource(com.google.cloud.vertexai.api.JiraSource value) { - if (jiraSourceBuilder_ == null) { - if (importSourceCase_ == 7 - && importSource_ != com.google.cloud.vertexai.api.JiraSource.getDefaultInstance()) { - importSource_ = - com.google.cloud.vertexai.api.JiraSource.newBuilder( - (com.google.cloud.vertexai.api.JiraSource) importSource_) - .mergeFrom(value) - .buildPartial(); - } else { - importSource_ = value; - } - onChanged(); - } else { - if (importSourceCase_ == 7) { - jiraSourceBuilder_.mergeFrom(value); - } else { - jiraSourceBuilder_.setMessage(value); - } - } - importSourceCase_ = 7; - return this; - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - public Builder clearJiraSource() { - if (jiraSourceBuilder_ == null) { - if (importSourceCase_ == 7) { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - } - } else { - if (importSourceCase_ == 7) { - importSourceCase_ = 0; - importSource_ = null; - } - jiraSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - public com.google.cloud.vertexai.api.JiraSource.Builder getJiraSourceBuilder() { - return internalGetJiraSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder() { - if ((importSourceCase_ == 7) && (jiraSourceBuilder_ != null)) { - return jiraSourceBuilder_.getMessageOrBuilder(); - } else { - if (importSourceCase_ == 7) { - return (com.google.cloud.vertexai.api.JiraSource) importSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Jira queries with their corresponding authentication.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder> - internalGetJiraSourceFieldBuilder() { - if (jiraSourceBuilder_ == null) { - if (!(importSourceCase_ == 7)) { - importSource_ = com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - jiraSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder>( - (com.google.cloud.vertexai.api.JiraSource) importSource_, - getParentForChildren(), - isClean()); - importSource_ = null; - } - importSourceCase_ = 7; - onChanged(); - return jiraSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder> - sharePointSourcesBuilder_; - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return Whether the sharePointSources field is set. - */ - @java.lang.Override - public boolean hasSharePointSources() { - return importSourceCase_ == 13; - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return The sharePointSources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources getSharePointSources() { - if (sharePointSourcesBuilder_ == null) { - if (importSourceCase_ == 13) { - return (com.google.cloud.vertexai.api.SharePointSources) importSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } else { - if (importSourceCase_ == 13) { - return sharePointSourcesBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - public Builder setSharePointSources(com.google.cloud.vertexai.api.SharePointSources value) { - if (sharePointSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importSource_ = value; - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(value); - } - importSourceCase_ = 13; - return this; - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - public Builder setSharePointSources( - com.google.cloud.vertexai.api.SharePointSources.Builder builderForValue) { - if (sharePointSourcesBuilder_ == null) { - importSource_ = builderForValue.build(); - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(builderForValue.build()); - } - importSourceCase_ = 13; - return this; - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - public Builder mergeSharePointSources(com.google.cloud.vertexai.api.SharePointSources value) { - if (sharePointSourcesBuilder_ == null) { - if (importSourceCase_ == 13 - && importSource_ - != com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance()) { - importSource_ = - com.google.cloud.vertexai.api.SharePointSources.newBuilder( - (com.google.cloud.vertexai.api.SharePointSources) importSource_) - .mergeFrom(value) - .buildPartial(); - } else { - importSource_ = value; - } - onChanged(); - } else { - if (importSourceCase_ == 13) { - sharePointSourcesBuilder_.mergeFrom(value); - } else { - sharePointSourcesBuilder_.setMessage(value); - } - } - importSourceCase_ = 13; - return this; - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - public Builder clearSharePointSources() { - if (sharePointSourcesBuilder_ == null) { - if (importSourceCase_ == 13) { - importSourceCase_ = 0; - importSource_ = null; - onChanged(); - } - } else { - if (importSourceCase_ == 13) { - importSourceCase_ = 0; - importSource_ = null; - } - sharePointSourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - public com.google.cloud.vertexai.api.SharePointSources.Builder getSharePointSourcesBuilder() { - return internalGetSharePointSourcesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSourcesOrBuilder - getSharePointSourcesOrBuilder() { - if ((importSourceCase_ == 13) && (sharePointSourcesBuilder_ != null)) { - return sharePointSourcesBuilder_.getMessageOrBuilder(); - } else { - if (importSourceCase_ == 13) { - return (com.google.cloud.vertexai.api.SharePointSources) importSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * SharePoint sources.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder> - internalGetSharePointSourcesFieldBuilder() { - if (sharePointSourcesBuilder_ == null) { - if (!(importSourceCase_ == 13)) { - importSource_ = com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - sharePointSourcesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder>( - (com.google.cloud.vertexai.api.SharePointSources) importSource_, - getParentForChildren(), - isClean()); - importSource_ = null; - } - importSourceCase_ = 13; - onChanged(); - return sharePointSourcesBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - partialFailureGcsSinkBuilder_; - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return Whether the partialFailureGcsSink field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasPartialFailureGcsSink() { - return partialFailureSinkCase_ == 11; - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return The partialFailureGcsSink. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.GcsDestination getPartialFailureGcsSink() { - if (partialFailureGcsSinkBuilder_ == null) { - if (partialFailureSinkCase_ == 11) { - return (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } else { - if (partialFailureSinkCase_ == 11) { - return partialFailureGcsSinkBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setPartialFailureGcsSink(com.google.cloud.vertexai.api.GcsDestination value) { - if (partialFailureGcsSinkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partialFailureSink_ = value; - onChanged(); - } else { - partialFailureGcsSinkBuilder_.setMessage(value); - } - partialFailureSinkCase_ = 11; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setPartialFailureGcsSink( - com.google.cloud.vertexai.api.GcsDestination.Builder builderForValue) { - if (partialFailureGcsSinkBuilder_ == null) { - partialFailureSink_ = builderForValue.build(); - onChanged(); - } else { - partialFailureGcsSinkBuilder_.setMessage(builderForValue.build()); - } - partialFailureSinkCase_ = 11; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder mergePartialFailureGcsSink(com.google.cloud.vertexai.api.GcsDestination value) { - if (partialFailureGcsSinkBuilder_ == null) { - if (partialFailureSinkCase_ == 11 - && partialFailureSink_ - != com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance()) { - partialFailureSink_ = - com.google.cloud.vertexai.api.GcsDestination.newBuilder( - (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_) - .mergeFrom(value) - .buildPartial(); - } else { - partialFailureSink_ = value; - } - onChanged(); - } else { - if (partialFailureSinkCase_ == 11) { - partialFailureGcsSinkBuilder_.mergeFrom(value); - } else { - partialFailureGcsSinkBuilder_.setMessage(value); - } - } - partialFailureSinkCase_ = 11; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder clearPartialFailureGcsSink() { - if (partialFailureGcsSinkBuilder_ == null) { - if (partialFailureSinkCase_ == 11) { - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - onChanged(); - } - } else { - if (partialFailureSinkCase_ == 11) { - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - } - partialFailureGcsSinkBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.vertexai.api.GcsDestination.Builder getPartialFailureGcsSinkBuilder() { - return internalGetPartialFailureGcsSinkFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder - getPartialFailureGcsSinkOrBuilder() { - if ((partialFailureSinkCase_ == 11) && (partialFailureGcsSinkBuilder_ != null)) { - return partialFailureGcsSinkBuilder_.getMessageOrBuilder(); - } else { - if (partialFailureSinkCase_ == 11) { - return (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage path to write partial failures to.
-     * Deprecated. Prefer to use `import_result_gcs_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - internalGetPartialFailureGcsSinkFieldBuilder() { - if (partialFailureGcsSinkBuilder_ == null) { - if (!(partialFailureSinkCase_ == 11)) { - partialFailureSink_ = com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - partialFailureGcsSinkBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder>( - (com.google.cloud.vertexai.api.GcsDestination) partialFailureSink_, - getParentForChildren(), - isClean()); - partialFailureSink_ = null; - } - partialFailureSinkCase_ = 11; - onChanged(); - return partialFailureGcsSinkBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - partialFailureBigquerySinkBuilder_; - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return Whether the partialFailureBigquerySink field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasPartialFailureBigquerySink() { - return partialFailureSinkCase_ == 12; - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return The partialFailureBigquerySink. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.BigQueryDestination getPartialFailureBigquerySink() { - if (partialFailureBigquerySinkBuilder_ == null) { - if (partialFailureSinkCase_ == 12) { - return (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } else { - if (partialFailureSinkCase_ == 12) { - return partialFailureBigquerySinkBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setPartialFailureBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination value) { - if (partialFailureBigquerySinkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partialFailureSink_ = value; - onChanged(); - } else { - partialFailureBigquerySinkBuilder_.setMessage(value); - } - partialFailureSinkCase_ = 12; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setPartialFailureBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination.Builder builderForValue) { - if (partialFailureBigquerySinkBuilder_ == null) { - partialFailureSink_ = builderForValue.build(); - onChanged(); - } else { - partialFailureBigquerySinkBuilder_.setMessage(builderForValue.build()); - } - partialFailureSinkCase_ = 12; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder mergePartialFailureBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination value) { - if (partialFailureBigquerySinkBuilder_ == null) { - if (partialFailureSinkCase_ == 12 - && partialFailureSink_ - != com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance()) { - partialFailureSink_ = - com.google.cloud.vertexai.api.BigQueryDestination.newBuilder( - (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_) - .mergeFrom(value) - .buildPartial(); - } else { - partialFailureSink_ = value; - } - onChanged(); - } else { - if (partialFailureSinkCase_ == 12) { - partialFailureBigquerySinkBuilder_.mergeFrom(value); - } else { - partialFailureBigquerySinkBuilder_.setMessage(value); - } - } - partialFailureSinkCase_ = 12; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder clearPartialFailureBigquerySink() { - if (partialFailureBigquerySinkBuilder_ == null) { - if (partialFailureSinkCase_ == 12) { - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - onChanged(); - } - } else { - if (partialFailureSinkCase_ == 12) { - partialFailureSinkCase_ = 0; - partialFailureSink_ = null; - } - partialFailureBigquerySinkBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.vertexai.api.BigQueryDestination.Builder - getPartialFailureBigquerySinkBuilder() { - return internalGetPartialFailureBigquerySinkFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getPartialFailureBigquerySinkOrBuilder() { - if ((partialFailureSinkCase_ == 12) && (partialFailureBigquerySinkBuilder_ != null)) { - return partialFailureBigquerySinkBuilder_.getMessageOrBuilder(); - } else { - if (partialFailureSinkCase_ == 12) { - return (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The BigQuery destination to write partial failures to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * Deprecated. Prefer to use `import_result_bq_sink`.
-     * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - internalGetPartialFailureBigquerySinkFieldBuilder() { - if (partialFailureBigquerySinkBuilder_ == null) { - if (!(partialFailureSinkCase_ == 12)) { - partialFailureSink_ = - com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - partialFailureBigquerySinkBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder>( - (com.google.cloud.vertexai.api.BigQueryDestination) partialFailureSink_, - getParentForChildren(), - isClean()); - partialFailureSink_ = null; - } - partialFailureSinkCase_ = 12; - onChanged(); - return partialFailureBigquerySinkBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - importResultGcsSinkBuilder_; - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return Whether the importResultGcsSink field is set. - */ - @java.lang.Override - public boolean hasImportResultGcsSink() { - return importResultSinkCase_ == 14; - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return The importResultGcsSink. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination getImportResultGcsSink() { - if (importResultGcsSinkBuilder_ == null) { - if (importResultSinkCase_ == 14) { - return (com.google.cloud.vertexai.api.GcsDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } else { - if (importResultSinkCase_ == 14) { - return importResultGcsSinkBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - public Builder setImportResultGcsSink(com.google.cloud.vertexai.api.GcsDestination value) { - if (importResultGcsSinkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importResultSink_ = value; - onChanged(); - } else { - importResultGcsSinkBuilder_.setMessage(value); - } - importResultSinkCase_ = 14; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - public Builder setImportResultGcsSink( - com.google.cloud.vertexai.api.GcsDestination.Builder builderForValue) { - if (importResultGcsSinkBuilder_ == null) { - importResultSink_ = builderForValue.build(); - onChanged(); - } else { - importResultGcsSinkBuilder_.setMessage(builderForValue.build()); - } - importResultSinkCase_ = 14; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - public Builder mergeImportResultGcsSink(com.google.cloud.vertexai.api.GcsDestination value) { - if (importResultGcsSinkBuilder_ == null) { - if (importResultSinkCase_ == 14 - && importResultSink_ - != com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance()) { - importResultSink_ = - com.google.cloud.vertexai.api.GcsDestination.newBuilder( - (com.google.cloud.vertexai.api.GcsDestination) importResultSink_) - .mergeFrom(value) - .buildPartial(); - } else { - importResultSink_ = value; - } - onChanged(); - } else { - if (importResultSinkCase_ == 14) { - importResultGcsSinkBuilder_.mergeFrom(value); - } else { - importResultGcsSinkBuilder_.setMessage(value); - } - } - importResultSinkCase_ = 14; - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - public Builder clearImportResultGcsSink() { - if (importResultGcsSinkBuilder_ == null) { - if (importResultSinkCase_ == 14) { - importResultSinkCase_ = 0; - importResultSink_ = null; - onChanged(); - } - } else { - if (importResultSinkCase_ == 14) { - importResultSinkCase_ = 0; - importResultSink_ = null; - } - importResultGcsSinkBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - public com.google.cloud.vertexai.api.GcsDestination.Builder getImportResultGcsSinkBuilder() { - return internalGetImportResultGcsSinkFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getImportResultGcsSinkOrBuilder() { - if ((importResultSinkCase_ == 14) && (importResultGcsSinkBuilder_ != null)) { - return importResultGcsSinkBuilder_.getMessageOrBuilder(); - } else { - if (importResultSinkCase_ == 14) { - return (com.google.cloud.vertexai.api.GcsDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Cloud Storage path to write import result to.
-     * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - internalGetImportResultGcsSinkFieldBuilder() { - if (importResultGcsSinkBuilder_ == null) { - if (!(importResultSinkCase_ == 14)) { - importResultSink_ = com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance(); - } - importResultGcsSinkBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder>( - (com.google.cloud.vertexai.api.GcsDestination) importResultSink_, - getParentForChildren(), - isClean()); - importResultSink_ = null; - } - importResultSinkCase_ = 14; - onChanged(); - return importResultGcsSinkBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - importResultBigquerySinkBuilder_; - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return Whether the importResultBigquerySink field is set. - */ - @java.lang.Override - public boolean hasImportResultBigquerySink() { - return importResultSinkCase_ == 15; - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return The importResultBigquerySink. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination getImportResultBigquerySink() { - if (importResultBigquerySinkBuilder_ == null) { - if (importResultSinkCase_ == 15) { - return (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } else { - if (importResultSinkCase_ == 15) { - return importResultBigquerySinkBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - public Builder setImportResultBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination value) { - if (importResultBigquerySinkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - importResultSink_ = value; - onChanged(); - } else { - importResultBigquerySinkBuilder_.setMessage(value); - } - importResultSinkCase_ = 15; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - public Builder setImportResultBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination.Builder builderForValue) { - if (importResultBigquerySinkBuilder_ == null) { - importResultSink_ = builderForValue.build(); - onChanged(); - } else { - importResultBigquerySinkBuilder_.setMessage(builderForValue.build()); - } - importResultSinkCase_ = 15; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - public Builder mergeImportResultBigquerySink( - com.google.cloud.vertexai.api.BigQueryDestination value) { - if (importResultBigquerySinkBuilder_ == null) { - if (importResultSinkCase_ == 15 - && importResultSink_ - != com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance()) { - importResultSink_ = - com.google.cloud.vertexai.api.BigQueryDestination.newBuilder( - (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_) - .mergeFrom(value) - .buildPartial(); - } else { - importResultSink_ = value; - } - onChanged(); - } else { - if (importResultSinkCase_ == 15) { - importResultBigquerySinkBuilder_.mergeFrom(value); - } else { - importResultBigquerySinkBuilder_.setMessage(value); - } - } - importResultSinkCase_ = 15; - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - public Builder clearImportResultBigquerySink() { - if (importResultBigquerySinkBuilder_ == null) { - if (importResultSinkCase_ == 15) { - importResultSinkCase_ = 0; - importResultSink_ = null; - onChanged(); - } - } else { - if (importResultSinkCase_ == 15) { - importResultSinkCase_ = 0; - importResultSink_ = null; - } - importResultBigquerySinkBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - public com.google.cloud.vertexai.api.BigQueryDestination.Builder - getImportResultBigquerySinkBuilder() { - return internalGetImportResultBigquerySinkFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getImportResultBigquerySinkOrBuilder() { - if ((importResultSinkCase_ == 15) && (importResultBigquerySinkBuilder_ != null)) { - return importResultBigquerySinkBuilder_.getMessageOrBuilder(); - } else { - if (importResultSinkCase_ == 15) { - return (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_; - } - return com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The BigQuery destination to write import result to. It should be a
-     * bigquery table resource name (e.g.
-     * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-     * table does not exist, it will be created with the expected schema. If the
-     * table exists, the schema will be validated and data will be added to this
-     * existing table.
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - internalGetImportResultBigquerySinkFieldBuilder() { - if (importResultBigquerySinkBuilder_ == null) { - if (!(importResultSinkCase_ == 15)) { - importResultSink_ = - com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance(); - } - importResultBigquerySinkBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder>( - (com.google.cloud.vertexai.api.BigQueryDestination) importResultSink_, - getParentForChildren(), - isClean()); - importResultSink_ = null; - } - importResultSinkCase_ = 15; - onChanged(); - return importResultBigquerySinkBuilder_; - } - - private com.google.cloud.vertexai.api.RagFileTransformationConfig ragFileTransformationConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder> - ragFileTransformationConfigBuilder_; - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - public boolean hasRagFileTransformationConfig() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return The ragFileTransformationConfig. - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfig - getRagFileTransformationConfig() { - if (ragFileTransformationConfigBuilder_ == null) { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } else { - return ragFileTransformationConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public Builder setRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig value) { - if (ragFileTransformationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileTransformationConfig_ = value; - } else { - ragFileTransformationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public Builder setRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder builderForValue) { - if (ragFileTransformationConfigBuilder_ == null) { - ragFileTransformationConfig_ = builderForValue.build(); - } else { - ragFileTransformationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public Builder mergeRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig value) { - if (ragFileTransformationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && ragFileTransformationConfig_ != null - && ragFileTransformationConfig_ - != com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance()) { - getRagFileTransformationConfigBuilder().mergeFrom(value); - } else { - ragFileTransformationConfig_ = value; - } - } else { - ragFileTransformationConfigBuilder_.mergeFrom(value); - } - if (ragFileTransformationConfig_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public Builder clearRagFileTransformationConfig() { - bitField0_ = (bitField0_ & ~0x00000200); - ragFileTransformationConfig_ = null; - if (ragFileTransformationConfigBuilder_ != null) { - ragFileTransformationConfigBuilder_.dispose(); - ragFileTransformationConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder - getRagFileTransformationConfigBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetRagFileTransformationConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder() { - if (ragFileTransformationConfigBuilder_ != null) { - return ragFileTransformationConfigBuilder_.getMessageOrBuilder(); - } else { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder> - internalGetRagFileTransformationConfigFieldBuilder() { - if (ragFileTransformationConfigBuilder_ == null) { - ragFileTransformationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder>( - getRagFileTransformationConfig(), getParentForChildren(), isClean()); - ragFileTransformationConfig_ = null; - } - return ragFileTransformationConfigBuilder_; - } - - private com.google.cloud.vertexai.api.RagFileParsingConfig ragFileParsingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig, - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder> - ragFileParsingConfigBuilder_; - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragFileParsingConfig field is set. - */ - public boolean hasRagFileParsingConfig() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragFileParsingConfig. - */ - public com.google.cloud.vertexai.api.RagFileParsingConfig getRagFileParsingConfig() { - if (ragFileParsingConfigBuilder_ == null) { - return ragFileParsingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance() - : ragFileParsingConfig_; - } else { - return ragFileParsingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagFileParsingConfig( - com.google.cloud.vertexai.api.RagFileParsingConfig value) { - if (ragFileParsingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileParsingConfig_ = value; - } else { - ragFileParsingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagFileParsingConfig( - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder builderForValue) { - if (ragFileParsingConfigBuilder_ == null) { - ragFileParsingConfig_ = builderForValue.build(); - } else { - ragFileParsingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRagFileParsingConfig( - com.google.cloud.vertexai.api.RagFileParsingConfig value) { - if (ragFileParsingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && ragFileParsingConfig_ != null - && ragFileParsingConfig_ - != com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance()) { - getRagFileParsingConfigBuilder().mergeFrom(value); - } else { - ragFileParsingConfig_ = value; - } - } else { - ragFileParsingConfigBuilder_.mergeFrom(value); - } - if (ragFileParsingConfig_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRagFileParsingConfig() { - bitField0_ = (bitField0_ & ~0x00000400); - ragFileParsingConfig_ = null; - if (ragFileParsingConfigBuilder_ != null) { - ragFileParsingConfigBuilder_.dispose(); - ragFileParsingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagFileParsingConfig.Builder - getRagFileParsingConfigBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetRagFileParsingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder - getRagFileParsingConfigOrBuilder() { - if (ragFileParsingConfigBuilder_ != null) { - return ragFileParsingConfigBuilder_.getMessageOrBuilder(); - } else { - return ragFileParsingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance() - : ragFileParsingConfig_; - } - } - - /** - * - * - *
-     * Optional. Specifies the parsing config for RagFiles.
-     * RAG will use the default parser if this field is not set.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig, - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder> - internalGetRagFileParsingConfigFieldBuilder() { - if (ragFileParsingConfigBuilder_ == null) { - ragFileParsingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig, - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder>( - getRagFileParsingConfig(), getParentForChildren(), isClean()); - ragFileParsingConfig_ = null; - } - return ragFileParsingConfigBuilder_; - } - - private int maxEmbeddingRequestsPerMin_; - - /** - * - * - *
-     * Optional. The max number of queries per minute that this job is allowed to
-     * make to the embedding model specified on the corpus. This value is specific
-     * to this job and not shared across other import jobs. Consult the Quotas
-     * page on the project to set an appropriate value here.
-     * If unspecified, a default value of 1,000 QPM would be used.
-     * 
- * - * int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The maxEmbeddingRequestsPerMin. - */ - @java.lang.Override - public int getMaxEmbeddingRequestsPerMin() { - return maxEmbeddingRequestsPerMin_; - } - - /** - * - * - *
-     * Optional. The max number of queries per minute that this job is allowed to
-     * make to the embedding model specified on the corpus. This value is specific
-     * to this job and not shared across other import jobs. Consult the Quotas
-     * page on the project to set an appropriate value here.
-     * If unspecified, a default value of 1,000 QPM would be used.
-     * 
- * - * int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The maxEmbeddingRequestsPerMin to set. - * @return This builder for chaining. - */ - public Builder setMaxEmbeddingRequestsPerMin(int value) { - - maxEmbeddingRequestsPerMin_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The max number of queries per minute that this job is allowed to
-     * make to the embedding model specified on the corpus. This value is specific
-     * to this job and not shared across other import jobs. Consult the Quotas
-     * page on the project to set an appropriate value here.
-     * If unspecified, a default value of 1,000 QPM would be used.
-     * 
- * - * int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearMaxEmbeddingRequestsPerMin() { - bitField0_ = (bitField0_ & ~0x00000800); - maxEmbeddingRequestsPerMin_ = 0; - onChanged(); - return this; - } - - private boolean rebuildAnnIndex_; - - /** - * - * - *
-     * Rebuilds the ANN index to optimize for recall on the imported data.
-     * Only applicable for RagCorpora running on RagManagedDb with
-     * `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
-     * existing ANN config set on the RagCorpus. To change the ANN config, please
-     * use the UpdateRagCorpus API.
-     *
-     * Default is false, i.e., index is not rebuilt.
-     * 
- * - * bool rebuild_ann_index = 19; - * - * @return The rebuildAnnIndex. - */ - @java.lang.Override - public boolean getRebuildAnnIndex() { - return rebuildAnnIndex_; - } - - /** - * - * - *
-     * Rebuilds the ANN index to optimize for recall on the imported data.
-     * Only applicable for RagCorpora running on RagManagedDb with
-     * `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
-     * existing ANN config set on the RagCorpus. To change the ANN config, please
-     * use the UpdateRagCorpus API.
-     *
-     * Default is false, i.e., index is not rebuilt.
-     * 
- * - * bool rebuild_ann_index = 19; - * - * @param value The rebuildAnnIndex to set. - * @return This builder for chaining. - */ - public Builder setRebuildAnnIndex(boolean value) { - - rebuildAnnIndex_ = value; - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Rebuilds the ANN index to optimize for recall on the imported data.
-     * Only applicable for RagCorpora running on RagManagedDb with
-     * `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
-     * existing ANN config set on the RagCorpus. To change the ANN config, please
-     * use the UpdateRagCorpus API.
-     *
-     * Default is false, i.e., index is not rebuilt.
-     * 
- * - * bool rebuild_ann_index = 19; - * - * @return This builder for chaining. - */ - public Builder clearRebuildAnnIndex() { - bitField0_ = (bitField0_ & ~0x00001000); - rebuildAnnIndex_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ImportRagFilesConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ImportRagFilesConfig) - private static final com.google.cloud.vertexai.api.ImportRagFilesConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ImportRagFilesConfig(); - } - - public static com.google.cloud.vertexai.api.ImportRagFilesConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportRagFilesConfig 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.vertexai.api.ImportRagFilesConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfigOrBuilder.java deleted file mode 100644 index 03aa8ea4f12c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ImportRagFilesConfigOrBuilder.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ImportRagFilesConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ImportRagFilesConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - * - * @return The gcsSource. - */ - com.google.cloud.vertexai.api.GcsSource getGcsSource(); - - /** - * - * - *
-   * Google Cloud Storage location. Supports importing individual files as
-   * well as entire Google Cloud Storage directories. Sample formats:
-   * - `gs://bucket_name/my_directory/object_name/my_file.txt`
-   * - `gs://bucket_name/my_directory`
-   * 
- * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 2; - */ - com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return Whether the googleDriveSource field is set. - */ - boolean hasGoogleDriveSource(); - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - * - * @return The googleDriveSource. - */ - com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource(); - - /** - * - * - *
-   * Google Drive location. Supports importing individual files as
-   * well as Google Drive folders.
-   * 
- * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 3; - */ - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder(); - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return Whether the slackSource field is set. - */ - boolean hasSlackSource(); - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - * - * @return The slackSource. - */ - com.google.cloud.vertexai.api.SlackSource getSlackSource(); - - /** - * - * - *
-   * Slack channels with their corresponding access tokens.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 6; - */ - com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder(); - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return Whether the jiraSource field is set. - */ - boolean hasJiraSource(); - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - * - * @return The jiraSource. - */ - com.google.cloud.vertexai.api.JiraSource getJiraSource(); - - /** - * - * - *
-   * Jira queries with their corresponding authentication.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 7; - */ - com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder(); - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return Whether the sharePointSources field is set. - */ - boolean hasSharePointSources(); - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - * - * @return The sharePointSources. - */ - com.google.cloud.vertexai.api.SharePointSources getSharePointSources(); - - /** - * - * - *
-   * SharePoint sources.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 13; - */ - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder getSharePointSourcesOrBuilder(); - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return Whether the partialFailureGcsSink field is set. - */ - @java.lang.Deprecated - boolean hasPartialFailureGcsSink(); - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_gcs_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=463 - * @return The partialFailureGcsSink. - */ - @java.lang.Deprecated - com.google.cloud.vertexai.api.GcsDestination getPartialFailureGcsSink(); - - /** - * - * - *
-   * The Cloud Storage path to write partial failures to.
-   * Deprecated. Prefer to use `import_result_gcs_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - * - */ - @java.lang.Deprecated - com.google.cloud.vertexai.api.GcsDestinationOrBuilder getPartialFailureGcsSinkOrBuilder(); - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return Whether the partialFailureBigquerySink field is set. - */ - @java.lang.Deprecated - boolean hasPartialFailureBigquerySink(); - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - * - * @deprecated google.cloud.vertexai.v1.ImportRagFilesConfig.partial_failure_bigquery_sink is - * deprecated. See google/cloud/vertexai/v1/vertex_rag_data.proto;l=472 - * @return The partialFailureBigquerySink. - */ - @java.lang.Deprecated - com.google.cloud.vertexai.api.BigQueryDestination getPartialFailureBigquerySink(); - - /** - * - * - *
-   * The BigQuery destination to write partial failures to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * Deprecated. Prefer to use `import_result_bq_sink`.
-   * 
- * - * - * .google.cloud.vertexai.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - * - */ - @java.lang.Deprecated - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getPartialFailureBigquerySinkOrBuilder(); - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return Whether the importResultGcsSink field is set. - */ - boolean hasImportResultGcsSink(); - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - * - * @return The importResultGcsSink. - */ - com.google.cloud.vertexai.api.GcsDestination getImportResultGcsSink(); - - /** - * - * - *
-   * The Cloud Storage path to write import result to.
-   * 
- * - * .google.cloud.vertexai.v1.GcsDestination import_result_gcs_sink = 14; - */ - com.google.cloud.vertexai.api.GcsDestinationOrBuilder getImportResultGcsSinkOrBuilder(); - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return Whether the importResultBigquerySink field is set. - */ - boolean hasImportResultBigquerySink(); - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - * - * @return The importResultBigquerySink. - */ - com.google.cloud.vertexai.api.BigQueryDestination getImportResultBigquerySink(); - - /** - * - * - *
-   * The BigQuery destination to write import result to. It should be a
-   * bigquery table resource name (e.g.
-   * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
-   * table does not exist, it will be created with the expected schema. If the
-   * table exists, the schema will be validated and data will be added to this
-   * existing table.
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination import_result_bigquery_sink = 15; - */ - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder getImportResultBigquerySinkOrBuilder(); - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - boolean hasRagFileTransformationConfig(); - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - * - * @return The ragFileTransformationConfig. - */ - com.google.cloud.vertexai.api.RagFileTransformationConfig getRagFileTransformationConfig(); - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 16; - * - */ - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragFileParsingConfig field is set. - */ - boolean hasRagFileParsingConfig(); - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragFileParsingConfig. - */ - com.google.cloud.vertexai.api.RagFileParsingConfig getRagFileParsingConfig(); - - /** - * - * - *
-   * Optional. Specifies the parsing config for RagFiles.
-   * RAG will use the default parser if this field is not set.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileParsingConfig rag_file_parsing_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder getRagFileParsingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The max number of queries per minute that this job is allowed to
-   * make to the embedding model specified on the corpus. This value is specific
-   * to this job and not shared across other import jobs. Consult the Quotas
-   * page on the project to set an appropriate value here.
-   * If unspecified, a default value of 1,000 QPM would be used.
-   * 
- * - * int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The maxEmbeddingRequestsPerMin. - */ - int getMaxEmbeddingRequestsPerMin(); - - /** - * - * - *
-   * Rebuilds the ANN index to optimize for recall on the imported data.
-   * Only applicable for RagCorpora running on RagManagedDb with
-   * `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
-   * existing ANN config set on the RagCorpus. To change the ANN config, please
-   * use the UpdateRagCorpus API.
-   *
-   * Default is false, i.e., index is not rebuilt.
-   * 
- * - * bool rebuild_ann_index = 19; - * - * @return The rebuildAnnIndex. - */ - boolean getRebuildAnnIndex(); - - com.google.cloud.vertexai.api.ImportRagFilesConfig.ImportSourceCase getImportSourceCase(); - - com.google.cloud.vertexai.api.ImportRagFilesConfig.PartialFailureSinkCase - getPartialFailureSinkCase(); - - com.google.cloud.vertexai.api.ImportRagFilesConfig.ImportResultSinkCase getImportResultSinkCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java deleted file mode 100644 index e9433792a990..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java +++ /dev/null @@ -1,656 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A list of int64 values.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Int64Array} - */ -@com.google.protobuf.Generated -public final class Int64Array extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Int64Array) - Int64ArrayOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Int64Array"); - } - - // Use Int64Array.newBuilder() to construct. - private Int64Array(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Int64Array() { - values_ = emptyLongList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Int64Array_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Int64Array_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Int64Array.class, - com.google.cloud.vertexai.api.Int64Array.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList values_ = emptyLongList(); - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @return A list containing the values. - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public long getValues(int index) { - return values_.getLong(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.writeInt64NoTag(values_.getLong(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 < values_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(values_.getLong(i)); - } - 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.vertexai.api.Int64Array)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Int64Array other = (com.google.cloud.vertexai.api.Int64Array) 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.vertexai.api.Int64Array parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Int64Array 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.vertexai.api.Int64Array parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Int64Array 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.vertexai.api.Int64Array parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Int64Array parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Int64Array parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Int64Array parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Int64Array parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Int64Array parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Int64Array parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Int64Array parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Int64Array 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Int64Array} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Int64Array) - com.google.cloud.vertexai.api.Int64ArrayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Int64Array_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Int64Array_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Int64Array.class, - com.google.cloud.vertexai.api.Int64Array.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Int64Array.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - values_ = emptyLongList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Int64Array_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Int64Array getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Int64Array.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Int64Array build() { - com.google.cloud.vertexai.api.Int64Array result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Int64Array buildPartial() { - com.google.cloud.vertexai.api.Int64Array result = - new com.google.cloud.vertexai.api.Int64Array(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Int64Array result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Int64Array) { - return mergeFrom((com.google.cloud.vertexai.api.Int64Array) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Int64Array other) { - if (other == com.google.cloud.vertexai.api.Int64Array.getDefaultInstance()) return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - values_.makeImmutable(); - 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 8: - { - long v = input.readInt64(); - ensureValuesIsMutable(); - values_.addLong(v); - break; - } // case 8 - case 10: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - values_.addLong(input.readInt64()); - } - 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.LongList values_ = emptyLongList(); - - private void ensureValuesIsMutable() { - if (!values_.isModifiable()) { - values_ = makeMutableCopy(values_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 values = 1; - * - * @return A list containing the values. - */ - public java.util.List getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public long getValues(int index) { - return values_.getLong(index); - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 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, long value) { - - ensureValuesIsMutable(); - values_.setLong(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 values = 1; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(long value) { - - ensureValuesIsMutable(); - values_.addLong(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 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_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of int64 values.
-     * 
- * - * repeated int64 values = 1; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Int64Array) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Int64Array) - private static final com.google.cloud.vertexai.api.Int64Array DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Int64Array(); - } - - public static com.google.cloud.vertexai.api.Int64Array getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64Array 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.vertexai.api.Int64Array getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java deleted file mode 100644 index 4018126029f2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface Int64ArrayOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Int64Array) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-   * A list of int64 values.
-   * 
- * - * repeated int64 values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - long getValues(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java deleted file mode 100644 index d712eed48cce..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java +++ /dev/null @@ -1,1231 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * An attribution method that computes the Aumann-Shapley value taking advantage
- * of the model's fully differentiable structure. Refer to this paper for
- * more details: https://arxiv.org/abs/1703.01365
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.IntegratedGradientsAttribution} - */ -@com.google.protobuf.Generated -public final class IntegratedGradientsAttribution extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.IntegratedGradientsAttribution) - IntegratedGradientsAttributionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "IntegratedGradientsAttribution"); - } - - // Use IntegratedGradientsAttribution.newBuilder() to construct. - private IntegratedGradientsAttribution(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private IntegratedGradientsAttribution() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.class, - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder.class); - } - - private int bitField0_; - public static final int STEP_COUNT_FIELD_NUMBER = 1; - private int stepCount_ = 0; - - /** - * - * - *
-   * Required. The number of steps for approximating the path integral.
-   * A good value to start is 50 and gradually increase until the
-   * sum to diff property is within the desired error range.
-   *
-   * Valid range of its value is [1, 100], inclusively.
-   * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - @java.lang.Override - public int getStepCount() { - return stepCount_; - } - - public static final int SMOOTH_GRAD_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.SmoothGradConfig smoothGradConfig_; - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - @java.lang.Override - public boolean hasSmoothGradConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig() { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder() { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - - public static final int BLUR_BASELINE_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.BlurBaselineConfig blurBaselineConfig_; - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - @java.lang.Override - public boolean hasBlurBaselineConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig() { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder - getBlurBaselineConfigOrBuilder() { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - - 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 (stepCount_ != 0) { - output.writeInt32(1, stepCount_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSmoothGradConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getBlurBaselineConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (stepCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, stepCount_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSmoothGradConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBlurBaselineConfig()); - } - 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.vertexai.api.IntegratedGradientsAttribution)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.IntegratedGradientsAttribution other = - (com.google.cloud.vertexai.api.IntegratedGradientsAttribution) obj; - - if (getStepCount() != other.getStepCount()) return false; - if (hasSmoothGradConfig() != other.hasSmoothGradConfig()) return false; - if (hasSmoothGradConfig()) { - if (!getSmoothGradConfig().equals(other.getSmoothGradConfig())) return false; - } - if (hasBlurBaselineConfig() != other.hasBlurBaselineConfig()) return false; - if (hasBlurBaselineConfig()) { - if (!getBlurBaselineConfig().equals(other.getBlurBaselineConfig())) 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) + STEP_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getStepCount(); - if (hasSmoothGradConfig()) { - hash = (37 * hash) + SMOOTH_GRAD_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSmoothGradConfig().hashCode(); - } - if (hasBlurBaselineConfig()) { - hash = (37 * hash) + BLUR_BASELINE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBlurBaselineConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution 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.vertexai.api.IntegratedGradientsAttribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution 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.vertexai.api.IntegratedGradientsAttribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.IntegratedGradientsAttribution 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * An attribution method that computes the Aumann-Shapley value taking advantage
-   * of the model's fully differentiable structure. Refer to this paper for
-   * more details: https://arxiv.org/abs/1703.01365
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.IntegratedGradientsAttribution} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.IntegratedGradientsAttribution) - com.google.cloud.vertexai.api.IntegratedGradientsAttributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.class, - com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.IntegratedGradientsAttribution.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSmoothGradConfigFieldBuilder(); - internalGetBlurBaselineConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - stepCount_ = 0; - smoothGradConfig_ = null; - if (smoothGradConfigBuilder_ != null) { - smoothGradConfigBuilder_.dispose(); - smoothGradConfigBuilder_ = null; - } - blurBaselineConfig_ = null; - if (blurBaselineConfigBuilder_ != null) { - blurBaselineConfigBuilder_.dispose(); - blurBaselineConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_IntegratedGradientsAttribution_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution build() { - com.google.cloud.vertexai.api.IntegratedGradientsAttribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.IntegratedGradientsAttribution buildPartial() { - com.google.cloud.vertexai.api.IntegratedGradientsAttribution result = - new com.google.cloud.vertexai.api.IntegratedGradientsAttribution(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.IntegratedGradientsAttribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.stepCount_ = stepCount_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.smoothGradConfig_ = - smoothGradConfigBuilder_ == null ? smoothGradConfig_ : smoothGradConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.blurBaselineConfig_ = - blurBaselineConfigBuilder_ == null - ? blurBaselineConfig_ - : blurBaselineConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.IntegratedGradientsAttribution) { - return mergeFrom((com.google.cloud.vertexai.api.IntegratedGradientsAttribution) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.IntegratedGradientsAttribution other) { - if (other - == com.google.cloud.vertexai.api.IntegratedGradientsAttribution.getDefaultInstance()) - return this; - if (other.getStepCount() != 0) { - setStepCount(other.getStepCount()); - } - if (other.hasSmoothGradConfig()) { - mergeSmoothGradConfig(other.getSmoothGradConfig()); - } - if (other.hasBlurBaselineConfig()) { - mergeBlurBaselineConfig(other.getBlurBaselineConfig()); - } - 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: - { - stepCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage( - internalGetSmoothGradConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetBlurBaselineConfigFieldBuilder().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 int stepCount_; - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - @java.lang.Override - public int getStepCount() { - return stepCount_; - } - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The stepCount to set. - * @return This builder for chaining. - */ - public Builder setStepCount(int value) { - - stepCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearStepCount() { - bitField0_ = (bitField0_ & ~0x00000001); - stepCount_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.SmoothGradConfig smoothGradConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder> - smoothGradConfigBuilder_; - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - public boolean hasSmoothGradConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - public com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig() { - if (smoothGradConfigBuilder_ == null) { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } else { - return smoothGradConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder setSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradConfig value) { - if (smoothGradConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - smoothGradConfig_ = value; - } else { - smoothGradConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder setSmoothGradConfig( - com.google.cloud.vertexai.api.SmoothGradConfig.Builder builderForValue) { - if (smoothGradConfigBuilder_ == null) { - smoothGradConfig_ = builderForValue.build(); - } else { - smoothGradConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder mergeSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradConfig value) { - if (smoothGradConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && smoothGradConfig_ != null - && smoothGradConfig_ - != com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance()) { - getSmoothGradConfigBuilder().mergeFrom(value); - } else { - smoothGradConfig_ = value; - } - } else { - smoothGradConfigBuilder_.mergeFrom(value); - } - if (smoothGradConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder clearSmoothGradConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - smoothGradConfig_ = null; - if (smoothGradConfigBuilder_ != null) { - smoothGradConfigBuilder_.dispose(); - smoothGradConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public com.google.cloud.vertexai.api.SmoothGradConfig.Builder getSmoothGradConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetSmoothGradConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder() { - if (smoothGradConfigBuilder_ != null) { - return smoothGradConfigBuilder_.getMessageOrBuilder(); - } else { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder> - internalGetSmoothGradConfigFieldBuilder() { - if (smoothGradConfigBuilder_ == null) { - smoothGradConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder>( - getSmoothGradConfig(), getParentForChildren(), isClean()); - smoothGradConfig_ = null; - } - return smoothGradConfigBuilder_; - } - - private com.google.cloud.vertexai.api.BlurBaselineConfig blurBaselineConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder> - blurBaselineConfigBuilder_; - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - public boolean hasBlurBaselineConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - public com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig() { - if (blurBaselineConfigBuilder_ == null) { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } else { - return blurBaselineConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder setBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselineConfig value) { - if (blurBaselineConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - blurBaselineConfig_ = value; - } else { - blurBaselineConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder setBlurBaselineConfig( - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder builderForValue) { - if (blurBaselineConfigBuilder_ == null) { - blurBaselineConfig_ = builderForValue.build(); - } else { - blurBaselineConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder mergeBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselineConfig value) { - if (blurBaselineConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && blurBaselineConfig_ != null - && blurBaselineConfig_ - != com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance()) { - getBlurBaselineConfigBuilder().mergeFrom(value); - } else { - blurBaselineConfig_ = value; - } - } else { - blurBaselineConfigBuilder_.mergeFrom(value); - } - if (blurBaselineConfig_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder clearBlurBaselineConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - blurBaselineConfig_ = null; - if (blurBaselineConfigBuilder_ != null) { - blurBaselineConfigBuilder_.dispose(); - blurBaselineConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public com.google.cloud.vertexai.api.BlurBaselineConfig.Builder getBlurBaselineConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetBlurBaselineConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder - getBlurBaselineConfigOrBuilder() { - if (blurBaselineConfigBuilder_ != null) { - return blurBaselineConfigBuilder_.getMessageOrBuilder(); - } else { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - } - - /** - * - * - *
-     * Config for IG with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder> - internalGetBlurBaselineConfigFieldBuilder() { - if (blurBaselineConfigBuilder_ == null) { - blurBaselineConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder>( - getBlurBaselineConfig(), getParentForChildren(), isClean()); - blurBaselineConfig_ = null; - } - return blurBaselineConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.IntegratedGradientsAttribution) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.IntegratedGradientsAttribution) - private static final com.google.cloud.vertexai.api.IntegratedGradientsAttribution - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.IntegratedGradientsAttribution(); - } - - public static com.google.cloud.vertexai.api.IntegratedGradientsAttribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IntegratedGradientsAttribution 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.vertexai.api.IntegratedGradientsAttribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java deleted file mode 100644 index e2863da756da..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface IntegratedGradientsAttributionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.IntegratedGradientsAttribution) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The number of steps for approximating the path integral.
-   * A good value to start is 50 and gradually increase until the
-   * sum to diff property is within the desired error range.
-   *
-   * Valid range of its value is [1, 100], inclusively.
-   * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - int getStepCount(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - boolean hasSmoothGradConfig(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder(); - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - boolean hasBlurBaselineConfig(); - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig(); - - /** - * - * - *
-   * Config for IG with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder getBlurBaselineConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java deleted file mode 100644 index 9d8fac006d35..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class IoProto extends com.google.protobuf.GeneratedFile { - private IoProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "IoProto"); - } - - 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_vertexai_v1_AvroSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_AvroSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CsvSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CsvSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GcsSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_BigQuerySource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CsvDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_TFRecordDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DirectUploadSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SlackSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SlackSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_JiraSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_JiraSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SharePointSources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_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/vertexai/v1/io.proto\022\030goo" - + "gle.cloud.vertexai.v1\032\037google/api/field_" - + "behavior.proto\032\'google/cloud/vertexai/v1" - + "/api_auth.proto\032\037google/protobuf/timesta" - + "mp.proto\"J\n\nAvroSource\022<\n\ngcs_source\030\001 \001" - + "(\0132#.google.cloud.vertexai.v1.GcsSourceB" - + "\003\340A\002\"I\n\tCsvSource\022<\n\ngcs_source\030\001 \001(\0132#." - + "google.cloud.vertexai.v1.GcsSourceB\003\340A\002\"" - + "\036\n\tGcsSource\022\021\n\004uris\030\001 \003(\tB\003\340A\002\"0\n\016GcsDe" - + "stination\022\036\n\021output_uri_prefix\030\001 \001(\tB\003\340A" - + "\002\"(\n\016BigQuerySource\022\026\n\tinput_uri\030\001 \001(\tB\003" - + "\340A\002\".\n\023BigQueryDestination\022\027\n\noutput_uri" - + "\030\001 \001(\tB\003\340A\002\"X\n\016CsvDestination\022F\n\017gcs_des" - + "tination\030\001 \001(\0132(.google.cloud.vertexai.v" - + "1.GcsDestinationB\003\340A\002\"]\n\023TFRecordDestina" - + "tion\022F\n\017gcs_destination\030\001 \001(\0132(.google.c" - + "loud.vertexai.v1.GcsDestinationB\003\340A\002\"7\n\034" - + "ContainerRegistryDestination\022\027\n\noutput_u" - + "ri\030\001 \001(\tB\003\340A\002\"\321\002\n\021GoogleDriveSource\022Q\n\014r" - + "esource_ids\030\001 \003(\01326.google.cloud.vertexa" - + "i.v1.GoogleDriveSource.ResourceIdB\003\340A\002\032\350" - + "\001\n\nResourceId\022_\n\rresource_type\030\001 \001(\0162C.g" - + "oogle.cloud.vertexai.v1.GoogleDriveSourc" - + "e.ResourceId.ResourceTypeB\003\340A\002\022\030\n\013resour" - + "ce_id\030\002 \001(\tB\003\340A\002\"_\n\014ResourceType\022\035\n\031RESO" - + "URCE_TYPE_UNSPECIFIED\020\000\022\026\n\022RESOURCE_TYPE" - + "_FILE\020\001\022\030\n\024RESOURCE_TYPE_FOLDER\020\002\"\024\n\022Dir" - + "ectUploadSource\"\243\003\n\013SlackSource\022J\n\010chann" - + "els\030\001 \003(\01323.google.cloud.vertexai.v1.Sla" - + "ckSource.SlackChannelsB\003\340A\002\032\307\002\n\rSlackCha" - + "nnels\022W\n\010channels\030\001 \003(\0132@.google.cloud.v" - + "ertexai.v1.SlackSource.SlackChannels.Sla" - + "ckChannelB\003\340A\002\022K\n\016api_key_config\030\003 \001(\0132." - + ".google.cloud.vertexai.v1.ApiAuth.ApiKey" - + "ConfigB\003\340A\002\032\217\001\n\014SlackChannel\022\027\n\nchannel_" - + "id\030\001 \001(\tB\003\340A\002\0223\n\nstart_time\030\002 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\001\0221\n\010end_time\030\003" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\"\215\002" - + "\n\nJiraSource\022K\n\014jira_queries\030\001 \003(\01320.goo" - + "gle.cloud.vertexai.v1.JiraSource.JiraQue" - + "riesB\003\340A\002\032\261\001\n\013JiraQueries\022\020\n\010projects\030\003 " - + "\003(\t\022\026\n\016custom_queries\030\004 \003(\t\022\022\n\005email\030\005 \001" - + "(\tB\003\340A\002\022\027\n\nserver_uri\030\006 \001(\tB\003\340A\002\022K\n\016api_" - + "key_config\030\007 \001(\0132..google.cloud.vertexai" - + ".v1.ApiAuth.ApiKeyConfigB\003\340A\002\"\261\003\n\021ShareP" - + "ointSources\022Y\n\023share_point_sources\030\001 \003(\013" - + "2<.google.cloud.vertexai.v1.SharePointSo" - + "urces.SharePointSource\032\300\002\n\020SharePointSou" - + "rce\022 \n\026sharepoint_folder_path\030\005 \001(\tH\000\022\036\n" - + "\024sharepoint_folder_id\030\006 \001(\tH\000\022\024\n\ndrive_n" - + "ame\030\007 \001(\tH\001\022\022\n\010drive_id\030\010 \001(\tH\001\022\021\n\tclien" - + "t_id\030\001 \001(\t\022E\n\rclient_secret\030\002 \001(\0132..goog" - + "le.cloud.vertexai.v1.ApiAuth.ApiKeyConfi" - + "g\022\021\n\ttenant_id\030\003 \001(\t\022\034\n\024sharepoint_site_" - + "name\030\004 \001(\t\022\024\n\007file_id\030\t \001(\tB\003\340A\003B\017\n\rfold" - + "er_sourceB\016\n\014drive_sourceB\304\001\n\035com.google" - + ".cloud.vertexai.apiB\007IoProtoP\001Z>cloud.go" - + "ogle.com/go/aiplatform/apiv1/aiplatformp" - + "b;aiplatformpb\252\002\032Google.Cloud.AIPlatform" - + ".V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Googl" - + "e::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vertexai.api.ApiAuthProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_AvroSource_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_AvroSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_AvroSource_descriptor, - new java.lang.String[] { - "GcsSource", - }); - internal_static_google_cloud_vertexai_v1_CsvSource_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_CsvSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CsvSource_descriptor, - new java.lang.String[] { - "GcsSource", - }); - internal_static_google_cloud_vertexai_v1_GcsSource_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_GcsSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GcsSource_descriptor, - new java.lang.String[] { - "Uris", - }); - internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_GcsDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GcsDestination_descriptor, - new java.lang.String[] { - "OutputUriPrefix", - }); - internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_BigQuerySource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_BigQuerySource_descriptor, - new java.lang.String[] { - "InputUri", - }); - internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_BigQueryDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_BigQueryDestination_descriptor, - new java.lang.String[] { - "OutputUri", - }); - internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_CsvDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CsvDestination_descriptor, - new java.lang.String[] { - "GcsDestination", - }); - internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_TFRecordDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor, - new java.lang.String[] { - "GcsDestination", - }); - internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ContainerRegistryDestination_descriptor, - new java.lang.String[] { - "OutputUri", - }); - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor, - new java.lang.String[] { - "ResourceIds", - }); - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor = - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GoogleDriveSource_ResourceId_descriptor, - new java.lang.String[] { - "ResourceType", "ResourceId", - }); - internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_DirectUploadSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DirectUploadSource_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_SlackSource_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_SlackSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SlackSource_descriptor, - new java.lang.String[] { - "Channels", - }); - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor = - internal_static_google_cloud_vertexai_v1_SlackSource_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor, - new java.lang.String[] { - "Channels", "ApiKeyConfig", - }); - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor = - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor.getNestedType( - 0); - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor, - new java.lang.String[] { - "ChannelId", "StartTime", "EndTime", - }); - internal_static_google_cloud_vertexai_v1_JiraSource_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_JiraSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_JiraSource_descriptor, - new java.lang.String[] { - "JiraQueries", - }); - internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor = - internal_static_google_cloud_vertexai_v1_JiraSource_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor, - new java.lang.String[] { - "Projects", "CustomQueries", "Email", "ServerUri", "ApiKeyConfig", - }); - internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_SharePointSources_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor, - new java.lang.String[] { - "SharePointSources", - }); - internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor = - internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor, - new java.lang.String[] { - "SharepointFolderPath", - "SharepointFolderId", - "DriveName", - "DriveId", - "ClientId", - "ClientSecret", - "TenantId", - "SharepointSiteName", - "FileId", - "FolderSource", - "DriveSource", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vertexai.api.ApiAuthProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSource.java deleted file mode 100644 index 09ab87672fb2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSource.java +++ /dev/null @@ -1,2930 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Jira source for the ImportRagFilesRequest.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.JiraSource} - */ -@com.google.protobuf.Generated -public final class JiraSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.JiraSource) - JiraSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "JiraSource"); - } - - // Use JiraSource.newBuilder() to construct. - private JiraSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private JiraSource() { - jiraQueries_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.JiraSource.class, - com.google.cloud.vertexai.api.JiraSource.Builder.class); - } - - public interface JiraQueriesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.JiraSource.JiraQueries) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @return A list containing the projects. - */ - java.util.List getProjectsList(); - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @return The count of projects. - */ - int getProjectsCount(); - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @param index The index of the element to return. - * @return The projects at the given index. - */ - java.lang.String getProjects(int index); - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @param index The index of the value to return. - * @return The bytes of the projects at the given index. - */ - com.google.protobuf.ByteString getProjectsBytes(int index); - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @return A list containing the customQueries. - */ - java.util.List getCustomQueriesList(); - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @return The count of customQueries. - */ - int getCustomQueriesCount(); - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the element to return. - * @return The customQueries at the given index. - */ - java.lang.String getCustomQueries(int index); - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the value to return. - * @return The bytes of the customQueries at the given index. - */ - com.google.protobuf.ByteString getCustomQueriesBytes(int index); - - /** - * - * - *
-     * Required. The Jira email address.
-     * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The email. - */ - java.lang.String getEmail(); - - /** - * - * - *
-     * Required. The Jira email address.
-     * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for email. - */ - com.google.protobuf.ByteString getEmailBytes(); - - /** - * - * - *
-     * Required. The Jira server URI.
-     * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serverUri. - */ - java.lang.String getServerUri(); - - /** - * - * - *
-     * Required. The Jira server URI.
-     * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serverUri. - */ - com.google.protobuf.ByteString getServerUriBytes(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - boolean hasApiKeyConfig(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder(); - } - - /** - * - * - *
-   * JiraQueries contains the Jira queries and corresponding authentication.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.JiraSource.JiraQueries} - */ - public static final class JiraQueries extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.JiraSource.JiraQueries) - JiraQueriesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "JiraQueries"); - } - - // Use JiraQueries.newBuilder() to construct. - private JiraQueries(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private JiraQueries() { - projects_ = com.google.protobuf.LazyStringArrayList.emptyList(); - customQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - email_ = ""; - serverUri_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.JiraSource.JiraQueries.class, - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder.class); - } - - private int bitField0_; - public static final int PROJECTS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList projects_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @return A list containing the projects. - */ - public com.google.protobuf.ProtocolStringList getProjectsList() { - return projects_; - } - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @return The count of projects. - */ - public int getProjectsCount() { - return projects_.size(); - } - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @param index The index of the element to return. - * @return The projects at the given index. - */ - public java.lang.String getProjects(int index) { - return projects_.get(index); - } - - /** - * - * - *
-     * A list of Jira projects to import in their entirety.
-     * 
- * - * repeated string projects = 3; - * - * @param index The index of the value to return. - * @return The bytes of the projects at the given index. - */ - public com.google.protobuf.ByteString getProjectsBytes(int index) { - return projects_.getByteString(index); - } - - public static final int CUSTOM_QUERIES_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList customQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @return A list containing the customQueries. - */ - public com.google.protobuf.ProtocolStringList getCustomQueriesList() { - return customQueries_; - } - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @return The count of customQueries. - */ - public int getCustomQueriesCount() { - return customQueries_.size(); - } - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the element to return. - * @return The customQueries at the given index. - */ - public java.lang.String getCustomQueries(int index) { - return customQueries_.get(index); - } - - /** - * - * - *
-     * A list of custom Jira queries to import. For information about JQL (Jira
-     * Query Language), see
-     * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-     * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the value to return. - * @return The bytes of the customQueries at the given index. - */ - public com.google.protobuf.ByteString getCustomQueriesBytes(int index) { - return customQueries_.getByteString(index); - } - - public static final int EMAIL_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object email_ = ""; - - /** - * - * - *
-     * Required. The Jira email address.
-     * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The email. - */ - @java.lang.Override - public java.lang.String getEmail() { - java.lang.Object ref = email_; - 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(); - email_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The Jira email address.
-     * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for email. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVER_URI_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object serverUri_ = ""; - - /** - * - * - *
-     * Required. The Jira server URI.
-     * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serverUri. - */ - @java.lang.Override - public java.lang.String getServerUri() { - java.lang.Object ref = serverUri_; - 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(); - serverUri_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The Jira server URI.
-     * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serverUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServerUriBytes() { - java.lang.Object ref = serverUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serverUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int API_KEY_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig apiKeyConfig_; - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - @java.lang.Override - public boolean hasApiKeyConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Jira API key. See [Manage API tokens for your Atlassian
-     * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - - 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 < projects_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, projects_.getRaw(i)); - } - for (int i = 0; i < customQueries_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, customQueries_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, email_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, serverUri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(7, getApiKeyConfig()); - } - 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 < projects_.size(); i++) { - dataSize += computeStringSizeNoTag(projects_.getRaw(i)); - } - size += dataSize; - size += 1 * getProjectsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < customQueries_.size(); i++) { - dataSize += computeStringSizeNoTag(customQueries_.getRaw(i)); - } - size += dataSize; - size += 1 * getCustomQueriesList().size(); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, email_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, serverUri_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getApiKeyConfig()); - } - 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.vertexai.api.JiraSource.JiraQueries)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.JiraSource.JiraQueries other = - (com.google.cloud.vertexai.api.JiraSource.JiraQueries) obj; - - if (!getProjectsList().equals(other.getProjectsList())) return false; - if (!getCustomQueriesList().equals(other.getCustomQueriesList())) return false; - if (!getEmail().equals(other.getEmail())) return false; - if (!getServerUri().equals(other.getServerUri())) return false; - if (hasApiKeyConfig() != other.hasApiKeyConfig()) return false; - if (hasApiKeyConfig()) { - if (!getApiKeyConfig().equals(other.getApiKeyConfig())) 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 (getProjectsCount() > 0) { - hash = (37 * hash) + PROJECTS_FIELD_NUMBER; - hash = (53 * hash) + getProjectsList().hashCode(); - } - if (getCustomQueriesCount() > 0) { - hash = (37 * hash) + CUSTOM_QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getCustomQueriesList().hashCode(); - } - hash = (37 * hash) + EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getEmail().hashCode(); - hash = (37 * hash) + SERVER_URI_FIELD_NUMBER; - hash = (53 * hash) + getServerUri().hashCode(); - if (hasApiKeyConfig()) { - hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getApiKeyConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries 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.vertexai.api.JiraSource.JiraQueries parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries 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.vertexai.api.JiraSource.JiraQueries parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.JiraSource.JiraQueries 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * JiraQueries contains the Jira queries and corresponding authentication.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.JiraSource.JiraQueries} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.JiraSource.JiraQueries) - com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.JiraSource.JiraQueries.class, - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.JiraSource.JiraQueries.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetApiKeyConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - projects_ = com.google.protobuf.LazyStringArrayList.emptyList(); - customQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - email_ = ""; - serverUri_ = ""; - apiKeyConfig_ = null; - if (apiKeyConfigBuilder_ != null) { - apiKeyConfigBuilder_.dispose(); - apiKeyConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_JiraQueries_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource.JiraQueries getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.JiraSource.JiraQueries.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource.JiraQueries build() { - com.google.cloud.vertexai.api.JiraSource.JiraQueries result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource.JiraQueries buildPartial() { - com.google.cloud.vertexai.api.JiraSource.JiraQueries result = - new com.google.cloud.vertexai.api.JiraSource.JiraQueries(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.JiraSource.JiraQueries result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - projects_.makeImmutable(); - result.projects_ = projects_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - customQueries_.makeImmutable(); - result.customQueries_ = customQueries_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.email_ = email_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serverUri_ = serverUri_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.apiKeyConfig_ = - apiKeyConfigBuilder_ == null ? apiKeyConfig_ : apiKeyConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.JiraSource.JiraQueries) { - return mergeFrom((com.google.cloud.vertexai.api.JiraSource.JiraQueries) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.JiraSource.JiraQueries other) { - if (other == com.google.cloud.vertexai.api.JiraSource.JiraQueries.getDefaultInstance()) - return this; - if (!other.projects_.isEmpty()) { - if (projects_.isEmpty()) { - projects_ = other.projects_; - bitField0_ |= 0x00000001; - } else { - ensureProjectsIsMutable(); - projects_.addAll(other.projects_); - } - onChanged(); - } - if (!other.customQueries_.isEmpty()) { - if (customQueries_.isEmpty()) { - customQueries_ = other.customQueries_; - bitField0_ |= 0x00000002; - } else { - ensureCustomQueriesIsMutable(); - customQueries_.addAll(other.customQueries_); - } - onChanged(); - } - if (!other.getEmail().isEmpty()) { - email_ = other.email_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServerUri().isEmpty()) { - serverUri_ = other.serverUri_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasApiKeyConfig()) { - mergeApiKeyConfig(other.getApiKeyConfig()); - } - 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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureProjectsIsMutable(); - projects_.add(s); - break; - } // case 26 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureCustomQueriesIsMutable(); - customQueries_.add(s); - break; - } // case 34 - case 42: - { - email_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 42 - case 50: - { - serverUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - 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.LazyStringArrayList projects_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureProjectsIsMutable() { - if (!projects_.isModifiable()) { - projects_ = new com.google.protobuf.LazyStringArrayList(projects_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @return A list containing the projects. - */ - public com.google.protobuf.ProtocolStringList getProjectsList() { - projects_.makeImmutable(); - return projects_; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @return The count of projects. - */ - public int getProjectsCount() { - return projects_.size(); - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param index The index of the element to return. - * @return The projects at the given index. - */ - public java.lang.String getProjects(int index) { - return projects_.get(index); - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param index The index of the value to return. - * @return The bytes of the projects at the given index. - */ - public com.google.protobuf.ByteString getProjectsBytes(int index) { - return projects_.getByteString(index); - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param index The index to set the value at. - * @param value The projects to set. - * @return This builder for chaining. - */ - public Builder setProjects(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectsIsMutable(); - projects_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param value The projects to add. - * @return This builder for chaining. - */ - public Builder addProjects(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectsIsMutable(); - projects_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param values The projects to add. - * @return This builder for chaining. - */ - public Builder addAllProjects(java.lang.Iterable values) { - ensureProjectsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projects_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @return This builder for chaining. - */ - public Builder clearProjects() { - projects_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of Jira projects to import in their entirety.
-       * 
- * - * repeated string projects = 3; - * - * @param value The bytes of the projects to add. - * @return This builder for chaining. - */ - public Builder addProjectsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProjectsIsMutable(); - projects_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList customQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureCustomQueriesIsMutable() { - if (!customQueries_.isModifiable()) { - customQueries_ = new com.google.protobuf.LazyStringArrayList(customQueries_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @return A list containing the customQueries. - */ - public com.google.protobuf.ProtocolStringList getCustomQueriesList() { - customQueries_.makeImmutable(); - return customQueries_; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @return The count of customQueries. - */ - public int getCustomQueriesCount() { - return customQueries_.size(); - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the element to return. - * @return The customQueries at the given index. - */ - public java.lang.String getCustomQueries(int index) { - return customQueries_.get(index); - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param index The index of the value to return. - * @return The bytes of the customQueries at the given index. - */ - public com.google.protobuf.ByteString getCustomQueriesBytes(int index) { - return customQueries_.getByteString(index); - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param index The index to set the value at. - * @param value The customQueries to set. - * @return This builder for chaining. - */ - public Builder setCustomQueries(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCustomQueriesIsMutable(); - customQueries_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param value The customQueries to add. - * @return This builder for chaining. - */ - public Builder addCustomQueries(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCustomQueriesIsMutable(); - customQueries_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param values The customQueries to add. - * @return This builder for chaining. - */ - public Builder addAllCustomQueries(java.lang.Iterable values) { - ensureCustomQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customQueries_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @return This builder for chaining. - */ - public Builder clearCustomQueries() { - customQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * A list of custom Jira queries to import. For information about JQL (Jira
-       * Query Language), see
-       * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
-       * 
- * - * repeated string custom_queries = 4; - * - * @param value The bytes of the customQueries to add. - * @return This builder for chaining. - */ - public Builder addCustomQueriesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureCustomQueriesIsMutable(); - customQueries_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object email_ = ""; - - /** - * - * - *
-       * Required. The Jira email address.
-       * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The email. - */ - public java.lang.String getEmail() { - java.lang.Object ref = email_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - email_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The Jira email address.
-       * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for email. - */ - public com.google.protobuf.ByteString getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The Jira email address.
-       * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The email to set. - * @return This builder for chaining. - */ - public Builder setEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - email_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The Jira email address.
-       * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearEmail() { - email_ = getDefaultInstance().getEmail(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The Jira email address.
-       * 
- * - * string email = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for email to set. - * @return This builder for chaining. - */ - public Builder setEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - email_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serverUri_ = ""; - - /** - * - * - *
-       * Required. The Jira server URI.
-       * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serverUri. - */ - public java.lang.String getServerUri() { - java.lang.Object ref = serverUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serverUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The Jira server URI.
-       * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serverUri. - */ - public com.google.protobuf.ByteString getServerUriBytes() { - java.lang.Object ref = serverUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serverUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The Jira server URI.
-       * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serverUri to set. - * @return This builder for chaining. - */ - public Builder setServerUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serverUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The Jira server URI.
-       * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServerUri() { - serverUri_ = getDefaultInstance().getServerUri(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The Jira server URI.
-       * 
- * - * string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serverUri to set. - * @return This builder for chaining. - */ - public Builder setServerUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serverUri_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig apiKeyConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - apiKeyConfigBuilder_; - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - public boolean hasApiKeyConfig() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - if (apiKeyConfigBuilder_ == null) { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } else { - return apiKeyConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiKeyConfig_ = value; - } else { - apiKeyConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setApiKeyConfig( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder builderForValue) { - if (apiKeyConfigBuilder_ == null) { - apiKeyConfig_ = builderForValue.build(); - } else { - apiKeyConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && apiKeyConfig_ != null - && apiKeyConfig_ - != com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance()) { - getApiKeyConfigBuilder().mergeFrom(value); - } else { - apiKeyConfig_ = value; - } - } else { - apiKeyConfigBuilder_.mergeFrom(value); - } - if (apiKeyConfig_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearApiKeyConfig() { - bitField0_ = (bitField0_ & ~0x00000010); - apiKeyConfig_ = null; - if (apiKeyConfigBuilder_ != null) { - apiKeyConfigBuilder_.dispose(); - apiKeyConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder getApiKeyConfigBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetApiKeyConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder - getApiKeyConfigOrBuilder() { - if (apiKeyConfigBuilder_ != null) { - return apiKeyConfigBuilder_.getMessageOrBuilder(); - } else { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Jira API key. See [Manage API tokens for your Atlassian
-       * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - internalGetApiKeyConfigFieldBuilder() { - if (apiKeyConfigBuilder_ == null) { - apiKeyConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder>( - getApiKeyConfig(), getParentForChildren(), isClean()); - apiKeyConfig_ = null; - } - return apiKeyConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.JiraSource.JiraQueries) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.JiraSource.JiraQueries) - private static final com.google.cloud.vertexai.api.JiraSource.JiraQueries DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.JiraSource.JiraQueries(); - } - - public static com.google.cloud.vertexai.api.JiraSource.JiraQueries getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JiraQueries 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.vertexai.api.JiraSource.JiraQueries getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int JIRA_QUERIES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List jiraQueries_; - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getJiraQueriesList() { - return jiraQueries_; - } - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getJiraQueriesOrBuilderList() { - return jiraQueries_; - } - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getJiraQueriesCount() { - return jiraQueries_.size(); - } - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource.JiraQueries getJiraQueries(int index) { - return jiraQueries_.get(index); - } - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder getJiraQueriesOrBuilder( - int index) { - return jiraQueries_.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 < jiraQueries_.size(); i++) { - output.writeMessage(1, jiraQueries_.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 < jiraQueries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jiraQueries_.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.vertexai.api.JiraSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.JiraSource other = (com.google.cloud.vertexai.api.JiraSource) obj; - - if (!getJiraQueriesList().equals(other.getJiraQueriesList())) 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 (getJiraQueriesCount() > 0) { - hash = (37 * hash) + JIRA_QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getJiraQueriesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource 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.vertexai.api.JiraSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource 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.vertexai.api.JiraSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.JiraSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.JiraSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Jira source for the ImportRagFilesRequest.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.JiraSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.JiraSource) - com.google.cloud.vertexai.api.JiraSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.JiraSource.class, - com.google.cloud.vertexai.api.JiraSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.JiraSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (jiraQueriesBuilder_ == null) { - jiraQueries_ = java.util.Collections.emptyList(); - } else { - jiraQueries_ = null; - jiraQueriesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_JiraSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource build() { - com.google.cloud.vertexai.api.JiraSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource buildPartial() { - com.google.cloud.vertexai.api.JiraSource result = - new com.google.cloud.vertexai.api.JiraSource(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.JiraSource result) { - if (jiraQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - jiraQueries_ = java.util.Collections.unmodifiableList(jiraQueries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.jiraQueries_ = jiraQueries_; - } else { - result.jiraQueries_ = jiraQueriesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.JiraSource result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.JiraSource) { - return mergeFrom((com.google.cloud.vertexai.api.JiraSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.JiraSource other) { - if (other == com.google.cloud.vertexai.api.JiraSource.getDefaultInstance()) return this; - if (jiraQueriesBuilder_ == null) { - if (!other.jiraQueries_.isEmpty()) { - if (jiraQueries_.isEmpty()) { - jiraQueries_ = other.jiraQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureJiraQueriesIsMutable(); - jiraQueries_.addAll(other.jiraQueries_); - } - onChanged(); - } - } else { - if (!other.jiraQueries_.isEmpty()) { - if (jiraQueriesBuilder_.isEmpty()) { - jiraQueriesBuilder_.dispose(); - jiraQueriesBuilder_ = null; - jiraQueries_ = other.jiraQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - jiraQueriesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetJiraQueriesFieldBuilder() - : null; - } else { - jiraQueriesBuilder_.addAllMessages(other.jiraQueries_); - } - } - } - 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.vertexai.api.JiraSource.JiraQueries m = - input.readMessage( - com.google.cloud.vertexai.api.JiraSource.JiraQueries.parser(), - extensionRegistry); - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - jiraQueries_.add(m); - } else { - jiraQueriesBuilder_.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 jiraQueries_ = - java.util.Collections.emptyList(); - - private void ensureJiraQueriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - jiraQueries_ = - new java.util.ArrayList( - jiraQueries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.JiraSource.JiraQueries, - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder, - com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder> - jiraQueriesBuilder_; - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getJiraQueriesList() { - if (jiraQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(jiraQueries_); - } else { - return jiraQueriesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getJiraQueriesCount() { - if (jiraQueriesBuilder_ == null) { - return jiraQueries_.size(); - } else { - return jiraQueriesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.JiraSource.JiraQueries getJiraQueries(int index) { - if (jiraQueriesBuilder_ == null) { - return jiraQueries_.get(index); - } else { - return jiraQueriesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJiraQueries( - int index, com.google.cloud.vertexai.api.JiraSource.JiraQueries value) { - if (jiraQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJiraQueriesIsMutable(); - jiraQueries_.set(index, value); - onChanged(); - } else { - jiraQueriesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJiraQueries( - int index, com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder builderForValue) { - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - jiraQueries_.set(index, builderForValue.build()); - onChanged(); - } else { - jiraQueriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJiraQueries(com.google.cloud.vertexai.api.JiraSource.JiraQueries value) { - if (jiraQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJiraQueriesIsMutable(); - jiraQueries_.add(value); - onChanged(); - } else { - jiraQueriesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJiraQueries( - int index, com.google.cloud.vertexai.api.JiraSource.JiraQueries value) { - if (jiraQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJiraQueriesIsMutable(); - jiraQueries_.add(index, value); - onChanged(); - } else { - jiraQueriesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJiraQueries( - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder builderForValue) { - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - jiraQueries_.add(builderForValue.build()); - onChanged(); - } else { - jiraQueriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJiraQueries( - int index, com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder builderForValue) { - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - jiraQueries_.add(index, builderForValue.build()); - onChanged(); - } else { - jiraQueriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllJiraQueries( - java.lang.Iterable values) { - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jiraQueries_); - onChanged(); - } else { - jiraQueriesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearJiraQueries() { - if (jiraQueriesBuilder_ == null) { - jiraQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - jiraQueriesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeJiraQueries(int index) { - if (jiraQueriesBuilder_ == null) { - ensureJiraQueriesIsMutable(); - jiraQueries_.remove(index); - onChanged(); - } else { - jiraQueriesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder getJiraQueriesBuilder( - int index) { - return internalGetJiraQueriesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder getJiraQueriesOrBuilder( - int index) { - if (jiraQueriesBuilder_ == null) { - return jiraQueries_.get(index); - } else { - return jiraQueriesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getJiraQueriesOrBuilderList() { - if (jiraQueriesBuilder_ != null) { - return jiraQueriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jiraQueries_); - } - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder addJiraQueriesBuilder() { - return internalGetJiraQueriesFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.JiraSource.JiraQueries.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder addJiraQueriesBuilder( - int index) { - return internalGetJiraQueriesFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.JiraSource.JiraQueries.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The Jira queries.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getJiraQueriesBuilderList() { - return internalGetJiraQueriesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.JiraSource.JiraQueries, - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder, - com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder> - internalGetJiraQueriesFieldBuilder() { - if (jiraQueriesBuilder_ == null) { - jiraQueriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.JiraSource.JiraQueries, - com.google.cloud.vertexai.api.JiraSource.JiraQueries.Builder, - com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder>( - jiraQueries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - jiraQueries_ = null; - } - return jiraQueriesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.JiraSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.JiraSource) - private static final com.google.cloud.vertexai.api.JiraSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.JiraSource(); - } - - public static com.google.cloud.vertexai.api.JiraSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JiraSource 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.vertexai.api.JiraSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSourceOrBuilder.java deleted file mode 100644 index e3a45dafcc84..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/JiraSourceOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface JiraSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.JiraSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getJiraQueriesList(); - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.JiraSource.JiraQueries getJiraQueries(int index); - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getJiraQueriesCount(); - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getJiraQueriesOrBuilderList(); - - /** - * - * - *
-   * Required. The Jira queries.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.JiraSource.JiraQueriesOrBuilder getJiraQueriesOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java deleted file mode 100644 index df0248406ddb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java +++ /dev/null @@ -1,1796 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ListEndpointsRequest} - */ -@com.google.protobuf.Generated -public final class ListEndpointsRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ListEndpointsRequest) - ListEndpointsRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ListEndpointsRequest"); - } - - // Use ListEndpointsRequest.newBuilder() to construct. - private ListEndpointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ListEndpointsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - orderBy_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ListEndpointsRequest.class, - com.google.cloud.vertexai.api.ListEndpointsRequest.Builder.class); - } - - private int bitField0_; - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - - /** - * - * - *
-   * Required. The resource name of the Location from which to list the
-   * Endpoints. Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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 Location from which to list the
-   * Endpoints. Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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_ = ""; - - /** - * - * - *
-   * Optional. An expression for filtering the results of the request. For field
-   * names both snake_case and camelCase are supported.
-   *
-   * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-   * ID, i.e. the last segment of the Endpoint's
-   * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-   * * `display_name` supports `=` and `!=`.
-   * * `labels` supports general map functions that is:
-   * * `labels.key=value` - key:value equality
-   * * `labels.key:*` or `labels:key` - key existence
-   * * A key including a space must be quoted. `labels."a key"`.
-   * * `base_model_name` only supports `=`.
-   *
-   * Some examples:
-   *
-   * * `endpoint=1`
-   * * `displayName="myDisplayName"`
-   * * `labels.myKey="myValue"`
-   * * `baseModelName="text-bison"`
-   * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. An expression for filtering the results of the request. For field
-   * names both snake_case and camelCase are supported.
-   *
-   * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-   * ID, i.e. the last segment of the Endpoint's
-   * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-   * * `display_name` supports `=` and `!=`.
-   * * `labels` supports general map functions that is:
-   * * `labels.key=value` - key:value equality
-   * * `labels.key:*` or `labels:key` - key existence
-   * * A key including a space must be quoted. `labels."a key"`.
-   * * `base_model_name` only supports `=`.
-   *
-   * Some examples:
-   *
-   * * `endpoint=1`
-   * * `displayName="myDisplayName"`
-   * * `labels.myKey="myValue"`
-   * * `baseModelName="text-bison"`
-   * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_ = 0; - - /** - * - * - *
-   * Optional. The standard list page size.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - - /** - * - * - *
-   * Optional. The standard list page token.
-   * Typically obtained via
-   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-   * of the previous
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-   * call.
-   * 
- * - * string page_token = 4 [(.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. The standard list page token.
-   * Typically obtained via
-   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-   * of the previous
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-   * call.
-   * 
- * - * string page_token = 4 [(.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; - } - } - - public static final int READ_MASK_FIELD_NUMBER = 5; - private com.google.protobuf.FieldMask readMask_; - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the readMask field is set. - */ - @java.lang.Override - public boolean hasReadMask() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getReadMask() { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } - - public static final int ORDER_BY_FIELD_NUMBER = 6; - - @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:
-   *
-   * * `display_name`
-   * * `create_time`
-   * * `update_time`
-   *
-   * Example: `display_name, create_time desc`.
-   * 
- * - * string order_by = 6; - * - * @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:
-   *
-   * * `display_name`
-   * * `create_time`
-   * * `update_time`
-   *
-   * Example: `display_name, create_time desc`.
-   * 
- * - * string order_by = 6; - * - * @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.GeneratedMessage.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getReadMask()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, 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.vertexai.api.ListEndpointsRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ListEndpointsRequest other = - (com.google.cloud.vertexai.api.ListEndpointsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (hasReadMask() != other.hasReadMask()) return false; - if (hasReadMask()) { - if (!getReadMask().equals(other.getReadMask())) 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - if (hasReadMask()) { - hash = (37 * hash) + READ_MASK_FIELD_NUMBER; - hash = (53 * hash) + getReadMask().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.vertexai.api.ListEndpointsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest 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.vertexai.api.ListEndpointsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest 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.vertexai.api.ListEndpointsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ListEndpointsRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ListEndpointsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ListEndpointsRequest) - com.google.cloud.vertexai.api.ListEndpointsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ListEndpointsRequest.class, - com.google.cloud.vertexai.api.ListEndpointsRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ListEndpointsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetReadMaskFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - readMask_ = null; - if (readMaskBuilder_ != null) { - readMaskBuilder_.dispose(); - readMaskBuilder_ = null; - } - orderBy_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ListEndpointsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsRequest build() { - com.google.cloud.vertexai.api.ListEndpointsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsRequest buildPartial() { - com.google.cloud.vertexai.api.ListEndpointsRequest result = - new com.google.cloud.vertexai.api.ListEndpointsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ListEndpointsRequest 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.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageToken_ = pageToken_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.orderBy_ = orderBy_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ListEndpointsRequest) { - return mergeFrom((com.google.cloud.vertexai.api.ListEndpointsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ListEndpointsRequest other) { - if (other == com.google.cloud.vertexai.api.ListEndpointsRequest.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.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasReadMask()) { - mergeReadMask(other.getReadMask()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000020; - 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: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetReadMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - orderBy_ = 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 bitField0_; - - private java.lang.Object parent_ = ""; - - /** - * - * - *
-     * Required. The resource name of the Location from which to list the
-     * Endpoints. Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location from which to list the
-     * Endpoints. Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location from which to list the
-     * Endpoints. Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location from which to list the
-     * Endpoints. Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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 Location from which to list the
-     * Endpoints. Format: `projects/{project}/locations/{location}`
-     * 
- * - * - * 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_ = ""; - - /** - * - * - *
-     * Optional. An expression for filtering the results of the request. For field
-     * names both snake_case and camelCase are supported.
-     *
-     * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-     * ID, i.e. the last segment of the Endpoint's
-     * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-     * * `display_name` supports `=` and `!=`.
-     * * `labels` supports general map functions that is:
-     * * `labels.key=value` - key:value equality
-     * * `labels.key:*` or `labels:key` - key existence
-     * * A key including a space must be quoted. `labels."a key"`.
-     * * `base_model_name` only supports `=`.
-     *
-     * Some examples:
-     *
-     * * `endpoint=1`
-     * * `displayName="myDisplayName"`
-     * * `labels.myKey="myValue"`
-     * * `baseModelName="text-bison"`
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. An expression for filtering the results of the request. For field
-     * names both snake_case and camelCase are supported.
-     *
-     * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-     * ID, i.e. the last segment of the Endpoint's
-     * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-     * * `display_name` supports `=` and `!=`.
-     * * `labels` supports general map functions that is:
-     * * `labels.key=value` - key:value equality
-     * * `labels.key:*` or `labels:key` - key existence
-     * * A key including a space must be quoted. `labels."a key"`.
-     * * `base_model_name` only supports `=`.
-     *
-     * Some examples:
-     *
-     * * `endpoint=1`
-     * * `displayName="myDisplayName"`
-     * * `labels.myKey="myValue"`
-     * * `baseModelName="text-bison"`
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. An expression for filtering the results of the request. For field
-     * names both snake_case and camelCase are supported.
-     *
-     * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-     * ID, i.e. the last segment of the Endpoint's
-     * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-     * * `display_name` supports `=` and `!=`.
-     * * `labels` supports general map functions that is:
-     * * `labels.key=value` - key:value equality
-     * * `labels.key:*` or `labels:key` - key existence
-     * * A key including a space must be quoted. `labels."a key"`.
-     * * `base_model_name` only supports `=`.
-     *
-     * Some examples:
-     *
-     * * `endpoint=1`
-     * * `displayName="myDisplayName"`
-     * * `labels.myKey="myValue"`
-     * * `baseModelName="text-bison"`
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - /** - * - * - *
-     * Optional. An expression for filtering the results of the request. For field
-     * names both snake_case and camelCase are supported.
-     *
-     * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-     * ID, i.e. the last segment of the Endpoint's
-     * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-     * * `display_name` supports `=` and `!=`.
-     * * `labels` supports general map functions that is:
-     * * `labels.key=value` - key:value equality
-     * * `labels.key:*` or `labels:key` - key existence
-     * * A key including a space must be quoted. `labels."a key"`.
-     * * `base_model_name` only supports `=`.
-     *
-     * Some examples:
-     *
-     * * `endpoint=1`
-     * * `displayName="myDisplayName"`
-     * * `labels.myKey="myValue"`
-     * * `baseModelName="text-bison"`
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. An expression for filtering the results of the request. For field
-     * names both snake_case and camelCase are supported.
-     *
-     * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-     * ID, i.e. the last segment of the Endpoint's
-     * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-     * * `display_name` supports `=` and `!=`.
-     * * `labels` supports general map functions that is:
-     * * `labels.key=value` - key:value equality
-     * * `labels.key:*` or `labels:key` - key existence
-     * * A key including a space must be quoted. `labels."a key"`.
-     * * `base_model_name` only supports `=`.
-     *
-     * Some examples:
-     *
-     * * `endpoint=1`
-     * * `displayName="myDisplayName"`
-     * * `labels.myKey="myValue"`
-     * * `baseModelName="text-bison"`
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 int pageSize_; - - /** - * - * - *
-     * Optional. The standard list page size.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - /** - * - * - *
-     * Optional. The standard list page size.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The standard list page size.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000004); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - - /** - * - * - *
-     * Optional. The standard list page token.
-     * Typically obtained via
-     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-     * of the previous
-     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-     * call.
-     * 
- * - * string page_token = 4 [(.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. The standard list page token.
-     * Typically obtained via
-     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-     * of the previous
-     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-     * call.
-     * 
- * - * string page_token = 4 [(.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. The standard list page token.
-     * Typically obtained via
-     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-     * of the previous
-     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-     * call.
-     * 
- * - * string page_token = 4 [(.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_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The standard list page token.
-     * Typically obtained via
-     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-     * of the previous
-     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-     * call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The standard list page token.
-     * Typically obtained via
-     * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-     * of the previous
-     * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-     * call.
-     * 
- * - * string page_token = 4 [(.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_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.protobuf.FieldMask readMask_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - readMaskBuilder_; - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the readMask field is set. - */ - public boolean hasReadMask() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readMask. - */ - public com.google.protobuf.FieldMask getReadMask() { - if (readMaskBuilder_ == null) { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } else { - return readMaskBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReadMask(com.google.protobuf.FieldMask value) { - if (readMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readMask_ = value; - } else { - readMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (readMaskBuilder_ == null) { - readMask_ = builderForValue.build(); - } else { - readMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReadMask(com.google.protobuf.FieldMask value) { - if (readMaskBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && readMask_ != null - && readMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getReadMaskBuilder().mergeFrom(value); - } else { - readMask_ = value; - } - } else { - readMaskBuilder_.mergeFrom(value); - } - if (readMask_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearReadMask() { - bitField0_ = (bitField0_ & ~0x00000010); - readMask_ = null; - if (readMaskBuilder_ != null) { - readMaskBuilder_.dispose(); - readMaskBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetReadMaskFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { - if (readMaskBuilder_ != null) { - return readMaskBuilder_.getMessageOrBuilder(); - } else { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } - } - - /** - * - * - *
-     * Optional. Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - internalGetReadMaskFieldBuilder() { - if (readMaskBuilder_ == null) { - readMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getReadMask(), getParentForChildren(), isClean()); - readMask_ = null; - } - return readMaskBuilder_; - } - - 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:
-     *
-     * * `display_name`
-     * * `create_time`
-     * * `update_time`
-     *
-     * Example: `display_name, create_time desc`.
-     * 
- * - * string order_by = 6; - * - * @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:
-     *
-     * * `display_name`
-     * * `create_time`
-     * * `update_time`
-     *
-     * Example: `display_name, create_time desc`.
-     * 
- * - * string order_by = 6; - * - * @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:
-     *
-     * * `display_name`
-     * * `create_time`
-     * * `update_time`
-     *
-     * Example: `display_name, create_time desc`.
-     * 
- * - * string order_by = 6; - * - * @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_ |= 0x00000020; - 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:
-     *
-     * * `display_name`
-     * * `create_time`
-     * * `update_time`
-     *
-     * Example: `display_name, create_time desc`.
-     * 
- * - * string order_by = 6; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000020); - 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:
-     *
-     * * `display_name`
-     * * `create_time`
-     * * `update_time`
-     *
-     * Example: `display_name, create_time desc`.
-     * 
- * - * string order_by = 6; - * - * @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_ |= 0x00000020; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ListEndpointsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ListEndpointsRequest) - private static final com.google.cloud.vertexai.api.ListEndpointsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ListEndpointsRequest(); - } - - public static com.google.cloud.vertexai.api.ListEndpointsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListEndpointsRequest 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.vertexai.api.ListEndpointsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java deleted file mode 100644 index a58246cb0943..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ListEndpointsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ListEndpointsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the Location from which to list the
-   * Endpoints. Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * 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 Location from which to list the
-   * Endpoints. Format: `projects/{project}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. An expression for filtering the results of the request. For field
-   * names both snake_case and camelCase are supported.
-   *
-   * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-   * ID, i.e. the last segment of the Endpoint's
-   * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-   * * `display_name` supports `=` and `!=`.
-   * * `labels` supports general map functions that is:
-   * * `labels.key=value` - key:value equality
-   * * `labels.key:*` or `labels:key` - key existence
-   * * A key including a space must be quoted. `labels."a key"`.
-   * * `base_model_name` only supports `=`.
-   *
-   * Some examples:
-   *
-   * * `endpoint=1`
-   * * `displayName="myDisplayName"`
-   * * `labels.myKey="myValue"`
-   * * `baseModelName="text-bison"`
-   * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - - /** - * - * - *
-   * Optional. An expression for filtering the results of the request. For field
-   * names both snake_case and camelCase are supported.
-   *
-   * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
-   * ID, i.e. the last segment of the Endpoint's
-   * [resource name][google.cloud.aiplatform.v1.Endpoint.name].
-   * * `display_name` supports `=` and `!=`.
-   * * `labels` supports general map functions that is:
-   * * `labels.key=value` - key:value equality
-   * * `labels.key:*` or `labels:key` - key existence
-   * * A key including a space must be quoted. `labels."a key"`.
-   * * `base_model_name` only supports `=`.
-   *
-   * Some examples:
-   *
-   * * `endpoint=1`
-   * * `displayName="myDisplayName"`
-   * * `labels.myKey="myValue"`
-   * * `baseModelName="text-bison"`
-   * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. The standard list page size.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. The standard list page token.
-   * Typically obtained via
-   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-   * of the previous
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-   * call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - - /** - * - * - *
-   * Optional. The standard list page token.
-   * Typically obtained via
-   * [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
-   * of the previous
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
-   * call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the readMask field is set. - */ - boolean hasReadMask(); - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The readMask. - */ - com.google.protobuf.FieldMask getReadMask(); - - /** - * - * - *
-   * Optional. Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); - - /** - * - * - *
-   * A comma-separated list of fields to order by, sorted in ascending order.
-   * Use "desc" after a field name for descending.
-   * Supported fields:
-   *
-   * * `display_name`
-   * * `create_time`
-   * * `update_time`
-   *
-   * Example: `display_name, create_time desc`.
-   * 
- * - * string order_by = 6; - * - * @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:
-   *
-   * * `display_name`
-   * * `create_time`
-   * * `update_time`
-   *
-   * Example: `display_name, create_time desc`.
-   * 
- * - * string order_by = 6; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java deleted file mode 100644 index 277ff378bfd2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java +++ /dev/null @@ -1,1134 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ListEndpointsResponse} - */ -@com.google.protobuf.Generated -public final class ListEndpointsResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ListEndpointsResponse) - ListEndpointsResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ListEndpointsResponse"); - } - - // Use ListEndpointsResponse.newBuilder() to construct. - private ListEndpointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ListEndpointsResponse() { - endpoints_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ListEndpointsResponse.class, - com.google.cloud.vertexai.api.ListEndpointsResponse.Builder.class); - } - - public static final int ENDPOINTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List endpoints_; - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - @java.lang.Override - public java.util.List getEndpointsList() { - return endpoints_; - } - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - @java.lang.Override - public java.util.List - getEndpointsOrBuilderList() { - return endpoints_; - } - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - @java.lang.Override - public int getEndpointsCount() { - return endpoints_.size(); - } - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint getEndpoints(int index) { - return endpoints_.get(index); - } - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointsOrBuilder(int index) { - return endpoints_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - - /** - * - * - *
-   * A token to retrieve the next page of results.
-   * Pass to
-   * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-   * to obtain that 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; - } - } - - /** - * - * - *
-   * A token to retrieve the next page of results.
-   * Pass to
-   * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-   * to obtain that 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 < endpoints_.size(); i++) { - output.writeMessage(1, endpoints_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessage.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 < endpoints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessage.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.vertexai.api.ListEndpointsResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ListEndpointsResponse other = - (com.google.cloud.vertexai.api.ListEndpointsResponse) obj; - - if (!getEndpointsList().equals(other.getEndpointsList())) 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 (getEndpointsCount() > 0) { - hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + getEndpointsList().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.vertexai.api.ListEndpointsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse 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.vertexai.api.ListEndpointsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse 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.vertexai.api.ListEndpointsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ListEndpointsResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ListEndpointsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ListEndpointsResponse) - com.google.cloud.vertexai.api.ListEndpointsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ListEndpointsResponse.class, - com.google.cloud.vertexai.api.ListEndpointsResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ListEndpointsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (endpointsBuilder_ == null) { - endpoints_ = java.util.Collections.emptyList(); - } else { - endpoints_ = null; - endpointsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_ListEndpointsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ListEndpointsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsResponse build() { - com.google.cloud.vertexai.api.ListEndpointsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ListEndpointsResponse buildPartial() { - com.google.cloud.vertexai.api.ListEndpointsResponse result = - new com.google.cloud.vertexai.api.ListEndpointsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.ListEndpointsResponse result) { - if (endpointsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - endpoints_ = java.util.Collections.unmodifiableList(endpoints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.endpoints_ = endpoints_; - } else { - result.endpoints_ = endpointsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ListEndpointsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ListEndpointsResponse) { - return mergeFrom((com.google.cloud.vertexai.api.ListEndpointsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ListEndpointsResponse other) { - if (other == com.google.cloud.vertexai.api.ListEndpointsResponse.getDefaultInstance()) - return this; - if (endpointsBuilder_ == null) { - if (!other.endpoints_.isEmpty()) { - if (endpoints_.isEmpty()) { - endpoints_ = other.endpoints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEndpointsIsMutable(); - endpoints_.addAll(other.endpoints_); - } - onChanged(); - } - } else { - if (!other.endpoints_.isEmpty()) { - if (endpointsBuilder_.isEmpty()) { - endpointsBuilder_.dispose(); - endpointsBuilder_ = null; - endpoints_ = other.endpoints_; - bitField0_ = (bitField0_ & ~0x00000001); - endpointsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetEndpointsFieldBuilder() - : null; - } else { - endpointsBuilder_.addAllMessages(other.endpoints_); - } - } - } - 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.vertexai.api.Endpoint m = - input.readMessage( - com.google.cloud.vertexai.api.Endpoint.parser(), extensionRegistry); - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - endpoints_.add(m); - } else { - endpointsBuilder_.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 endpoints_ = - java.util.Collections.emptyList(); - - private void ensureEndpointsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - endpoints_ = new java.util.ArrayList(endpoints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - endpointsBuilder_; - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public java.util.List getEndpointsList() { - if (endpointsBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpoints_); - } else { - return endpointsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public int getEndpointsCount() { - if (endpointsBuilder_ == null) { - return endpoints_.size(); - } else { - return endpointsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public com.google.cloud.vertexai.api.Endpoint getEndpoints(int index) { - if (endpointsBuilder_ == null) { - return endpoints_.get(index); - } else { - return endpointsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder setEndpoints(int index, com.google.cloud.vertexai.api.Endpoint value) { - if (endpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointsIsMutable(); - endpoints_.set(index, value); - onChanged(); - } else { - endpointsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder setEndpoints( - int index, com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - endpoints_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder addEndpoints(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointsIsMutable(); - endpoints_.add(value); - onChanged(); - } else { - endpointsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder addEndpoints(int index, com.google.cloud.vertexai.api.Endpoint value) { - if (endpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointsIsMutable(); - endpoints_.add(index, value); - onChanged(); - } else { - endpointsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder addEndpoints(com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - endpoints_.add(builderForValue.build()); - onChanged(); - } else { - endpointsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder addEndpoints( - int index, com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - endpoints_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder addAllEndpoints( - java.lang.Iterable values) { - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpoints_); - onChanged(); - } else { - endpointsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder clearEndpoints() { - if (endpointsBuilder_ == null) { - endpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - endpointsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public Builder removeEndpoints(int index) { - if (endpointsBuilder_ == null) { - ensureEndpointsIsMutable(); - endpoints_.remove(index); - onChanged(); - } else { - endpointsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public com.google.cloud.vertexai.api.Endpoint.Builder getEndpointsBuilder(int index) { - return internalGetEndpointsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointsOrBuilder(int index) { - if (endpointsBuilder_ == null) { - return endpoints_.get(index); - } else { - return endpointsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public java.util.List - getEndpointsOrBuilderList() { - if (endpointsBuilder_ != null) { - return endpointsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpoints_); - } - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public com.google.cloud.vertexai.api.Endpoint.Builder addEndpointsBuilder() { - return internalGetEndpointsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()); - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public com.google.cloud.vertexai.api.Endpoint.Builder addEndpointsBuilder(int index) { - return internalGetEndpointsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()); - } - - /** - * - * - *
-     * List of Endpoints in the requested page.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - public java.util.List - getEndpointsBuilderList() { - return internalGetEndpointsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - internalGetEndpointsFieldBuilder() { - if (endpointsBuilder_ == null) { - endpointsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder>( - endpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - endpoints_ = null; - } - return endpointsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - - /** - * - * - *
-     * A token to retrieve the next page of results.
-     * Pass to
-     * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-     * to obtain that 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; - } - } - - /** - * - * - *
-     * A token to retrieve the next page of results.
-     * Pass to
-     * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-     * to obtain that 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; - } - } - - /** - * - * - *
-     * A token to retrieve the next page of results.
-     * Pass to
-     * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-     * to obtain that 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; - } - - /** - * - * - *
-     * A token to retrieve the next page of results.
-     * Pass to
-     * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-     * to obtain that page.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * A token to retrieve the next page of results.
-     * Pass to
-     * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-     * to obtain that 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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ListEndpointsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ListEndpointsResponse) - private static final com.google.cloud.vertexai.api.ListEndpointsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ListEndpointsResponse(); - } - - public static com.google.cloud.vertexai.api.ListEndpointsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListEndpointsResponse 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.vertexai.api.ListEndpointsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java deleted file mode 100644 index 24ef7eae6046..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ListEndpointsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ListEndpointsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - java.util.List getEndpointsList(); - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - com.google.cloud.vertexai.api.Endpoint getEndpoints(int index); - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - int getEndpointsCount(); - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - java.util.List - getEndpointsOrBuilderList(); - - /** - * - * - *
-   * List of Endpoints in the requested page.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Endpoint endpoints = 1; - */ - com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointsOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve the next page of results.
-   * Pass to
-   * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-   * to obtain that page.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - - /** - * - * - *
-   * A token to retrieve the next page of results.
-   * Pass to
-   * [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
-   * to obtain that page.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java deleted file mode 100644 index 5d916e803aef..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class LlmUtilityServiceProto extends com.google.protobuf.GeneratedFile { - private LlmUtilityServiceProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LlmUtilityServiceProto"); - } - - 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_vertexai_v1_ComputeTokensRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_TokensInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_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" - + "2google/cloud/vertexai/v1/llm_utility_s" - + "ervice.proto\022\030google.cloud.vertexai.v1\032\034" - + "google/api/annotations.proto\032\027google/api" - + "/client.proto\032\037google/api/field_behavior" - + ".proto\032\031google/api/resource.proto\032&googl" - + "e/cloud/vertexai/v1/content.proto\0321googl" - + "e/cloud/vertexai/v1/prediction_service.proto\032\034google/protobuf/struct.proto\"\322\001\n" - + "\024ComputeTokensRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022.\n" - + "\tinstances\030\002 \003(\0132\026.google.protobuf.ValueB\003\340A\001\022\022\n" - + "\005model\030\003 \001(\tB\003\340A\001\0228\n" - + "\010contents\030\004 \003(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\001\"B\n\n" - + "TokensInfo\022\016\n" - + "\006tokens\030\001 \003(\014\022\021\n" - + "\ttoken_ids\030\002 \003(\003\022\021\n" - + "\004role\030\003 \001(\tB\003\340A\001\"R\n" - + "\025ComputeTokensResponse\0229\n" - + "\013tokens_info\030\001 \003(\0132$.google.cloud.vertexai.v1.TokensInfo2\360\006\n" - + "\021LlmUtilityService\022\375\002\n" - + "\013CountTokens\022,.google.cloud.vertexai.v1.CountTokensRequ" - + "est\032-.google.cloud.vertexai.v1.CountToke" - + "nsResponse\"\220\002\332A\022endpoint,instances\202\323\344\223\002\364" - + "\001\"=/v1/{endpoint=projects/*/locations/*/" - + "endpoints/*}:countTokens:\001*ZL\"G/v1/{endpoint=projects/*/locations/*/publishers/*" - + "/models/*}:countTokens:\001*Z+\"&/v1/{endpoi" - + "nt=endpoints/*}:countTokens:\001*Z5\"0/v1/{e" - + "ndpoint=publishers/*/models/*}:countTokens:\001*\022\213\003\n\r" - + "ComputeTokens\022..google.cloud.vertexai.v1.ComputeTokensRequest\032/.google" - + ".cloud.vertexai.v1.ComputeTokensResponse" - + "\"\230\002\332A\022endpoint,instances\202\323\344\223\002\374\001\"?/v1/{en" - + "dpoint=projects/*/locations/*/endpoints/*}:computeTokens:\001*ZN\"I/v1/{endpoint=pro" - + "jects/*/locations/*/publishers/*/models/*}:computeTokens:\001*Z-\"(/v1/{endpoint=end" - + "points/*}:computeTokens:\001*Z7\"2/v1/{endpoint=publishers/*/models/*}:computeTokens" - + ":\001*\032M\312A\031aiplatform.googleapis.com\322A.http" - + "s://www.googleapis.com/auth/cloud-platformB\323\001\n" - + "\035com.google.cloud.vertexai.apiB\026LlmUtilityServiceProtoP\001Z>cloud.google.com" - + "/go/aiplatform/apiv1/aiplatformpb;aiplat" - + "formpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Go" - + "ogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.vertexai.api.ContentProto.getDescriptor(), - com.google.cloud.vertexai.api.PredictionServiceProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ComputeTokensRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Instances", "Model", "Contents", - }); - internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_TokensInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor, - new java.lang.String[] { - "Tokens", "TokenIds", "Role", - }); - internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ComputeTokensResponse_descriptor, - new java.lang.String[] { - "TokensInfo", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.ContentProto.getDescriptor(); - com.google.cloud.vertexai.api.PredictionServiceProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - 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); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LocationName.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LocationName.java deleted file mode 100644 index 22334c64ba9b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vertexai.api; - -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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResult.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResult.java deleted file mode 100644 index 453dfbb4e485..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResult.java +++ /dev/null @@ -1,3509 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Logprobs Result
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult} - */ -@com.google.protobuf.Generated -public final class LogprobsResult extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.LogprobsResult) - LogprobsResultOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LogprobsResult"); - } - - // Use LogprobsResult.newBuilder() to construct. - private LogprobsResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private LogprobsResult() { - topCandidates_ = java.util.Collections.emptyList(); - chosenCandidates_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.class, - com.google.cloud.vertexai.api.LogprobsResult.Builder.class); - } - - public interface CandidateOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.LogprobsResult.Candidate) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return Whether the token field is set. - */ - boolean hasToken(); - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return The token. - */ - java.lang.String getToken(); - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return The bytes for token. - */ - com.google.protobuf.ByteString getTokenBytes(); - - /** - * - * - *
-     * The candidate’s token id value.
-     * 
- * - * optional int32 token_id = 3; - * - * @return Whether the tokenId field is set. - */ - boolean hasTokenId(); - - /** - * - * - *
-     * The candidate’s token id value.
-     * 
- * - * optional int32 token_id = 3; - * - * @return The tokenId. - */ - int getTokenId(); - - /** - * - * - *
-     * The candidate's log probability.
-     * 
- * - * optional float log_probability = 2; - * - * @return Whether the logProbability field is set. - */ - boolean hasLogProbability(); - - /** - * - * - *
-     * The candidate's log probability.
-     * 
- * - * optional float log_probability = 2; - * - * @return The logProbability. - */ - float getLogProbability(); - } - - /** - * - * - *
-   * Candidate for the logprobs token and score.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult.Candidate} - */ - public static final class Candidate extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.LogprobsResult.Candidate) - CandidateOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Candidate"); - } - - // Use Candidate.newBuilder() to construct. - private Candidate(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Candidate() { - token_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.class, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder.class); - } - - private int bitField0_; - public static final int TOKEN_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object token_ = ""; - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return Whether the token field is set. - */ - @java.lang.Override - public boolean hasToken() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return The token. - */ - @java.lang.Override - public java.lang.String getToken() { - java.lang.Object ref = token_; - 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(); - token_ = s; - return s; - } - } - - /** - * - * - *
-     * The candidate’s token string value.
-     * 
- * - * optional string token = 1; - * - * @return The bytes for token. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTokenBytes() { - java.lang.Object ref = token_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - token_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOKEN_ID_FIELD_NUMBER = 3; - private int tokenId_ = 0; - - /** - * - * - *
-     * The candidate’s token id value.
-     * 
- * - * optional int32 token_id = 3; - * - * @return Whether the tokenId field is set. - */ - @java.lang.Override - public boolean hasTokenId() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The candidate’s token id value.
-     * 
- * - * optional int32 token_id = 3; - * - * @return The tokenId. - */ - @java.lang.Override - public int getTokenId() { - return tokenId_; - } - - public static final int LOG_PROBABILITY_FIELD_NUMBER = 2; - private float logProbability_ = 0F; - - /** - * - * - *
-     * The candidate's log probability.
-     * 
- * - * optional float log_probability = 2; - * - * @return Whether the logProbability field is set. - */ - @java.lang.Override - public boolean hasLogProbability() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The candidate's log probability.
-     * 
- * - * optional float log_probability = 2; - * - * @return The logProbability. - */ - @java.lang.Override - public float getLogProbability() { - return logProbability_; - } - - 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)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFloat(2, logProbability_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt32(3, tokenId_); - } - 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.GeneratedMessage.computeStringSize(1, token_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, logProbability_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, tokenId_); - } - 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.vertexai.api.LogprobsResult.Candidate)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.LogprobsResult.Candidate other = - (com.google.cloud.vertexai.api.LogprobsResult.Candidate) obj; - - if (hasToken() != other.hasToken()) return false; - if (hasToken()) { - if (!getToken().equals(other.getToken())) return false; - } - if (hasTokenId() != other.hasTokenId()) return false; - if (hasTokenId()) { - if (getTokenId() != other.getTokenId()) return false; - } - if (hasLogProbability() != other.hasLogProbability()) return false; - if (hasLogProbability()) { - if (java.lang.Float.floatToIntBits(getLogProbability()) - != java.lang.Float.floatToIntBits(other.getLogProbability())) 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 (hasToken()) { - hash = (37 * hash) + TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getToken().hashCode(); - } - if (hasTokenId()) { - hash = (37 * hash) + TOKEN_ID_FIELD_NUMBER; - hash = (53 * hash) + getTokenId(); - } - if (hasLogProbability()) { - hash = (37 * hash) + LOG_PROBABILITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLogProbability()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate 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.vertexai.api.LogprobsResult.Candidate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate 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.vertexai.api.LogprobsResult.Candidate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.LogprobsResult.Candidate 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Candidate for the logprobs token and score.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult.Candidate} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.LogprobsResult.Candidate) - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.class, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.LogprobsResult.Candidate.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - token_ = ""; - tokenId_ = 0; - logProbability_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_Candidate_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.Candidate getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.Candidate build() { - com.google.cloud.vertexai.api.LogprobsResult.Candidate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.Candidate buildPartial() { - com.google.cloud.vertexai.api.LogprobsResult.Candidate result = - new com.google.cloud.vertexai.api.LogprobsResult.Candidate(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.LogprobsResult.Candidate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.token_ = token_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.tokenId_ = tokenId_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.logProbability_ = logProbability_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.LogprobsResult.Candidate) { - return mergeFrom((com.google.cloud.vertexai.api.LogprobsResult.Candidate) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.LogprobsResult.Candidate other) { - if (other == com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance()) - return this; - if (other.hasToken()) { - token_ = other.token_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasTokenId()) { - setTokenId(other.getTokenId()); - } - if (other.hasLogProbability()) { - setLogProbability(other.getLogProbability()); - } - 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: - { - token_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - logProbability_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 21 - case 24: - { - tokenId_ = input.readInt32(); - 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 java.lang.Object token_ = ""; - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @return Whether the token field is set. - */ - public boolean hasToken() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @return The token. - */ - public java.lang.String getToken() { - java.lang.Object ref = token_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - token_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @return The bytes for token. - */ - public com.google.protobuf.ByteString getTokenBytes() { - java.lang.Object ref = token_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - token_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @param value The token to set. - * @return This builder for chaining. - */ - public Builder setToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - token_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @return This builder for chaining. - */ - public Builder clearToken() { - token_ = getDefaultInstance().getToken(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * The candidate’s token string value.
-       * 
- * - * optional string token = 1; - * - * @param value The bytes for token to set. - * @return This builder for chaining. - */ - public Builder setTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - token_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int tokenId_; - - /** - * - * - *
-       * The candidate’s token id value.
-       * 
- * - * optional int32 token_id = 3; - * - * @return Whether the tokenId field is set. - */ - @java.lang.Override - public boolean hasTokenId() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * The candidate’s token id value.
-       * 
- * - * optional int32 token_id = 3; - * - * @return The tokenId. - */ - @java.lang.Override - public int getTokenId() { - return tokenId_; - } - - /** - * - * - *
-       * The candidate’s token id value.
-       * 
- * - * optional int32 token_id = 3; - * - * @param value The tokenId to set. - * @return This builder for chaining. - */ - public Builder setTokenId(int value) { - - tokenId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The candidate’s token id value.
-       * 
- * - * optional int32 token_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearTokenId() { - bitField0_ = (bitField0_ & ~0x00000002); - tokenId_ = 0; - onChanged(); - return this; - } - - private float logProbability_; - - /** - * - * - *
-       * The candidate's log probability.
-       * 
- * - * optional float log_probability = 2; - * - * @return Whether the logProbability field is set. - */ - @java.lang.Override - public boolean hasLogProbability() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-       * The candidate's log probability.
-       * 
- * - * optional float log_probability = 2; - * - * @return The logProbability. - */ - @java.lang.Override - public float getLogProbability() { - return logProbability_; - } - - /** - * - * - *
-       * The candidate's log probability.
-       * 
- * - * optional float log_probability = 2; - * - * @param value The logProbability to set. - * @return This builder for chaining. - */ - public Builder setLogProbability(float value) { - - logProbability_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * The candidate's log probability.
-       * 
- * - * optional float log_probability = 2; - * - * @return This builder for chaining. - */ - public Builder clearLogProbability() { - bitField0_ = (bitField0_ & ~0x00000004); - logProbability_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.LogprobsResult.Candidate) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.LogprobsResult.Candidate) - private static final com.google.cloud.vertexai.api.LogprobsResult.Candidate DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.LogprobsResult.Candidate(); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.Candidate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Candidate 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.vertexai.api.LogprobsResult.Candidate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface TopCandidatesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.LogprobsResult.TopCandidates) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - java.util.List getCandidatesList(); - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - com.google.cloud.vertexai.api.LogprobsResult.Candidate getCandidates(int index); - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - int getCandidatesCount(); - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - java.util.List - getCandidatesOrBuilderList(); - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder getCandidatesOrBuilder( - int index); - } - - /** - * - * - *
-   * Candidates with top log probabilities at each decoding step.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult.TopCandidates} - */ - public static final class TopCandidates extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.LogprobsResult.TopCandidates) - TopCandidatesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "TopCandidates"); - } - - // Use TopCandidates.newBuilder() to construct. - private TopCandidates(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private TopCandidates() { - candidates_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.class, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder.class); - } - - public static final int CANDIDATES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List candidates_; - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - @java.lang.Override - public java.util.List - getCandidatesList() { - return candidates_; - } - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - @java.lang.Override - public java.util.List - getCandidatesOrBuilderList() { - return candidates_; - } - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - @java.lang.Override - public int getCandidatesCount() { - return candidates_.size(); - } - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.Candidate getCandidates(int index) { - return candidates_.get(index); - } - - /** - * - * - *
-     * Sorted by log probability in descending order.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder getCandidatesOrBuilder( - int index) { - return candidates_.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 < candidates_.size(); i++) { - output.writeMessage(1, candidates_.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 < candidates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, candidates_.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.vertexai.api.LogprobsResult.TopCandidates)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates other = - (com.google.cloud.vertexai.api.LogprobsResult.TopCandidates) obj; - - if (!getCandidatesList().equals(other.getCandidatesList())) 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 (getCandidatesCount() > 0) { - hash = (37 * hash) + CANDIDATES_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates 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.vertexai.api.LogprobsResult.TopCandidates parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates 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.vertexai.api.LogprobsResult.TopCandidates parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.LogprobsResult.TopCandidates 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Candidates with top log probabilities at each decoding step.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult.TopCandidates} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.LogprobsResult.TopCandidates) - com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.class, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (candidatesBuilder_ == null) { - candidates_ = java.util.Collections.emptyList(); - } else { - candidates_ = null; - candidatesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_TopCandidates_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates build() { - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates buildPartial() { - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates result = - new com.google.cloud.vertexai.api.LogprobsResult.TopCandidates(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates result) { - if (candidatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - candidates_ = java.util.Collections.unmodifiableList(candidates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.candidates_ = candidates_; - } else { - result.candidates_ = candidatesBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.LogprobsResult.TopCandidates) { - return mergeFrom((com.google.cloud.vertexai.api.LogprobsResult.TopCandidates) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.LogprobsResult.TopCandidates other) { - if (other - == com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.getDefaultInstance()) - return this; - if (candidatesBuilder_ == null) { - if (!other.candidates_.isEmpty()) { - if (candidates_.isEmpty()) { - candidates_ = other.candidates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCandidatesIsMutable(); - candidates_.addAll(other.candidates_); - } - onChanged(); - } - } else { - if (!other.candidates_.isEmpty()) { - if (candidatesBuilder_.isEmpty()) { - candidatesBuilder_.dispose(); - candidatesBuilder_ = null; - candidates_ = other.candidates_; - bitField0_ = (bitField0_ & ~0x00000001); - candidatesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCandidatesFieldBuilder() - : null; - } else { - candidatesBuilder_.addAllMessages(other.candidates_); - } - } - } - 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.vertexai.api.LogprobsResult.Candidate m = - input.readMessage( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.parser(), - extensionRegistry); - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(m); - } else { - candidatesBuilder_.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 candidates_ = - java.util.Collections.emptyList(); - - private void ensureCandidatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - candidates_ = - new java.util.ArrayList( - candidates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder> - candidatesBuilder_; - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public java.util.List - getCandidatesList() { - if (candidatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(candidates_); - } else { - return candidatesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public int getCandidatesCount() { - if (candidatesBuilder_ == null) { - return candidates_.size(); - } else { - return candidatesBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate getCandidates(int index) { - if (candidatesBuilder_ == null) { - return candidates_.get(index); - } else { - return candidatesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder setCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.set(index, value); - onChanged(); - } else { - candidatesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder setCandidates( - int index, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.set(index, builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder addCandidates(com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.add(value); - onChanged(); - } else { - candidatesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder addCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (candidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); - candidates_.add(index, value); - onChanged(); - } else { - candidatesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder addCandidates( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder addCandidates( - int index, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.add(index, builderForValue.build()); - onChanged(); - } else { - candidatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder addAllCandidates( - java.lang.Iterable - values) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, candidates_); - onChanged(); - } else { - candidatesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder clearCandidates() { - if (candidatesBuilder_ == null) { - candidates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - candidatesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public Builder removeCandidates(int index) { - if (candidatesBuilder_ == null) { - ensureCandidatesIsMutable(); - candidates_.remove(index); - onChanged(); - } else { - candidatesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder getCandidatesBuilder( - int index) { - return internalGetCandidatesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder getCandidatesOrBuilder( - int index) { - if (candidatesBuilder_ == null) { - return candidates_.get(index); - } else { - return candidatesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder> - getCandidatesOrBuilderList() { - if (candidatesBuilder_ != null) { - return candidatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(candidates_); - } - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder addCandidatesBuilder() { - return internalGetCandidatesFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder addCandidatesBuilder( - int index) { - return internalGetCandidatesFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-       * Sorted by log probability in descending order.
-       * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate candidates = 1; - */ - public java.util.List - getCandidatesBuilderList() { - return internalGetCandidatesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder> - internalGetCandidatesFieldBuilder() { - if (candidatesBuilder_ == null) { - candidatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder>( - candidates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - candidates_ = null; - } - return candidatesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.LogprobsResult.TopCandidates) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.LogprobsResult.TopCandidates) - private static final com.google.cloud.vertexai.api.LogprobsResult.TopCandidates - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.LogprobsResult.TopCandidates(); - } - - public static com.google.cloud.vertexai.api.LogprobsResult.TopCandidates getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TopCandidates 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.vertexai.api.LogprobsResult.TopCandidates getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int TOP_CANDIDATES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List topCandidates_; - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - @java.lang.Override - public java.util.List - getTopCandidatesList() { - return topCandidates_; - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder> - getTopCandidatesOrBuilderList() { - return topCandidates_; - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - @java.lang.Override - public int getTopCandidatesCount() { - return topCandidates_.size(); - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates getTopCandidates(int index) { - return topCandidates_.get(index); - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder - getTopCandidatesOrBuilder(int index) { - return topCandidates_.get(index); - } - - public static final int CHOSEN_CANDIDATES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List chosenCandidates_; - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - @java.lang.Override - public java.util.List - getChosenCandidatesList() { - return chosenCandidates_; - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - @java.lang.Override - public java.util.List - getChosenCandidatesOrBuilderList() { - return chosenCandidates_; - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - @java.lang.Override - public int getChosenCandidatesCount() { - return chosenCandidates_.size(); - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.Candidate getChosenCandidates(int index) { - return chosenCandidates_.get(index); - } - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder - getChosenCandidatesOrBuilder(int index) { - return chosenCandidates_.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 < topCandidates_.size(); i++) { - output.writeMessage(1, topCandidates_.get(i)); - } - for (int i = 0; i < chosenCandidates_.size(); i++) { - output.writeMessage(2, chosenCandidates_.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 < topCandidates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topCandidates_.get(i)); - } - for (int i = 0; i < chosenCandidates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, chosenCandidates_.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.vertexai.api.LogprobsResult)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.LogprobsResult other = - (com.google.cloud.vertexai.api.LogprobsResult) obj; - - if (!getTopCandidatesList().equals(other.getTopCandidatesList())) return false; - if (!getChosenCandidatesList().equals(other.getChosenCandidatesList())) 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 (getTopCandidatesCount() > 0) { - hash = (37 * hash) + TOP_CANDIDATES_FIELD_NUMBER; - hash = (53 * hash) + getTopCandidatesList().hashCode(); - } - if (getChosenCandidatesCount() > 0) { - hash = (37 * hash) + CHOSEN_CANDIDATES_FIELD_NUMBER; - hash = (53 * hash) + getChosenCandidatesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult 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.vertexai.api.LogprobsResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult 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.vertexai.api.LogprobsResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LogprobsResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.LogprobsResult 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Logprobs Result
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LogprobsResult} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.LogprobsResult) - com.google.cloud.vertexai.api.LogprobsResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LogprobsResult.class, - com.google.cloud.vertexai.api.LogprobsResult.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.LogprobsResult.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (topCandidatesBuilder_ == null) { - topCandidates_ = java.util.Collections.emptyList(); - } else { - topCandidates_ = null; - topCandidatesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (chosenCandidatesBuilder_ == null) { - chosenCandidates_ = java.util.Collections.emptyList(); - } else { - chosenCandidates_ = null; - chosenCandidatesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_LogprobsResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult build() { - com.google.cloud.vertexai.api.LogprobsResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LogprobsResult buildPartial() { - com.google.cloud.vertexai.api.LogprobsResult result = - new com.google.cloud.vertexai.api.LogprobsResult(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.LogprobsResult result) { - if (topCandidatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topCandidates_ = java.util.Collections.unmodifiableList(topCandidates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topCandidates_ = topCandidates_; - } else { - result.topCandidates_ = topCandidatesBuilder_.build(); - } - if (chosenCandidatesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - chosenCandidates_ = java.util.Collections.unmodifiableList(chosenCandidates_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.chosenCandidates_ = chosenCandidates_; - } else { - result.chosenCandidates_ = chosenCandidatesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.LogprobsResult result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.LogprobsResult) { - return mergeFrom((com.google.cloud.vertexai.api.LogprobsResult) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.LogprobsResult other) { - if (other == com.google.cloud.vertexai.api.LogprobsResult.getDefaultInstance()) return this; - if (topCandidatesBuilder_ == null) { - if (!other.topCandidates_.isEmpty()) { - if (topCandidates_.isEmpty()) { - topCandidates_ = other.topCandidates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopCandidatesIsMutable(); - topCandidates_.addAll(other.topCandidates_); - } - onChanged(); - } - } else { - if (!other.topCandidates_.isEmpty()) { - if (topCandidatesBuilder_.isEmpty()) { - topCandidatesBuilder_.dispose(); - topCandidatesBuilder_ = null; - topCandidates_ = other.topCandidates_; - bitField0_ = (bitField0_ & ~0x00000001); - topCandidatesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetTopCandidatesFieldBuilder() - : null; - } else { - topCandidatesBuilder_.addAllMessages(other.topCandidates_); - } - } - } - if (chosenCandidatesBuilder_ == null) { - if (!other.chosenCandidates_.isEmpty()) { - if (chosenCandidates_.isEmpty()) { - chosenCandidates_ = other.chosenCandidates_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.addAll(other.chosenCandidates_); - } - onChanged(); - } - } else { - if (!other.chosenCandidates_.isEmpty()) { - if (chosenCandidatesBuilder_.isEmpty()) { - chosenCandidatesBuilder_.dispose(); - chosenCandidatesBuilder_ = null; - chosenCandidates_ = other.chosenCandidates_; - bitField0_ = (bitField0_ & ~0x00000002); - chosenCandidatesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChosenCandidatesFieldBuilder() - : null; - } else { - chosenCandidatesBuilder_.addAllMessages(other.chosenCandidates_); - } - } - } - 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.vertexai.api.LogprobsResult.TopCandidates m = - input.readMessage( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.parser(), - extensionRegistry); - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - topCandidates_.add(m); - } else { - topCandidatesBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.LogprobsResult.Candidate m = - input.readMessage( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.parser(), - extensionRegistry); - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.add(m); - } else { - chosenCandidatesBuilder_.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.util.List - topCandidates_ = java.util.Collections.emptyList(); - - private void ensureTopCandidatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topCandidates_ = - new java.util.ArrayList( - topCandidates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder> - topCandidatesBuilder_; - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public java.util.List - getTopCandidatesList() { - if (topCandidatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(topCandidates_); - } else { - return topCandidatesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public int getTopCandidatesCount() { - if (topCandidatesBuilder_ == null) { - return topCandidates_.size(); - } else { - return topCandidatesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates getTopCandidates(int index) { - if (topCandidatesBuilder_ == null) { - return topCandidates_.get(index); - } else { - return topCandidatesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder setTopCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.TopCandidates value) { - if (topCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCandidatesIsMutable(); - topCandidates_.set(index, value); - onChanged(); - } else { - topCandidatesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder setTopCandidates( - int index, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder builderForValue) { - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - topCandidates_.set(index, builderForValue.build()); - onChanged(); - } else { - topCandidatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder addTopCandidates( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates value) { - if (topCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCandidatesIsMutable(); - topCandidates_.add(value); - onChanged(); - } else { - topCandidatesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder addTopCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.TopCandidates value) { - if (topCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCandidatesIsMutable(); - topCandidates_.add(index, value); - onChanged(); - } else { - topCandidatesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder addTopCandidates( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder builderForValue) { - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - topCandidates_.add(builderForValue.build()); - onChanged(); - } else { - topCandidatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder addTopCandidates( - int index, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder builderForValue) { - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - topCandidates_.add(index, builderForValue.build()); - onChanged(); - } else { - topCandidatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder addAllTopCandidates( - java.lang.Iterable - values) { - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topCandidates_); - onChanged(); - } else { - topCandidatesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder clearTopCandidates() { - if (topCandidatesBuilder_ == null) { - topCandidates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topCandidatesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public Builder removeTopCandidates(int index) { - if (topCandidatesBuilder_ == null) { - ensureTopCandidatesIsMutable(); - topCandidates_.remove(index); - onChanged(); - } else { - topCandidatesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder - getTopCandidatesBuilder(int index) { - return internalGetTopCandidatesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder - getTopCandidatesOrBuilder(int index) { - if (topCandidatesBuilder_ == null) { - return topCandidates_.get(index); - } else { - return topCandidatesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder> - getTopCandidatesOrBuilderList() { - if (topCandidatesBuilder_ != null) { - return topCandidatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topCandidates_); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder - addTopCandidatesBuilder() { - return internalGetTopCandidatesFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.getDefaultInstance()); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder - addTopCandidatesBuilder(int index) { - return internalGetTopCandidatesFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.getDefaultInstance()); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - public java.util.List - getTopCandidatesBuilderList() { - return internalGetTopCandidatesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder> - internalGetTopCandidatesFieldBuilder() { - if (topCandidatesBuilder_ == null) { - topCandidatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates.Builder, - com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder>( - topCandidates_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topCandidates_ = null; - } - return topCandidatesBuilder_; - } - - private java.util.List - chosenCandidates_ = java.util.Collections.emptyList(); - - private void ensureChosenCandidatesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - chosenCandidates_ = - new java.util.ArrayList( - chosenCandidates_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder> - chosenCandidatesBuilder_; - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public java.util.List - getChosenCandidatesList() { - if (chosenCandidatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(chosenCandidates_); - } else { - return chosenCandidatesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public int getChosenCandidatesCount() { - if (chosenCandidatesBuilder_ == null) { - return chosenCandidates_.size(); - } else { - return chosenCandidatesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate getChosenCandidates(int index) { - if (chosenCandidatesBuilder_ == null) { - return chosenCandidates_.get(index); - } else { - return chosenCandidatesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder setChosenCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (chosenCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChosenCandidatesIsMutable(); - chosenCandidates_.set(index, value); - onChanged(); - } else { - chosenCandidatesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder setChosenCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.set(index, builderForValue.build()); - onChanged(); - } else { - chosenCandidatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder addChosenCandidates( - com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (chosenCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChosenCandidatesIsMutable(); - chosenCandidates_.add(value); - onChanged(); - } else { - chosenCandidatesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder addChosenCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate value) { - if (chosenCandidatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChosenCandidatesIsMutable(); - chosenCandidates_.add(index, value); - onChanged(); - } else { - chosenCandidatesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder addChosenCandidates( - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.add(builderForValue.build()); - onChanged(); - } else { - chosenCandidatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder addChosenCandidates( - int index, com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder builderForValue) { - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.add(index, builderForValue.build()); - onChanged(); - } else { - chosenCandidatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder addAllChosenCandidates( - java.lang.Iterable - values) { - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chosenCandidates_); - onChanged(); - } else { - chosenCandidatesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder clearChosenCandidates() { - if (chosenCandidatesBuilder_ == null) { - chosenCandidates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - chosenCandidatesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public Builder removeChosenCandidates(int index) { - if (chosenCandidatesBuilder_ == null) { - ensureChosenCandidatesIsMutable(); - chosenCandidates_.remove(index); - onChanged(); - } else { - chosenCandidatesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder - getChosenCandidatesBuilder(int index) { - return internalGetChosenCandidatesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder - getChosenCandidatesOrBuilder(int index) { - if (chosenCandidatesBuilder_ == null) { - return chosenCandidates_.get(index); - } else { - return chosenCandidatesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public java.util.List - getChosenCandidatesOrBuilderList() { - if (chosenCandidatesBuilder_ != null) { - return chosenCandidatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(chosenCandidates_); - } - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder - addChosenCandidatesBuilder() { - return internalGetChosenCandidatesFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder - addChosenCandidatesBuilder(int index) { - return internalGetChosenCandidatesFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.LogprobsResult.Candidate.getDefaultInstance()); - } - - /** - * - * - *
-     * Length = total number of decoding steps.
-     * The chosen candidates may or may not be in top_candidates.
-     * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - * - */ - public java.util.List - getChosenCandidatesBuilderList() { - return internalGetChosenCandidatesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder> - internalGetChosenCandidatesFieldBuilder() { - if (chosenCandidatesBuilder_ == null) { - chosenCandidatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.LogprobsResult.Candidate, - com.google.cloud.vertexai.api.LogprobsResult.Candidate.Builder, - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder>( - chosenCandidates_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - chosenCandidates_ = null; - } - return chosenCandidatesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.LogprobsResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.LogprobsResult) - private static final com.google.cloud.vertexai.api.LogprobsResult DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.LogprobsResult(); - } - - public static com.google.cloud.vertexai.api.LogprobsResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LogprobsResult 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.vertexai.api.LogprobsResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResultOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResultOrBuilder.java deleted file mode 100644 index 64895db8d793..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LogprobsResultOrBuilder.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface LogprobsResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.LogprobsResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - java.util.List getTopCandidatesList(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - com.google.cloud.vertexai.api.LogprobsResult.TopCandidates getTopCandidates(int index); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - int getTopCandidatesCount(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - java.util.List - getTopCandidatesOrBuilderList(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.TopCandidates top_candidates = 1; - * - */ - com.google.cloud.vertexai.api.LogprobsResult.TopCandidatesOrBuilder getTopCandidatesOrBuilder( - int index); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - java.util.List getChosenCandidatesList(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - com.google.cloud.vertexai.api.LogprobsResult.Candidate getChosenCandidates(int index); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - int getChosenCandidatesCount(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - java.util.List - getChosenCandidatesOrBuilderList(); - - /** - * - * - *
-   * Length = total number of decoding steps.
-   * The chosen candidates may or may not be in top_candidates.
-   * 
- * - * repeated .google.cloud.vertexai.v1.LogprobsResult.Candidate chosen_candidates = 2; - */ - com.google.cloud.vertexai.api.LogprobsResult.CandidateOrBuilder getChosenCandidatesOrBuilder( - int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMount.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMount.java deleted file mode 100644 index 95d47af62ae6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMount.java +++ /dev/null @@ -1,1169 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents a mount configuration for Lustre file system.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LustreMount} - */ -@com.google.protobuf.Generated -public final class LustreMount extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.LustreMount) - LustreMountOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LustreMount"); - } - - // Use LustreMount.newBuilder() to construct. - private LustreMount(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private LustreMount() { - instanceIp_ = ""; - volumeHandle_ = ""; - filesystem_ = ""; - mountPoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_LustreMount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_LustreMount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LustreMount.class, - com.google.cloud.vertexai.api.LustreMount.Builder.class); - } - - public static final int INSTANCE_IP_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object instanceIp_ = ""; - - /** - * - * - *
-   * Required. IP address of the Lustre instance.
-   * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The instanceIp. - */ - @java.lang.Override - public java.lang.String getInstanceIp() { - java.lang.Object ref = instanceIp_; - 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(); - instanceIp_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. IP address of the Lustre instance.
-   * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for instanceIp. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInstanceIpBytes() { - java.lang.Object ref = instanceIp_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VOLUME_HANDLE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object volumeHandle_ = ""; - - /** - * - * - *
-   * Required. The unique identifier of the Lustre volume.
-   * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The volumeHandle. - */ - @java.lang.Override - public java.lang.String getVolumeHandle() { - java.lang.Object ref = volumeHandle_; - 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(); - volumeHandle_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The unique identifier of the Lustre volume.
-   * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for volumeHandle. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVolumeHandleBytes() { - java.lang.Object ref = volumeHandle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - volumeHandle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILESYSTEM_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object filesystem_ = ""; - - /** - * - * - *
-   * Required. The name of the Lustre filesystem.
-   * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The filesystem. - */ - @java.lang.Override - public java.lang.String getFilesystem() { - java.lang.Object ref = filesystem_; - 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(); - filesystem_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Lustre filesystem.
-   * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for filesystem. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilesystemBytes() { - java.lang.Object ref = filesystem_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filesystem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MOUNT_POINT_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object mountPoint_ = ""; - - /** - * - * - *
-   * Required. Destination mount path. The Lustre file system will be mounted
-   * for the user under /mnt/lustre/<mount_point>
-   * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - @java.lang.Override - public java.lang.String getMountPoint() { - java.lang.Object ref = mountPoint_; - 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(); - mountPoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. Destination mount path. The Lustre file system will be mounted
-   * for the user under /mnt/lustre/<mount_point>
-   * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMountPointBytes() { - java.lang.Object ref = mountPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mountPoint_ = 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.GeneratedMessage.isStringEmpty(instanceIp_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceIp_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(volumeHandle_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, volumeHandle_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filesystem_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, filesystem_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mountPoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, mountPoint_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceIp_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceIp_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(volumeHandle_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, volumeHandle_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filesystem_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, filesystem_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mountPoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, mountPoint_); - } - 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.vertexai.api.LustreMount)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.LustreMount other = - (com.google.cloud.vertexai.api.LustreMount) obj; - - if (!getInstanceIp().equals(other.getInstanceIp())) return false; - if (!getVolumeHandle().equals(other.getVolumeHandle())) return false; - if (!getFilesystem().equals(other.getFilesystem())) return false; - if (!getMountPoint().equals(other.getMountPoint())) 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) + INSTANCE_IP_FIELD_NUMBER; - hash = (53 * hash) + getInstanceIp().hashCode(); - hash = (37 * hash) + VOLUME_HANDLE_FIELD_NUMBER; - hash = (53 * hash) + getVolumeHandle().hashCode(); - hash = (37 * hash) + FILESYSTEM_FIELD_NUMBER; - hash = (53 * hash) + getFilesystem().hashCode(); - hash = (37 * hash) + MOUNT_POINT_FIELD_NUMBER; - hash = (53 * hash) + getMountPoint().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LustreMount 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.vertexai.api.LustreMount parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LustreMount 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.vertexai.api.LustreMount parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LustreMount parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LustreMount parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.LustreMount parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.LustreMount 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents a mount configuration for Lustre file system.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.LustreMount} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.LustreMount) - com.google.cloud.vertexai.api.LustreMountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_LustreMount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_LustreMount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.LustreMount.class, - com.google.cloud.vertexai.api.LustreMount.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.LustreMount.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - instanceIp_ = ""; - volumeHandle_ = ""; - filesystem_ = ""; - mountPoint_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_LustreMount_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LustreMount getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.LustreMount.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LustreMount build() { - com.google.cloud.vertexai.api.LustreMount result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.LustreMount buildPartial() { - com.google.cloud.vertexai.api.LustreMount result = - new com.google.cloud.vertexai.api.LustreMount(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.LustreMount result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.instanceIp_ = instanceIp_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.volumeHandle_ = volumeHandle_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.filesystem_ = filesystem_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.mountPoint_ = mountPoint_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.LustreMount) { - return mergeFrom((com.google.cloud.vertexai.api.LustreMount) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.LustreMount other) { - if (other == com.google.cloud.vertexai.api.LustreMount.getDefaultInstance()) return this; - if (!other.getInstanceIp().isEmpty()) { - instanceIp_ = other.instanceIp_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getVolumeHandle().isEmpty()) { - volumeHandle_ = other.volumeHandle_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getFilesystem().isEmpty()) { - filesystem_ = other.filesystem_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getMountPoint().isEmpty()) { - mountPoint_ = other.mountPoint_; - 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: - { - instanceIp_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - volumeHandle_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - filesystem_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - mountPoint_ = 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 instanceIp_ = ""; - - /** - * - * - *
-     * Required. IP address of the Lustre instance.
-     * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The instanceIp. - */ - public java.lang.String getInstanceIp() { - java.lang.Object ref = instanceIp_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceIp_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. IP address of the Lustre instance.
-     * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for instanceIp. - */ - public com.google.protobuf.ByteString getInstanceIpBytes() { - java.lang.Object ref = instanceIp_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. IP address of the Lustre instance.
-     * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The instanceIp to set. - * @return This builder for chaining. - */ - public Builder setInstanceIp(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - instanceIp_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. IP address of the Lustre instance.
-     * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearInstanceIp() { - instanceIp_ = getDefaultInstance().getInstanceIp(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. IP address of the Lustre instance.
-     * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for instanceIp to set. - * @return This builder for chaining. - */ - public Builder setInstanceIpBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - instanceIp_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object volumeHandle_ = ""; - - /** - * - * - *
-     * Required. The unique identifier of the Lustre volume.
-     * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The volumeHandle. - */ - public java.lang.String getVolumeHandle() { - java.lang.Object ref = volumeHandle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - volumeHandle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The unique identifier of the Lustre volume.
-     * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for volumeHandle. - */ - public com.google.protobuf.ByteString getVolumeHandleBytes() { - java.lang.Object ref = volumeHandle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - volumeHandle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The unique identifier of the Lustre volume.
-     * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The volumeHandle to set. - * @return This builder for chaining. - */ - public Builder setVolumeHandle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - volumeHandle_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The unique identifier of the Lustre volume.
-     * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearVolumeHandle() { - volumeHandle_ = getDefaultInstance().getVolumeHandle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The unique identifier of the Lustre volume.
-     * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for volumeHandle to set. - * @return This builder for chaining. - */ - public Builder setVolumeHandleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - volumeHandle_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object filesystem_ = ""; - - /** - * - * - *
-     * Required. The name of the Lustre filesystem.
-     * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The filesystem. - */ - public java.lang.String getFilesystem() { - java.lang.Object ref = filesystem_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filesystem_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Lustre filesystem.
-     * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for filesystem. - */ - public com.google.protobuf.ByteString getFilesystemBytes() { - java.lang.Object ref = filesystem_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filesystem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Lustre filesystem.
-     * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The filesystem to set. - * @return This builder for chaining. - */ - public Builder setFilesystem(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filesystem_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Lustre filesystem.
-     * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFilesystem() { - filesystem_ = getDefaultInstance().getFilesystem(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Lustre filesystem.
-     * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for filesystem to set. - * @return This builder for chaining. - */ - public Builder setFilesystemBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filesystem_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object mountPoint_ = ""; - - /** - * - * - *
-     * Required. Destination mount path. The Lustre file system will be mounted
-     * for the user under /mnt/lustre/<mount_point>
-     * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - public java.lang.String getMountPoint() { - java.lang.Object ref = mountPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mountPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. Destination mount path. The Lustre file system will be mounted
-     * for the user under /mnt/lustre/<mount_point>
-     * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - public com.google.protobuf.ByteString getMountPointBytes() { - java.lang.Object ref = mountPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mountPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. Destination mount path. The Lustre file system will be mounted
-     * for the user under /mnt/lustre/<mount_point>
-     * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mountPoint to set. - * @return This builder for chaining. - */ - public Builder setMountPoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - mountPoint_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Destination mount path. The Lustre file system will be mounted
-     * for the user under /mnt/lustre/<mount_point>
-     * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMountPoint() { - mountPoint_ = getDefaultInstance().getMountPoint(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Destination mount path. The Lustre file system will be mounted
-     * for the user under /mnt/lustre/<mount_point>
-     * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mountPoint to set. - * @return This builder for chaining. - */ - public Builder setMountPointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - mountPoint_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.LustreMount) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.LustreMount) - private static final com.google.cloud.vertexai.api.LustreMount DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.LustreMount(); - } - - public static com.google.cloud.vertexai.api.LustreMount getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LustreMount 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.vertexai.api.LustreMount getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMountOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMountOrBuilder.java deleted file mode 100644 index 83be85ef80f8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LustreMountOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface LustreMountOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.LustreMount) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. IP address of the Lustre instance.
-   * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The instanceIp. - */ - java.lang.String getInstanceIp(); - - /** - * - * - *
-   * Required. IP address of the Lustre instance.
-   * 
- * - * string instance_ip = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for instanceIp. - */ - com.google.protobuf.ByteString getInstanceIpBytes(); - - /** - * - * - *
-   * Required. The unique identifier of the Lustre volume.
-   * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The volumeHandle. - */ - java.lang.String getVolumeHandle(); - - /** - * - * - *
-   * Required. The unique identifier of the Lustre volume.
-   * 
- * - * string volume_handle = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for volumeHandle. - */ - com.google.protobuf.ByteString getVolumeHandleBytes(); - - /** - * - * - *
-   * Required. The name of the Lustre filesystem.
-   * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The filesystem. - */ - java.lang.String getFilesystem(); - - /** - * - * - *
-   * Required. The name of the Lustre filesystem.
-   * 
- * - * string filesystem = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for filesystem. - */ - com.google.protobuf.ByteString getFilesystemBytes(); - - /** - * - * - *
-   * Required. Destination mount path. The Lustre file system will be mounted
-   * for the user under /mnt/lustre/<mount_point>
-   * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - java.lang.String getMountPoint(); - - /** - * - * - *
-   * Required. Destination mount path. The Lustre file system will be mounted
-   * for the user under /mnt/lustre/<mount_point>
-   * 
- * - * string mount_point = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - com.google.protobuf.ByteString getMountPointBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java deleted file mode 100644 index 0bb87a9f3a8e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class MachineResourcesProto extends com.google.protobuf.GeneratedFile { - private MachineResourcesProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MachineResourcesProto"); - } - - 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_vertexai_v1_MachineSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_MachineSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DedicatedResources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_AutomaticResources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ResourcesConsumed_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DiskSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_NfsMount_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_NfsMount_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_LustreMount_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_LustreMount_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_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" - + "0google/cloud/vertexai/v1/machine_resou" - + "rces.proto\022\030google.cloud.vertexai.v1\032\037go" - + "ogle/api/field_behavior.proto\032/google/cloud/vertexai/v1/accelerator_type.proto\0323" - + "google/cloud/vertexai/v1/reservation_affinity.proto\"\241\002\n" - + "\013MachineSpec\022\031\n" - + "\014machine_type\030\001 \001(\tB\003\340A\005\022H\n" - + "\020accelerator_type\030\002 \001(\016" - + "2).google.cloud.vertexai.v1.AcceleratorTypeB\003\340A\005\022\031\n" - + "\021accelerator_count\030\003 \001(\005\022\"\n" - + "\022gpu_partition_size\030\007 \001(\tB\006\340A\005\340A\001\022\031\n" - + "\014tpu_topology\030\004 \001(\tB\003\340A\005\022S\n" - + "\024reservation_affinity\030\005" - + " \001(\0132-.google.cloud.vertexai.v1.ReservationAffinityB\006\340A\005\340A\001\"\254\002\n" - + "\022DedicatedResources\022C\n" - + "\014machine_spec\030\001" - + " \001(\0132%.google.cloud.vertexai.v1.MachineSpecB\006\340A\002\340A\005\022!\n" - + "\021min_replica_count\030\002 \001(\005B\006\340A\002\340A\005\022\036\n" - + "\021max_replica_count\030\003 \001(\005B\003\340A\005\022#\n" - + "\026required_replica_count\030\t \001(\005B\003\340A\001\022V\n" - + "\030autoscaling_metric_specs\030\004" - + " \003(\0132/.google.cloud.vertexai.v1.AutoscalingMetricSpecB\003\340A\005\022\021\n" - + "\004spot\030\005 \001(\010B\003\340A\001\"T\n" - + "\022AutomaticResources\022\036\n" - + "\021min_replica_count\030\001 \001(\005B\003\340A\005\022\036\n" - + "\021max_replica_count\030\002 \001(\005B\003\340A\005\"\243\001\n" - + "\027BatchDedicatedResources\022C\n" - + "\014machine_spec\030\001" - + " \001(\0132%.google.cloud.vertexai.v1.MachineSpecB\006\340A\002\340A\005\022#\n" - + "\026starting_replica_count\030\002 \001(\005B\003\340A\005\022\036\n" - + "\021max_replica_count\030\003 \001(\005B\003\340A\005\"/\n" - + "\021ResourcesConsumed\022\032\n\r" - + "replica_hours\030\001 \001(\001B\003\340A\003\"=\n" - + "\010DiskSpec\022\026\n" - + "\016boot_disk_type\030\001 \001(\t\022\031\n" - + "\021boot_disk_size_gb\030\002 \001(\005\"=\n" - + "\022PersistentDiskSpec\022\021\n" - + "\tdisk_type\030\001 \001(\t\022\024\n" - + "\014disk_size_gb\030\002 \001(\003\"L\n" - + "\010NfsMount\022\023\n" - + "\006server\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004path\030\002 \001(\tB\003\340A\002\022\030\n" - + "\013mount_point\030\003 \001(\tB\003\340A\002\"v\n" - + "\013LustreMount\022\030\n" - + "\013instance_ip\030\001 \001(\tB\003\340A\002\022\032\n\r" - + "volume_handle\030\002 \001(\tB\003\340A\002\022\027\n\n" - + "filesystem\030\003 \001(\tB\003\340A\002\022\030\n" - + "\013mount_point\030\004 \001(\tB\003\340A\002\"A\n" - + "\025AutoscalingMetricSpec\022\030\n" - + "\013metric_name\030\001 \001(\tB\003\340A\002\022\016\n" - + "\006target\030\002 \001(\005\".\n" - + "\020ShieldedVmConfig\022\032\n" - + "\022enable_secure_boot\030\001 \001(\010B\322\001\n" - + "\035com.google.cloud.vertexai.apiB\025MachineResourcesPr" - + "otoP\001Z>cloud.google.com/go/aiplatform/ap" - + "iv1/aiplatformpb;aiplatformpb\252\002\032Google.C" - + "loud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlat" - + "form\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vertexai.api.AcceleratorTypeProto.getDescriptor(), - com.google.cloud.vertexai.api.ReservationAffinityProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_MachineSpec_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_MachineSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_MachineSpec_descriptor, - new java.lang.String[] { - "MachineType", - "AcceleratorType", - "AcceleratorCount", - "GpuPartitionSize", - "TpuTopology", - "ReservationAffinity", - }); - internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_DedicatedResources_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DedicatedResources_descriptor, - new java.lang.String[] { - "MachineSpec", - "MinReplicaCount", - "MaxReplicaCount", - "RequiredReplicaCount", - "AutoscalingMetricSpecs", - "Spot", - }); - internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_AutomaticResources_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_AutomaticResources_descriptor, - new java.lang.String[] { - "MinReplicaCount", "MaxReplicaCount", - }); - internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_BatchDedicatedResources_descriptor, - new java.lang.String[] { - "MachineSpec", "StartingReplicaCount", "MaxReplicaCount", - }); - internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_ResourcesConsumed_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor, - new java.lang.String[] { - "ReplicaHours", - }); - internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_DiskSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DiskSpec_descriptor, - new java.lang.String[] { - "BootDiskType", "BootDiskSizeGb", - }); - internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor, - new java.lang.String[] { - "DiskType", "DiskSizeGb", - }); - internal_static_google_cloud_vertexai_v1_NfsMount_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_NfsMount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_NfsMount_descriptor, - new java.lang.String[] { - "Server", "Path", "MountPoint", - }); - internal_static_google_cloud_vertexai_v1_LustreMount_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_LustreMount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_LustreMount_descriptor, - new java.lang.String[] { - "InstanceIp", "VolumeHandle", "Filesystem", "MountPoint", - }); - internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_AutoscalingMetricSpec_descriptor, - new java.lang.String[] { - "MetricName", "Target", - }); - internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor, - new java.lang.String[] { - "EnableSecureBoot", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vertexai.api.AcceleratorTypeProto.getDescriptor(); - com.google.cloud.vertexai.api.ReservationAffinityProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java deleted file mode 100644 index 1cd147c2a2dd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java +++ /dev/null @@ -1,1788 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specification of a single machine.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MachineSpec} - */ -@com.google.protobuf.Generated -public final class MachineSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.MachineSpec) - MachineSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MachineSpec"); - } - - // Use MachineSpec.newBuilder() to construct. - private MachineSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private MachineSpec() { - machineType_ = ""; - acceleratorType_ = 0; - gpuPartitionSize_ = ""; - tpuTopology_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_MachineSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_MachineSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MachineSpec.class, - com.google.cloud.vertexai.api.MachineSpec.Builder.class); - } - - private int bitField0_; - public static final int MACHINE_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object machineType_ = ""; - - /** - * - * - *
-   * Immutable. The type of the machine.
-   *
-   * See the [list of machine types supported for
-   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-   *
-   * See the [list of machine types supported for custom
-   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-   *
-   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-   * optional, and the default value is `n1-standard-2`. For
-   * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-   * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-   * field is required.
-   * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The machineType. - */ - @java.lang.Override - public java.lang.String getMachineType() { - java.lang.Object ref = machineType_; - 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(); - machineType_ = s; - return s; - } - } - - /** - * - * - *
-   * Immutable. The type of the machine.
-   *
-   * See the [list of machine types supported for
-   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-   *
-   * See the [list of machine types supported for custom
-   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-   *
-   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-   * optional, and the default value is `n1-standard-2`. For
-   * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-   * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-   * field is required.
-   * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for machineType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMachineTypeBytes() { - java.lang.Object ref = machineType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 2; - private int acceleratorType_ = 0; - - /** - * - * - *
-   * Immutable. The type of accelerator(s) that may be attached to the machine
-   * as per
-   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-   * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for acceleratorType. - */ - @java.lang.Override - public int getAcceleratorTypeValue() { - return acceleratorType_; - } - - /** - * - * - *
-   * Immutable. The type of accelerator(s) that may be attached to the machine
-   * as per
-   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-   * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The acceleratorType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AcceleratorType getAcceleratorType() { - com.google.cloud.vertexai.api.AcceleratorType result = - com.google.cloud.vertexai.api.AcceleratorType.forNumber(acceleratorType_); - return result == null ? com.google.cloud.vertexai.api.AcceleratorType.UNRECOGNIZED : result; - } - - public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 3; - private int acceleratorCount_ = 0; - - /** - * - * - *
-   * The number of accelerators to attach to the machine.
-   * 
- * - * int32 accelerator_count = 3; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public int getAcceleratorCount() { - return acceleratorCount_; - } - - public static final int GPU_PARTITION_SIZE_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object gpuPartitionSize_ = ""; - - /** - * - * - *
-   * Optional. Immutable. The Nvidia GPU partition size.
-   *
-   * When specified, the requested accelerators will be partitioned into
-   * smaller GPU partitions. For example, if the request is for 8 units of
-   * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-   * create 8 * 7 = 56 partitioned MIG instances.
-   *
-   * The partition size must be a value supported by the requested accelerator.
-   * Refer to
-   * [Nvidia GPU
-   * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-   * for the available partition sizes.
-   *
-   * If set, the accelerator_count should be set to 1.
-   * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gpuPartitionSize. - */ - @java.lang.Override - public java.lang.String getGpuPartitionSize() { - java.lang.Object ref = gpuPartitionSize_; - 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(); - gpuPartitionSize_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Immutable. The Nvidia GPU partition size.
-   *
-   * When specified, the requested accelerators will be partitioned into
-   * smaller GPU partitions. For example, if the request is for 8 units of
-   * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-   * create 8 * 7 = 56 partitioned MIG instances.
-   *
-   * The partition size must be a value supported by the requested accelerator.
-   * Refer to
-   * [Nvidia GPU
-   * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-   * for the available partition sizes.
-   *
-   * If set, the accelerator_count should be set to 1.
-   * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for gpuPartitionSize. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGpuPartitionSizeBytes() { - java.lang.Object ref = gpuPartitionSize_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gpuPartitionSize_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TPU_TOPOLOGY_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object tpuTopology_ = ""; - - /** - * - * - *
-   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-   * available from GKE. (Example: tpu_topology: "2x2x1").
-   * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The tpuTopology. - */ - @java.lang.Override - public java.lang.String getTpuTopology() { - java.lang.Object ref = tpuTopology_; - 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(); - tpuTopology_ = s; - return s; - } - } - - /** - * - * - *
-   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-   * available from GKE. (Example: tpu_topology: "2x2x1").
-   * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for tpuTopology. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTpuTopologyBytes() { - java.lang.Object ref = tpuTopology_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tpuTopology_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.ReservationAffinity reservationAffinity_; - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - @java.lang.Override - public boolean hasReservationAffinity() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity getReservationAffinity() { - return reservationAffinity_ == null - ? com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - return reservationAffinity_ == null - ? com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - - 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.GeneratedMessage.isStringEmpty(machineType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, machineType_); - } - if (acceleratorType_ - != com.google.cloud.vertexai.api.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, acceleratorType_); - } - if (acceleratorCount_ != 0) { - output.writeInt32(3, acceleratorCount_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tpuTopology_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, tpuTopology_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getReservationAffinity()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gpuPartitionSize_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, gpuPartitionSize_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(machineType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, machineType_); - } - if (acceleratorType_ - != com.google.cloud.vertexai.api.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, acceleratorType_); - } - if (acceleratorCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, acceleratorCount_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tpuTopology_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, tpuTopology_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReservationAffinity()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gpuPartitionSize_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, gpuPartitionSize_); - } - 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.vertexai.api.MachineSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.MachineSpec other = - (com.google.cloud.vertexai.api.MachineSpec) obj; - - if (!getMachineType().equals(other.getMachineType())) return false; - if (acceleratorType_ != other.acceleratorType_) return false; - if (getAcceleratorCount() != other.getAcceleratorCount()) return false; - if (!getGpuPartitionSize().equals(other.getGpuPartitionSize())) return false; - if (!getTpuTopology().equals(other.getTpuTopology())) return false; - if (hasReservationAffinity() != other.hasReservationAffinity()) return false; - if (hasReservationAffinity()) { - if (!getReservationAffinity().equals(other.getReservationAffinity())) 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) + MACHINE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMachineType().hashCode(); - hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; - hash = (53 * hash) + acceleratorType_; - hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorCount(); - hash = (37 * hash) + GPU_PARTITION_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getGpuPartitionSize().hashCode(); - hash = (37 * hash) + TPU_TOPOLOGY_FIELD_NUMBER; - hash = (53 * hash) + getTpuTopology().hashCode(); - if (hasReservationAffinity()) { - hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER; - hash = (53 * hash) + getReservationAffinity().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MachineSpec 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.vertexai.api.MachineSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MachineSpec 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.vertexai.api.MachineSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MachineSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.MachineSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specification of a single machine.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MachineSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.MachineSpec) - com.google.cloud.vertexai.api.MachineSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_MachineSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_MachineSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MachineSpec.class, - com.google.cloud.vertexai.api.MachineSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.MachineSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetReservationAffinityFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - machineType_ = ""; - acceleratorType_ = 0; - acceleratorCount_ = 0; - gpuPartitionSize_ = ""; - tpuTopology_ = ""; - reservationAffinity_ = null; - if (reservationAffinityBuilder_ != null) { - reservationAffinityBuilder_.dispose(); - reservationAffinityBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_MachineSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpec build() { - com.google.cloud.vertexai.api.MachineSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MachineSpec buildPartial() { - com.google.cloud.vertexai.api.MachineSpec result = - new com.google.cloud.vertexai.api.MachineSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.MachineSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.machineType_ = machineType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.acceleratorType_ = acceleratorType_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.acceleratorCount_ = acceleratorCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gpuPartitionSize_ = gpuPartitionSize_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.tpuTopology_ = tpuTopology_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.reservationAffinity_ = - reservationAffinityBuilder_ == null - ? reservationAffinity_ - : reservationAffinityBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.MachineSpec) { - return mergeFrom((com.google.cloud.vertexai.api.MachineSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.MachineSpec other) { - if (other == com.google.cloud.vertexai.api.MachineSpec.getDefaultInstance()) return this; - if (!other.getMachineType().isEmpty()) { - machineType_ = other.machineType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.acceleratorType_ != 0) { - setAcceleratorTypeValue(other.getAcceleratorTypeValue()); - } - if (other.getAcceleratorCount() != 0) { - setAcceleratorCount(other.getAcceleratorCount()); - } - if (!other.getGpuPartitionSize().isEmpty()) { - gpuPartitionSize_ = other.gpuPartitionSize_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getTpuTopology().isEmpty()) { - tpuTopology_ = other.tpuTopology_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasReservationAffinity()) { - mergeReservationAffinity(other.getReservationAffinity()); - } - 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: - { - machineType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - acceleratorType_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - acceleratorCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - tpuTopology_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetReservationAffinityFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 58: - { - gpuPartitionSize_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - 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 machineType_ = ""; - - /** - * - * - *
-     * Immutable. The type of the machine.
-     *
-     * See the [list of machine types supported for
-     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-     *
-     * See the [list of machine types supported for custom
-     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-     *
-     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-     * optional, and the default value is `n1-standard-2`. For
-     * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-     * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-     * field is required.
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The machineType. - */ - public java.lang.String getMachineType() { - java.lang.Object ref = machineType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - machineType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Immutable. The type of the machine.
-     *
-     * See the [list of machine types supported for
-     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-     *
-     * See the [list of machine types supported for custom
-     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-     *
-     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-     * optional, and the default value is `n1-standard-2`. For
-     * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-     * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-     * field is required.
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for machineType. - */ - public com.google.protobuf.ByteString getMachineTypeBytes() { - java.lang.Object ref = machineType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Immutable. The type of the machine.
-     *
-     * See the [list of machine types supported for
-     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-     *
-     * See the [list of machine types supported for custom
-     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-     *
-     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-     * optional, and the default value is `n1-standard-2`. For
-     * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-     * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-     * field is required.
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The machineType to set. - * @return This builder for chaining. - */ - public Builder setMachineType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - machineType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The type of the machine.
-     *
-     * See the [list of machine types supported for
-     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-     *
-     * See the [list of machine types supported for custom
-     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-     *
-     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-     * optional, and the default value is `n1-standard-2`. For
-     * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-     * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-     * field is required.
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearMachineType() { - machineType_ = getDefaultInstance().getMachineType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The type of the machine.
-     *
-     * See the [list of machine types supported for
-     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-     *
-     * See the [list of machine types supported for custom
-     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-     *
-     * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-     * optional, and the default value is `n1-standard-2`. For
-     * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-     * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-     * field is required.
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for machineType to set. - * @return This builder for chaining. - */ - public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - machineType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int acceleratorType_ = 0; - - /** - * - * - *
-     * Immutable. The type of accelerator(s) that may be attached to the machine
-     * as per
-     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-     * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for acceleratorType. - */ - @java.lang.Override - public int getAcceleratorTypeValue() { - return acceleratorType_; - } - - /** - * - * - *
-     * Immutable. The type of accelerator(s) that may be attached to the machine
-     * as per
-     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-     * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The enum numeric value on the wire for acceleratorType to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorTypeValue(int value) { - acceleratorType_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The type of accelerator(s) that may be attached to the machine
-     * as per
-     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-     * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The acceleratorType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AcceleratorType getAcceleratorType() { - com.google.cloud.vertexai.api.AcceleratorType result = - com.google.cloud.vertexai.api.AcceleratorType.forNumber(acceleratorType_); - return result == null ? com.google.cloud.vertexai.api.AcceleratorType.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Immutable. The type of accelerator(s) that may be attached to the machine
-     * as per
-     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-     * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @param value The acceleratorType to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorType(com.google.cloud.vertexai.api.AcceleratorType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - acceleratorType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The type of accelerator(s) that may be attached to the machine
-     * as per
-     * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-     * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorType() { - bitField0_ = (bitField0_ & ~0x00000002); - acceleratorType_ = 0; - onChanged(); - return this; - } - - private int acceleratorCount_; - - /** - * - * - *
-     * The number of accelerators to attach to the machine.
-     * 
- * - * int32 accelerator_count = 3; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public int getAcceleratorCount() { - return acceleratorCount_; - } - - /** - * - * - *
-     * The number of accelerators to attach to the machine.
-     * 
- * - * int32 accelerator_count = 3; - * - * @param value The acceleratorCount to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorCount(int value) { - - acceleratorCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of accelerators to attach to the machine.
-     * 
- * - * int32 accelerator_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorCount() { - bitField0_ = (bitField0_ & ~0x00000004); - acceleratorCount_ = 0; - onChanged(); - return this; - } - - private java.lang.Object gpuPartitionSize_ = ""; - - /** - * - * - *
-     * Optional. Immutable. The Nvidia GPU partition size.
-     *
-     * When specified, the requested accelerators will be partitioned into
-     * smaller GPU partitions. For example, if the request is for 8 units of
-     * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-     * create 8 * 7 = 56 partitioned MIG instances.
-     *
-     * The partition size must be a value supported by the requested accelerator.
-     * Refer to
-     * [Nvidia GPU
-     * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-     * for the available partition sizes.
-     *
-     * If set, the accelerator_count should be set to 1.
-     * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gpuPartitionSize. - */ - public java.lang.String getGpuPartitionSize() { - java.lang.Object ref = gpuPartitionSize_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gpuPartitionSize_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Immutable. The Nvidia GPU partition size.
-     *
-     * When specified, the requested accelerators will be partitioned into
-     * smaller GPU partitions. For example, if the request is for 8 units of
-     * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-     * create 8 * 7 = 56 partitioned MIG instances.
-     *
-     * The partition size must be a value supported by the requested accelerator.
-     * Refer to
-     * [Nvidia GPU
-     * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-     * for the available partition sizes.
-     *
-     * If set, the accelerator_count should be set to 1.
-     * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for gpuPartitionSize. - */ - public com.google.protobuf.ByteString getGpuPartitionSizeBytes() { - java.lang.Object ref = gpuPartitionSize_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gpuPartitionSize_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Immutable. The Nvidia GPU partition size.
-     *
-     * When specified, the requested accelerators will be partitioned into
-     * smaller GPU partitions. For example, if the request is for 8 units of
-     * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-     * create 8 * 7 = 56 partitioned MIG instances.
-     *
-     * The partition size must be a value supported by the requested accelerator.
-     * Refer to
-     * [Nvidia GPU
-     * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-     * for the available partition sizes.
-     *
-     * If set, the accelerator_count should be set to 1.
-     * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The gpuPartitionSize to set. - * @return This builder for chaining. - */ - public Builder setGpuPartitionSize(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - gpuPartitionSize_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The Nvidia GPU partition size.
-     *
-     * When specified, the requested accelerators will be partitioned into
-     * smaller GPU partitions. For example, if the request is for 8 units of
-     * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-     * create 8 * 7 = 56 partitioned MIG instances.
-     *
-     * The partition size must be a value supported by the requested accelerator.
-     * Refer to
-     * [Nvidia GPU
-     * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-     * for the available partition sizes.
-     *
-     * If set, the accelerator_count should be set to 1.
-     * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearGpuPartitionSize() { - gpuPartitionSize_ = getDefaultInstance().getGpuPartitionSize(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The Nvidia GPU partition size.
-     *
-     * When specified, the requested accelerators will be partitioned into
-     * smaller GPU partitions. For example, if the request is for 8 units of
-     * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-     * create 8 * 7 = 56 partitioned MIG instances.
-     *
-     * The partition size must be a value supported by the requested accelerator.
-     * Refer to
-     * [Nvidia GPU
-     * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-     * for the available partition sizes.
-     *
-     * If set, the accelerator_count should be set to 1.
-     * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for gpuPartitionSize to set. - * @return This builder for chaining. - */ - public Builder setGpuPartitionSizeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - gpuPartitionSize_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object tpuTopology_ = ""; - - /** - * - * - *
-     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-     * available from GKE. (Example: tpu_topology: "2x2x1").
-     * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The tpuTopology. - */ - public java.lang.String getTpuTopology() { - java.lang.Object ref = tpuTopology_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tpuTopology_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-     * available from GKE. (Example: tpu_topology: "2x2x1").
-     * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for tpuTopology. - */ - public com.google.protobuf.ByteString getTpuTopologyBytes() { - java.lang.Object ref = tpuTopology_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tpuTopology_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-     * available from GKE. (Example: tpu_topology: "2x2x1").
-     * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The tpuTopology to set. - * @return This builder for chaining. - */ - public Builder setTpuTopology(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tpuTopology_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-     * available from GKE. (Example: tpu_topology: "2x2x1").
-     * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearTpuTopology() { - tpuTopology_ = getDefaultInstance().getTpuTopology(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-     * available from GKE. (Example: tpu_topology: "2x2x1").
-     * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for tpuTopology to set. - * @return This builder for chaining. - */ - public Builder setTpuTopologyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tpuTopology_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.ReservationAffinity reservationAffinity_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReservationAffinity, - com.google.cloud.vertexai.api.ReservationAffinity.Builder, - com.google.cloud.vertexai.api.ReservationAffinityOrBuilder> - reservationAffinityBuilder_; - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - public boolean hasReservationAffinity() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - public com.google.cloud.vertexai.api.ReservationAffinity getReservationAffinity() { - if (reservationAffinityBuilder_ == null) { - return reservationAffinity_ == null - ? com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } else { - return reservationAffinityBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity(com.google.cloud.vertexai.api.ReservationAffinity value) { - if (reservationAffinityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservationAffinity_ = value; - } else { - reservationAffinityBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity( - com.google.cloud.vertexai.api.ReservationAffinity.Builder builderForValue) { - if (reservationAffinityBuilder_ == null) { - reservationAffinity_ = builderForValue.build(); - } else { - reservationAffinityBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReservationAffinity( - com.google.cloud.vertexai.api.ReservationAffinity value) { - if (reservationAffinityBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && reservationAffinity_ != null - && reservationAffinity_ - != com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance()) { - getReservationAffinityBuilder().mergeFrom(value); - } else { - reservationAffinity_ = value; - } - } else { - reservationAffinityBuilder_.mergeFrom(value); - } - if (reservationAffinity_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearReservationAffinity() { - bitField0_ = (bitField0_ & ~0x00000020); - reservationAffinity_ = null; - if (reservationAffinityBuilder_ != null) { - reservationAffinityBuilder_.dispose(); - reservationAffinityBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ReservationAffinity.Builder - getReservationAffinityBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetReservationAffinityFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - if (reservationAffinityBuilder_ != null) { - return reservationAffinityBuilder_.getMessageOrBuilder(); - } else { - return reservationAffinity_ == null - ? com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - } - - /** - * - * - *
-     * Optional. Immutable. Configuration controlling how this resource pool
-     * consumes reservation.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReservationAffinity, - com.google.cloud.vertexai.api.ReservationAffinity.Builder, - com.google.cloud.vertexai.api.ReservationAffinityOrBuilder> - internalGetReservationAffinityFieldBuilder() { - if (reservationAffinityBuilder_ == null) { - reservationAffinityBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReservationAffinity, - com.google.cloud.vertexai.api.ReservationAffinity.Builder, - com.google.cloud.vertexai.api.ReservationAffinityOrBuilder>( - getReservationAffinity(), getParentForChildren(), isClean()); - reservationAffinity_ = null; - } - return reservationAffinityBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.MachineSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.MachineSpec) - private static final com.google.cloud.vertexai.api.MachineSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.MachineSpec(); - } - - public static com.google.cloud.vertexai.api.MachineSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MachineSpec 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.vertexai.api.MachineSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java deleted file mode 100644 index 4c2d3cff0008..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface MachineSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.MachineSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. The type of the machine.
-   *
-   * See the [list of machine types supported for
-   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-   *
-   * See the [list of machine types supported for custom
-   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-   *
-   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-   * optional, and the default value is `n1-standard-2`. For
-   * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-   * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-   * field is required.
-   * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The machineType. - */ - java.lang.String getMachineType(); - - /** - * - * - *
-   * Immutable. The type of the machine.
-   *
-   * See the [list of machine types supported for
-   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
-   *
-   * See the [list of machine types supported for custom
-   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
-   *
-   * For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
-   * optional, and the default value is `n1-standard-2`. For
-   * [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
-   * part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
-   * field is required.
-   * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for machineType. - */ - com.google.protobuf.ByteString getMachineTypeBytes(); - - /** - * - * - *
-   * Immutable. The type of accelerator(s) that may be attached to the machine
-   * as per
-   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-   * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for acceleratorType. - */ - int getAcceleratorTypeValue(); - - /** - * - * - *
-   * Immutable. The type of accelerator(s) that may be attached to the machine
-   * as per
-   * [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
-   * 
- * - * - * .google.cloud.vertexai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The acceleratorType. - */ - com.google.cloud.vertexai.api.AcceleratorType getAcceleratorType(); - - /** - * - * - *
-   * The number of accelerators to attach to the machine.
-   * 
- * - * int32 accelerator_count = 3; - * - * @return The acceleratorCount. - */ - int getAcceleratorCount(); - - /** - * - * - *
-   * Optional. Immutable. The Nvidia GPU partition size.
-   *
-   * When specified, the requested accelerators will be partitioned into
-   * smaller GPU partitions. For example, if the request is for 8 units of
-   * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-   * create 8 * 7 = 56 partitioned MIG instances.
-   *
-   * The partition size must be a value supported by the requested accelerator.
-   * Refer to
-   * [Nvidia GPU
-   * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-   * for the available partition sizes.
-   *
-   * If set, the accelerator_count should be set to 1.
-   * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gpuPartitionSize. - */ - java.lang.String getGpuPartitionSize(); - - /** - * - * - *
-   * Optional. Immutable. The Nvidia GPU partition size.
-   *
-   * When specified, the requested accelerators will be partitioned into
-   * smaller GPU partitions. For example, if the request is for 8 units of
-   * NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will
-   * create 8 * 7 = 56 partitioned MIG instances.
-   *
-   * The partition size must be a value supported by the requested accelerator.
-   * Refer to
-   * [Nvidia GPU
-   * Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions)
-   * for the available partition sizes.
-   *
-   * If set, the accelerator_count should be set to 1.
-   * 
- * - * - * string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for gpuPartitionSize. - */ - com.google.protobuf.ByteString getGpuPartitionSizeBytes(); - - /** - * - * - *
-   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-   * available from GKE. (Example: tpu_topology: "2x2x1").
-   * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The tpuTopology. - */ - java.lang.String getTpuTopology(); - - /** - * - * - *
-   * Immutable. The topology of the TPUs. Corresponds to the TPU topologies
-   * available from GKE. (Example: tpu_topology: "2x2x1").
-   * 
- * - * string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for tpuTopology. - */ - com.google.protobuf.ByteString getTpuTopologyBytes(); - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - boolean hasReservationAffinity(); - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - com.google.cloud.vertexai.api.ReservationAffinity getReservationAffinity(); - - /** - * - * - *
-   * Optional. Immutable. Configuration controlling how this resource pool
-   * consumes reservation.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ReservationAffinityOrBuilder getReservationAffinityOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Modality.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Modality.java deleted file mode 100644 index a4dc91122f07..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Modality.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Content Part modality
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Modality} - */ -@com.google.protobuf.Generated -public enum Modality implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Unspecified modality.
-   * 
- * - * MODALITY_UNSPECIFIED = 0; - */ - MODALITY_UNSPECIFIED(0), - /** - * - * - *
-   * Plain text.
-   * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - * - * - *
-   * Image.
-   * 
- * - * IMAGE = 2; - */ - IMAGE(2), - /** - * - * - *
-   * Video.
-   * 
- * - * VIDEO = 3; - */ - VIDEO(3), - /** - * - * - *
-   * Audio.
-   * 
- * - * AUDIO = 4; - */ - AUDIO(4), - /** - * - * - *
-   * Document, e.g. PDF.
-   * 
- * - * DOCUMENT = 5; - */ - DOCUMENT(5), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Modality"); - } - - /** - * - * - *
-   * Unspecified modality.
-   * 
- * - * MODALITY_UNSPECIFIED = 0; - */ - public static final int MODALITY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * Plain text.
-   * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - - /** - * - * - *
-   * Image.
-   * 
- * - * IMAGE = 2; - */ - public static final int IMAGE_VALUE = 2; - - /** - * - * - *
-   * Video.
-   * 
- * - * VIDEO = 3; - */ - public static final int VIDEO_VALUE = 3; - - /** - * - * - *
-   * Audio.
-   * 
- * - * AUDIO = 4; - */ - public static final int AUDIO_VALUE = 4; - - /** - * - * - *
-   * Document, e.g. PDF.
-   * 
- * - * DOCUMENT = 5; - */ - public static final int DOCUMENT_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 Modality 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 Modality forNumber(int value) { - switch (value) { - case 0: - return MODALITY_UNSPECIFIED; - case 1: - return TEXT; - case 2: - return IMAGE; - case 3: - return VIDEO; - case 4: - return AUDIO; - case 5: - return DOCUMENT; - 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 Modality findValueByNumber(int number) { - return Modality.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto.getDescriptor().getEnumTypes().get(1); - } - - private static final Modality[] VALUES = values(); - - public static Modality 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 Modality(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Modality) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCount.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCount.java deleted file mode 100644 index 98f25d4e42b8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCount.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents token counting info for a single modality.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModalityTokenCount} - */ -@com.google.protobuf.Generated -public final class ModalityTokenCount extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ModalityTokenCount) - ModalityTokenCountOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ModalityTokenCount"); - } - - // Use ModalityTokenCount.newBuilder() to construct. - private ModalityTokenCount(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ModalityTokenCount() { - modality_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModalityTokenCount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModalityTokenCount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModalityTokenCount.class, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder.class); - } - - public static final int MODALITY_FIELD_NUMBER = 1; - private int modality_ = 0; - - /** - * - * - *
-   * The modality associated with this token count.
-   * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The enum numeric value on the wire for modality. - */ - @java.lang.Override - public int getModalityValue() { - return modality_; - } - - /** - * - * - *
-   * The modality associated with this token count.
-   * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The modality. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Modality getModality() { - com.google.cloud.vertexai.api.Modality result = - com.google.cloud.vertexai.api.Modality.forNumber(modality_); - return result == null ? com.google.cloud.vertexai.api.Modality.UNRECOGNIZED : result; - } - - public static final int TOKEN_COUNT_FIELD_NUMBER = 2; - private int tokenCount_ = 0; - - /** - * - * - *
-   * Number of tokens.
-   * 
- * - * int32 token_count = 2; - * - * @return The tokenCount. - */ - @java.lang.Override - public int getTokenCount() { - return tokenCount_; - } - - 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 (modality_ != com.google.cloud.vertexai.api.Modality.MODALITY_UNSPECIFIED.getNumber()) { - output.writeEnum(1, modality_); - } - if (tokenCount_ != 0) { - output.writeInt32(2, tokenCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (modality_ != com.google.cloud.vertexai.api.Modality.MODALITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modality_); - } - if (tokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, tokenCount_); - } - 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.vertexai.api.ModalityTokenCount)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ModalityTokenCount other = - (com.google.cloud.vertexai.api.ModalityTokenCount) obj; - - if (modality_ != other.modality_) return false; - if (getTokenCount() != other.getTokenCount()) 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) + MODALITY_FIELD_NUMBER; - hash = (53 * hash) + modality_; - hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getTokenCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount 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.vertexai.api.ModalityTokenCount parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount 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.vertexai.api.ModalityTokenCount parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ModalityTokenCount 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents token counting info for a single modality.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModalityTokenCount} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ModalityTokenCount) - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModalityTokenCount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModalityTokenCount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModalityTokenCount.class, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ModalityTokenCount.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modality_ = 0; - tokenCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModalityTokenCount_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount build() { - com.google.cloud.vertexai.api.ModalityTokenCount result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount buildPartial() { - com.google.cloud.vertexai.api.ModalityTokenCount result = - new com.google.cloud.vertexai.api.ModalityTokenCount(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ModalityTokenCount result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modality_ = modality_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.tokenCount_ = tokenCount_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ModalityTokenCount) { - return mergeFrom((com.google.cloud.vertexai.api.ModalityTokenCount) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ModalityTokenCount other) { - if (other == com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()) - return this; - if (other.modality_ != 0) { - setModalityValue(other.getModalityValue()); - } - if (other.getTokenCount() != 0) { - setTokenCount(other.getTokenCount()); - } - 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: - { - modality_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - tokenCount_ = 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 modality_ = 0; - - /** - * - * - *
-     * The modality associated with this token count.
-     * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The enum numeric value on the wire for modality. - */ - @java.lang.Override - public int getModalityValue() { - return modality_; - } - - /** - * - * - *
-     * The modality associated with this token count.
-     * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @param value The enum numeric value on the wire for modality to set. - * @return This builder for chaining. - */ - public Builder setModalityValue(int value) { - modality_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The modality associated with this token count.
-     * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The modality. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Modality getModality() { - com.google.cloud.vertexai.api.Modality result = - com.google.cloud.vertexai.api.Modality.forNumber(modality_); - return result == null ? com.google.cloud.vertexai.api.Modality.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * The modality associated with this token count.
-     * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @param value The modality to set. - * @return This builder for chaining. - */ - public Builder setModality(com.google.cloud.vertexai.api.Modality value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - modality_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * The modality associated with this token count.
-     * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return This builder for chaining. - */ - public Builder clearModality() { - bitField0_ = (bitField0_ & ~0x00000001); - modality_ = 0; - onChanged(); - return this; - } - - private int tokenCount_; - - /** - * - * - *
-     * Number of tokens.
-     * 
- * - * int32 token_count = 2; - * - * @return The tokenCount. - */ - @java.lang.Override - public int getTokenCount() { - return tokenCount_; - } - - /** - * - * - *
-     * Number of tokens.
-     * 
- * - * int32 token_count = 2; - * - * @param value The tokenCount to set. - * @return This builder for chaining. - */ - public Builder setTokenCount(int value) { - - tokenCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Number of tokens.
-     * 
- * - * int32 token_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearTokenCount() { - bitField0_ = (bitField0_ & ~0x00000002); - tokenCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ModalityTokenCount) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ModalityTokenCount) - private static final com.google.cloud.vertexai.api.ModalityTokenCount DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ModalityTokenCount(); - } - - public static com.google.cloud.vertexai.api.ModalityTokenCount getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModalityTokenCount 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.vertexai.api.ModalityTokenCount getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCountOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCountOrBuilder.java deleted file mode 100644 index 09d5b62d0005..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModalityTokenCountOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ModalityTokenCountOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ModalityTokenCount) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The modality associated with this token count.
-   * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The enum numeric value on the wire for modality. - */ - int getModalityValue(); - - /** - * - * - *
-   * The modality associated with this token count.
-   * 
- * - * .google.cloud.vertexai.v1.Modality modality = 1; - * - * @return The modality. - */ - com.google.cloud.vertexai.api.Modality getModality(); - - /** - * - * - *
-   * Number of tokens.
-   * 
- * - * int32 token_count = 2; - * - * @return The tokenCount. - */ - int getTokenCount(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfig.java deleted file mode 100644 index 8f94f158d277..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfig.java +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for Model Armor integrations of prompt and responses.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModelArmorConfig} - */ -@com.google.protobuf.Generated -public final class ModelArmorConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ModelArmorConfig) - ModelArmorConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ModelArmorConfig"); - } - - // Use ModelArmorConfig.newBuilder() to construct. - private ModelArmorConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ModelArmorConfig() { - promptTemplateName_ = ""; - responseTemplateName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModelArmorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModelArmorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModelArmorConfig.class, - com.google.cloud.vertexai.api.ModelArmorConfig.Builder.class); - } - - public static final int PROMPT_TEMPLATE_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object promptTemplateName_ = ""; - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for prompt
-   * sanitization.
-   * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The promptTemplateName. - */ - @java.lang.Override - public java.lang.String getPromptTemplateName() { - java.lang.Object ref = promptTemplateName_; - 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(); - promptTemplateName_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for prompt
-   * sanitization.
-   * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for promptTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPromptTemplateNameBytes() { - java.lang.Object ref = promptTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - promptTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESPONSE_TEMPLATE_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object responseTemplateName_ = ""; - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for response
-   * sanitization.
-   * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The responseTemplateName. - */ - @java.lang.Override - public java.lang.String getResponseTemplateName() { - java.lang.Object ref = responseTemplateName_; - 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(); - responseTemplateName_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for response
-   * sanitization.
-   * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for responseTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getResponseTemplateNameBytes() { - java.lang.Object ref = responseTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseTemplateName_ = 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.GeneratedMessage.isStringEmpty(promptTemplateName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, promptTemplateName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplateName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, responseTemplateName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(promptTemplateName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, promptTemplateName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplateName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, responseTemplateName_); - } - 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.vertexai.api.ModelArmorConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ModelArmorConfig other = - (com.google.cloud.vertexai.api.ModelArmorConfig) obj; - - if (!getPromptTemplateName().equals(other.getPromptTemplateName())) return false; - if (!getResponseTemplateName().equals(other.getResponseTemplateName())) 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) + PROMPT_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getPromptTemplateName().hashCode(); - hash = (37 * hash) + RESPONSE_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResponseTemplateName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig 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.vertexai.api.ModelArmorConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig 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.vertexai.api.ModelArmorConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ModelArmorConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for Model Armor integrations of prompt and responses.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModelArmorConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ModelArmorConfig) - com.google.cloud.vertexai.api.ModelArmorConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModelArmorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModelArmorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModelArmorConfig.class, - com.google.cloud.vertexai.api.ModelArmorConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ModelArmorConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - promptTemplateName_ = ""; - responseTemplateName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ModelArmorConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelArmorConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelArmorConfig build() { - com.google.cloud.vertexai.api.ModelArmorConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelArmorConfig buildPartial() { - com.google.cloud.vertexai.api.ModelArmorConfig result = - new com.google.cloud.vertexai.api.ModelArmorConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ModelArmorConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.promptTemplateName_ = promptTemplateName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.responseTemplateName_ = responseTemplateName_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ModelArmorConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ModelArmorConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ModelArmorConfig other) { - if (other == com.google.cloud.vertexai.api.ModelArmorConfig.getDefaultInstance()) return this; - if (!other.getPromptTemplateName().isEmpty()) { - promptTemplateName_ = other.promptTemplateName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getResponseTemplateName().isEmpty()) { - responseTemplateName_ = other.responseTemplateName_; - 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: - { - promptTemplateName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - responseTemplateName_ = 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 promptTemplateName_ = ""; - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for prompt
-     * sanitization.
-     * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The promptTemplateName. - */ - public java.lang.String getPromptTemplateName() { - java.lang.Object ref = promptTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - promptTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for prompt
-     * sanitization.
-     * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for promptTemplateName. - */ - public com.google.protobuf.ByteString getPromptTemplateNameBytes() { - java.lang.Object ref = promptTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - promptTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for prompt
-     * sanitization.
-     * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The promptTemplateName to set. - * @return This builder for chaining. - */ - public Builder setPromptTemplateName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - promptTemplateName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for prompt
-     * sanitization.
-     * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearPromptTemplateName() { - promptTemplateName_ = getDefaultInstance().getPromptTemplateName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for prompt
-     * sanitization.
-     * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for promptTemplateName to set. - * @return This builder for chaining. - */ - public Builder setPromptTemplateNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - promptTemplateName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object responseTemplateName_ = ""; - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for response
-     * sanitization.
-     * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The responseTemplateName. - */ - public java.lang.String getResponseTemplateName() { - java.lang.Object ref = responseTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - responseTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for response
-     * sanitization.
-     * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for responseTemplateName. - */ - public com.google.protobuf.ByteString getResponseTemplateNameBytes() { - java.lang.Object ref = responseTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - responseTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for response
-     * sanitization.
-     * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The responseTemplateName to set. - * @return This builder for chaining. - */ - public Builder setResponseTemplateName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - responseTemplateName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for response
-     * sanitization.
-     * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearResponseTemplateName() { - responseTemplateName_ = getDefaultInstance().getResponseTemplateName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Model Armor template to use for response
-     * sanitization.
-     * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for responseTemplateName to set. - * @return This builder for chaining. - */ - public Builder setResponseTemplateNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - responseTemplateName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ModelArmorConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ModelArmorConfig) - private static final com.google.cloud.vertexai.api.ModelArmorConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ModelArmorConfig(); - } - - public static com.google.cloud.vertexai.api.ModelArmorConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelArmorConfig 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.vertexai.api.ModelArmorConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfigOrBuilder.java deleted file mode 100644 index 50fb51532970..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelArmorConfigOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ModelArmorConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ModelArmorConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for prompt
-   * sanitization.
-   * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The promptTemplateName. - */ - java.lang.String getPromptTemplateName(); - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for prompt
-   * sanitization.
-   * 
- * - * - * string prompt_template_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for promptTemplateName. - */ - com.google.protobuf.ByteString getPromptTemplateNameBytes(); - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for response
-   * sanitization.
-   * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The responseTemplateName. - */ - java.lang.String getResponseTemplateName(); - - /** - * - * - *
-   * Optional. The name of the Model Armor template to use for response
-   * sanitization.
-   * 
- * - * - * string response_template_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for responseTemplateName. - */ - com.google.protobuf.ByteString getResponseTemplateNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java deleted file mode 100644 index f892c53b24db..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java +++ /dev/null @@ -1,1456 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Aggregated explanation metrics for a Model over a set of instances.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModelExplanation} - */ -@com.google.protobuf.Generated -public final class ModelExplanation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ModelExplanation) - ModelExplanationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ModelExplanation"); - } - - // Use ModelExplanation.newBuilder() to construct. - private ModelExplanation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ModelExplanation() { - meanAttributions_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ModelExplanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModelExplanation.class, - com.google.cloud.vertexai.api.ModelExplanation.Builder.class); - } - - public static final int MEAN_ATTRIBUTIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List meanAttributions_; - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getMeanAttributionsList() { - return meanAttributions_; - } - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getMeanAttributionsOrBuilderList() { - return meanAttributions_; - } - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getMeanAttributionsCount() { - return meanAttributions_.size(); - } - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Attribution getMeanAttributions(int index) { - return meanAttributions_.get(index); - } - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.AttributionOrBuilder getMeanAttributionsOrBuilder( - int index) { - return meanAttributions_.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 < meanAttributions_.size(); i++) { - output.writeMessage(1, meanAttributions_.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 < meanAttributions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, meanAttributions_.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.vertexai.api.ModelExplanation)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ModelExplanation other = - (com.google.cloud.vertexai.api.ModelExplanation) obj; - - if (!getMeanAttributionsList().equals(other.getMeanAttributionsList())) 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 (getMeanAttributionsCount() > 0) { - hash = (37 * hash) + MEAN_ATTRIBUTIONS_FIELD_NUMBER; - hash = (53 * hash) + getMeanAttributionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelExplanation 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.vertexai.api.ModelExplanation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelExplanation 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.vertexai.api.ModelExplanation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ModelExplanation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ModelExplanation 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Aggregated explanation metrics for a Model over a set of instances.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ModelExplanation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ModelExplanation) - com.google.cloud.vertexai.api.ModelExplanationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ModelExplanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ModelExplanation.class, - com.google.cloud.vertexai.api.ModelExplanation.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ModelExplanation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (meanAttributionsBuilder_ == null) { - meanAttributions_ = java.util.Collections.emptyList(); - } else { - meanAttributions_ = null; - meanAttributionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_ModelExplanation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelExplanation getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ModelExplanation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelExplanation build() { - com.google.cloud.vertexai.api.ModelExplanation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ModelExplanation buildPartial() { - com.google.cloud.vertexai.api.ModelExplanation result = - new com.google.cloud.vertexai.api.ModelExplanation(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.ModelExplanation result) { - if (meanAttributionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - meanAttributions_ = java.util.Collections.unmodifiableList(meanAttributions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.meanAttributions_ = meanAttributions_; - } else { - result.meanAttributions_ = meanAttributionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.ModelExplanation result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ModelExplanation) { - return mergeFrom((com.google.cloud.vertexai.api.ModelExplanation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ModelExplanation other) { - if (other == com.google.cloud.vertexai.api.ModelExplanation.getDefaultInstance()) return this; - if (meanAttributionsBuilder_ == null) { - if (!other.meanAttributions_.isEmpty()) { - if (meanAttributions_.isEmpty()) { - meanAttributions_ = other.meanAttributions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMeanAttributionsIsMutable(); - meanAttributions_.addAll(other.meanAttributions_); - } - onChanged(); - } - } else { - if (!other.meanAttributions_.isEmpty()) { - if (meanAttributionsBuilder_.isEmpty()) { - meanAttributionsBuilder_.dispose(); - meanAttributionsBuilder_ = null; - meanAttributions_ = other.meanAttributions_; - bitField0_ = (bitField0_ & ~0x00000001); - meanAttributionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetMeanAttributionsFieldBuilder() - : null; - } else { - meanAttributionsBuilder_.addAllMessages(other.meanAttributions_); - } - } - } - 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.vertexai.api.Attribution m = - input.readMessage( - com.google.cloud.vertexai.api.Attribution.parser(), extensionRegistry); - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - meanAttributions_.add(m); - } else { - meanAttributionsBuilder_.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 meanAttributions_ = - java.util.Collections.emptyList(); - - private void ensureMeanAttributionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - meanAttributions_ = - new java.util.ArrayList(meanAttributions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder> - meanAttributionsBuilder_; - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getMeanAttributionsList() { - if (meanAttributionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(meanAttributions_); - } else { - return meanAttributionsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getMeanAttributionsCount() { - if (meanAttributionsBuilder_ == null) { - return meanAttributions_.size(); - } else { - return meanAttributionsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution getMeanAttributions(int index) { - if (meanAttributionsBuilder_ == null) { - return meanAttributions_.get(index); - } else { - return meanAttributionsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMeanAttributions(int index, com.google.cloud.vertexai.api.Attribution value) { - if (meanAttributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeanAttributionsIsMutable(); - meanAttributions_.set(index, value); - onChanged(); - } else { - meanAttributionsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMeanAttributions( - int index, com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - meanAttributions_.set(index, builderForValue.build()); - onChanged(); - } else { - meanAttributionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMeanAttributions(com.google.cloud.vertexai.api.Attribution value) { - if (meanAttributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeanAttributionsIsMutable(); - meanAttributions_.add(value); - onChanged(); - } else { - meanAttributionsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMeanAttributions(int index, com.google.cloud.vertexai.api.Attribution value) { - if (meanAttributionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeanAttributionsIsMutable(); - meanAttributions_.add(index, value); - onChanged(); - } else { - meanAttributionsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMeanAttributions( - com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - meanAttributions_.add(builderForValue.build()); - onChanged(); - } else { - meanAttributionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addMeanAttributions( - int index, com.google.cloud.vertexai.api.Attribution.Builder builderForValue) { - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - meanAttributions_.add(index, builderForValue.build()); - onChanged(); - } else { - meanAttributionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllMeanAttributions( - java.lang.Iterable values) { - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, meanAttributions_); - onChanged(); - } else { - meanAttributionsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMeanAttributions() { - if (meanAttributionsBuilder_ == null) { - meanAttributions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - meanAttributionsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeMeanAttributions(int index) { - if (meanAttributionsBuilder_ == null) { - ensureMeanAttributionsIsMutable(); - meanAttributions_.remove(index); - onChanged(); - } else { - meanAttributionsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder getMeanAttributionsBuilder(int index) { - return internalGetMeanAttributionsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.AttributionOrBuilder getMeanAttributionsOrBuilder( - int index) { - if (meanAttributionsBuilder_ == null) { - return meanAttributions_.get(index); - } else { - return meanAttributionsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMeanAttributionsOrBuilderList() { - if (meanAttributionsBuilder_ != null) { - return meanAttributionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(meanAttributions_); - } - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder addMeanAttributionsBuilder() { - return internalGetMeanAttributionsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Attribution.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.Attribution.Builder addMeanAttributionsBuilder(int index) { - return internalGetMeanAttributionsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Attribution.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. Aggregated attributions explaining the Model's prediction
-     * outputs over the set of instances. The attributions are grouped by outputs.
-     *
-     * For Models that predict only one output, such as regression Models that
-     * predict only one score, there is only one attibution that explains the
-     * predicted output. For Models that predict multiple outputs, such as
-     * multiclass Models that predict multiple classes, each element explains one
-     * specific item.
-     * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-     * can be used to identify which output this attribution is explaining.
-     *
-     * The
-     * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-     * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-     * and
-     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-     * fields are averaged over the test data.
-     *
-     * NOTE: Currently AutoML tabular classification Models produce only one
-     * attribution, which averages attributions over all the classes it predicts.
-     * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-     * is not populated.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getMeanAttributionsBuilderList() { - return internalGetMeanAttributionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder> - internalGetMeanAttributionsFieldBuilder() { - if (meanAttributionsBuilder_ == null) { - meanAttributionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Attribution, - com.google.cloud.vertexai.api.Attribution.Builder, - com.google.cloud.vertexai.api.AttributionOrBuilder>( - meanAttributions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - meanAttributions_ = null; - } - return meanAttributionsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ModelExplanation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ModelExplanation) - private static final com.google.cloud.vertexai.api.ModelExplanation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ModelExplanation(); - } - - public static com.google.cloud.vertexai.api.ModelExplanation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelExplanation 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.vertexai.api.ModelExplanation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java deleted file mode 100644 index cd35a8aeb038..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ModelExplanationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ModelExplanation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getMeanAttributionsList(); - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.Attribution getMeanAttributions(int index); - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getMeanAttributionsCount(); - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getMeanAttributionsOrBuilderList(); - - /** - * - * - *
-   * Output only. Aggregated attributions explaining the Model's prediction
-   * outputs over the set of instances. The attributions are grouped by outputs.
-   *
-   * For Models that predict only one output, such as regression Models that
-   * predict only one score, there is only one attibution that explains the
-   * predicted output. For Models that predict multiple outputs, such as
-   * multiclass Models that predict multiple classes, each element explains one
-   * specific item.
-   * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
-   * can be used to identify which output this attribution is explaining.
-   *
-   * The
-   * [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
-   * [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
-   * and
-   * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
-   * fields are averaged over the test data.
-   *
-   * NOTE: Currently AutoML tabular classification Models produce only one
-   * attribution, which averages attributions over all the classes it predicts.
-   * [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
-   * is not populated.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Attribution mean_attributions = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.AttributionOrBuilder getMeanAttributionsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfig.java deleted file mode 100644 index 3e882e6f7862..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfig.java +++ /dev/null @@ -1,1009 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for a multi-speaker text-to-speech request.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MultiSpeakerVoiceConfig} - */ -@com.google.protobuf.Generated -public final class MultiSpeakerVoiceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.MultiSpeakerVoiceConfig) - MultiSpeakerVoiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MultiSpeakerVoiceConfig"); - } - - // Use MultiSpeakerVoiceConfig.newBuilder() to construct. - private MultiSpeakerVoiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private MultiSpeakerVoiceConfig() { - speakerVoiceConfigs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.class, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder.class); - } - - public static final int SPEAKER_VOICE_CONFIGS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List speakerVoiceConfigs_; - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getSpeakerVoiceConfigsList() { - return speakerVoiceConfigs_; - } - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getSpeakerVoiceConfigsOrBuilderList() { - return speakerVoiceConfigs_; - } - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getSpeakerVoiceConfigsCount() { - return speakerVoiceConfigs_.size(); - } - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeakerVoiceConfig getSpeakerVoiceConfigs(int index) { - return speakerVoiceConfigs_.get(index); - } - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder getSpeakerVoiceConfigsOrBuilder( - int index) { - return speakerVoiceConfigs_.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 < speakerVoiceConfigs_.size(); i++) { - output.writeMessage(2, speakerVoiceConfigs_.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 < speakerVoiceConfigs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, speakerVoiceConfigs_.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.vertexai.api.MultiSpeakerVoiceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig other = - (com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig) obj; - - if (!getSpeakerVoiceConfigsList().equals(other.getSpeakerVoiceConfigsList())) 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 (getSpeakerVoiceConfigsCount() > 0) { - hash = (37 * hash) + SPEAKER_VOICE_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getSpeakerVoiceConfigsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig 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.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig 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.vertexai.api.MultiSpeakerVoiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.MultiSpeakerVoiceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for a multi-speaker text-to-speech request.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MultiSpeakerVoiceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.MultiSpeakerVoiceConfig) - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.class, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (speakerVoiceConfigsBuilder_ == null) { - speakerVoiceConfigs_ = java.util.Collections.emptyList(); - } else { - speakerVoiceConfigs_ = null; - speakerVoiceConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_MultiSpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig build() { - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig buildPartial() { - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig result = - new com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig result) { - if (speakerVoiceConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - speakerVoiceConfigs_ = java.util.Collections.unmodifiableList(speakerVoiceConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.speakerVoiceConfigs_ = speakerVoiceConfigs_; - } else { - result.speakerVoiceConfigs_ = speakerVoiceConfigsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig other) { - if (other == com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance()) - return this; - if (speakerVoiceConfigsBuilder_ == null) { - if (!other.speakerVoiceConfigs_.isEmpty()) { - if (speakerVoiceConfigs_.isEmpty()) { - speakerVoiceConfigs_ = other.speakerVoiceConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.addAll(other.speakerVoiceConfigs_); - } - onChanged(); - } - } else { - if (!other.speakerVoiceConfigs_.isEmpty()) { - if (speakerVoiceConfigsBuilder_.isEmpty()) { - speakerVoiceConfigsBuilder_.dispose(); - speakerVoiceConfigsBuilder_ = null; - speakerVoiceConfigs_ = other.speakerVoiceConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - speakerVoiceConfigsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSpeakerVoiceConfigsFieldBuilder() - : null; - } else { - speakerVoiceConfigsBuilder_.addAllMessages(other.speakerVoiceConfigs_); - } - } - } - 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: - { - com.google.cloud.vertexai.api.SpeakerVoiceConfig m = - input.readMessage( - com.google.cloud.vertexai.api.SpeakerVoiceConfig.parser(), - extensionRegistry); - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.add(m); - } else { - speakerVoiceConfigsBuilder_.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.util.List speakerVoiceConfigs_ = - java.util.Collections.emptyList(); - - private void ensureSpeakerVoiceConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - speakerVoiceConfigs_ = - new java.util.ArrayList( - speakerVoiceConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SpeakerVoiceConfig, - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder> - speakerVoiceConfigsBuilder_; - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getSpeakerVoiceConfigsList() { - if (speakerVoiceConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(speakerVoiceConfigs_); - } else { - return speakerVoiceConfigsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getSpeakerVoiceConfigsCount() { - if (speakerVoiceConfigsBuilder_ == null) { - return speakerVoiceConfigs_.size(); - } else { - return speakerVoiceConfigsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SpeakerVoiceConfig getSpeakerVoiceConfigs(int index) { - if (speakerVoiceConfigsBuilder_ == null) { - return speakerVoiceConfigs_.get(index); - } else { - return speakerVoiceConfigsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setSpeakerVoiceConfigs( - int index, com.google.cloud.vertexai.api.SpeakerVoiceConfig value) { - if (speakerVoiceConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.set(index, value); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setSpeakerVoiceConfigs( - int index, com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder builderForValue) { - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addSpeakerVoiceConfigs(com.google.cloud.vertexai.api.SpeakerVoiceConfig value) { - if (speakerVoiceConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.add(value); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addSpeakerVoiceConfigs( - int index, com.google.cloud.vertexai.api.SpeakerVoiceConfig value) { - if (speakerVoiceConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.add(index, value); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addSpeakerVoiceConfigs( - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder builderForValue) { - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.add(builderForValue.build()); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addSpeakerVoiceConfigs( - int index, com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder builderForValue) { - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllSpeakerVoiceConfigs( - java.lang.Iterable values) { - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, speakerVoiceConfigs_); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearSpeakerVoiceConfigs() { - if (speakerVoiceConfigsBuilder_ == null) { - speakerVoiceConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeSpeakerVoiceConfigs(int index) { - if (speakerVoiceConfigsBuilder_ == null) { - ensureSpeakerVoiceConfigsIsMutable(); - speakerVoiceConfigs_.remove(index); - onChanged(); - } else { - speakerVoiceConfigsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder getSpeakerVoiceConfigsBuilder( - int index) { - return internalGetSpeakerVoiceConfigsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder - getSpeakerVoiceConfigsOrBuilder(int index) { - if (speakerVoiceConfigsBuilder_ == null) { - return speakerVoiceConfigs_.get(index); - } else { - return speakerVoiceConfigsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getSpeakerVoiceConfigsOrBuilderList() { - if (speakerVoiceConfigsBuilder_ != null) { - return speakerVoiceConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(speakerVoiceConfigs_); - } - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder - addSpeakerVoiceConfigsBuilder() { - return internalGetSpeakerVoiceConfigsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.SpeakerVoiceConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder addSpeakerVoiceConfigsBuilder( - int index) { - return internalGetSpeakerVoiceConfigsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.SpeakerVoiceConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. A list of configurations for the voices of the speakers. Exactly
-     * two speaker voice configurations must be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getSpeakerVoiceConfigsBuilderList() { - return internalGetSpeakerVoiceConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SpeakerVoiceConfig, - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder> - internalGetSpeakerVoiceConfigsFieldBuilder() { - if (speakerVoiceConfigsBuilder_ == null) { - speakerVoiceConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SpeakerVoiceConfig, - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder>( - speakerVoiceConfigs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - speakerVoiceConfigs_ = null; - } - return speakerVoiceConfigsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.MultiSpeakerVoiceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.MultiSpeakerVoiceConfig) - private static final com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig(); - } - - public static com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MultiSpeakerVoiceConfig 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.vertexai.api.MultiSpeakerVoiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfigOrBuilder.java deleted file mode 100644 index daa31a464d7c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MultiSpeakerVoiceConfigOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface MultiSpeakerVoiceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.MultiSpeakerVoiceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getSpeakerVoiceConfigsList(); - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SpeakerVoiceConfig getSpeakerVoiceConfigs(int index); - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getSpeakerVoiceConfigsCount(); - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getSpeakerVoiceConfigsOrBuilderList(); - - /** - * - * - *
-   * Required. A list of configurations for the voices of the speakers. Exactly
-   * two speaker voice configurations must be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SpeakerVoiceConfig speaker_voice_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder getSpeakerVoiceConfigsOrBuilder( - int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java deleted file mode 100644 index 33910bee41b8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Runtime operation information for
- * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata} - */ -@com.google.protobuf.Generated -public final class MutateDeployedModelOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata) - MutateDeployedModelOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MutateDeployedModelOperationMetadata"); - } - - // Use MutateDeployedModelOperationMetadata.newBuilder() to construct. - private MutateDeployedModelOperationMetadata( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private MutateDeployedModelOperationMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.class, - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - 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.writeMessage(1, getGenericMetadata()); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - 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.vertexai.api.MutateDeployedModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata other = - (com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata 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.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata 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.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.MutateDeployedModelOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Runtime operation information for
-   * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata) - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.class, - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata build() { - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata result = - new com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata) { - return mergeFrom( - (com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata other) { - if (other - == com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - .getDefaultInstance()) return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - 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( - internalGetGenericMetadataFieldBuilder().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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata) - private static final com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MutateDeployedModelOperationMetadata 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.vertexai.api.MutateDeployedModelOperationMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java deleted file mode 100644 index dd05b539fa09..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface MutateDeployedModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.MutateDeployedModelOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java deleted file mode 100644 index c4a4c42a4ece..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java +++ /dev/null @@ -1,1402 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelRequest} - */ -@com.google.protobuf.Generated -public final class MutateDeployedModelRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.MutateDeployedModelRequest) - MutateDeployedModelRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MutateDeployedModelRequest"); - } - - // Use MutateDeployedModelRequest.newBuilder() to construct. - private MutateDeployedModelRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private MutateDeployedModelRequest() { - endpoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelRequest.class, - com.google.cloud.vertexai.api.MutateDeployedModelRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to mutate a
-   * DeployedModel. Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to mutate a
-   * DeployedModel. Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOYED_MODEL_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - @java.lang.Override - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 4; - private com.google.protobuf.FieldMask updateMask_; - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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 update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getDeployedModel()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedModel()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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.vertexai.api.MutateDeployedModelRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.MutateDeployedModelRequest other = - (com.google.cloud.vertexai.api.MutateDeployedModelRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (hasDeployedModel() != other.hasDeployedModel()) return false; - if (hasDeployedModel()) { - if (!getDeployedModel().equals(other.getDeployedModel())) 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(); - hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (hasDeployedModel()) { - hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModel().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.vertexai.api.MutateDeployedModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest 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.vertexai.api.MutateDeployedModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest 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.vertexai.api.MutateDeployedModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.MutateDeployedModelRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.MutateDeployedModelRequest) - com.google.cloud.vertexai.api.MutateDeployedModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelRequest.class, - com.google.cloud.vertexai.api.MutateDeployedModelRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.MutateDeployedModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDeployedModelFieldBuilder(); - internalGetUpdateMaskFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = 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.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.MutateDeployedModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelRequest build() { - com.google.cloud.vertexai.api.MutateDeployedModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelRequest buildPartial() { - com.google.cloud.vertexai.api.MutateDeployedModelRequest result = - new com.google.cloud.vertexai.api.MutateDeployedModelRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.MutateDeployedModelRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployedModel_ = - deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.MutateDeployedModelRequest) { - return mergeFrom((com.google.cloud.vertexai.api.MutateDeployedModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.MutateDeployedModelRequest other) { - if (other == com.google.cloud.vertexai.api.MutateDeployedModelRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasDeployedModel()) { - mergeDeployedModel(other.getDeployedModel()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetDeployedModelFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - input.readMessage( - internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to mutate a
-     * DeployedModel. Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to mutate a
-     * DeployedModel. Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to mutate a
-     * DeployedModel. Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to mutate a
-     * DeployedModel. Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource into which to mutate a
-     * DeployedModel. Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - deployedModelBuilder_; - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - if (deployedModelBuilder_ == null) { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } else { - return deployedModelBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployedModel_ = value; - } else { - deployedModelBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDeployedModel( - com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelBuilder_ == null) { - deployedModel_ = builderForValue.build(); - } else { - deployedModelBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && deployedModel_ != null - && deployedModel_ != com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()) { - getDeployedModelBuilder().mergeFrom(value); - } else { - deployedModel_ = value; - } - } else { - deployedModelBuilder_.mergeFrom(value); - } - if (deployedModel_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDeployedModel() { - bitField0_ = (bitField0_ & ~0x00000002); - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder getDeployedModelBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetDeployedModelFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - if (deployedModelBuilder_ != null) { - return deployedModelBuilder_.getMessageOrBuilder(); - } else { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - } - - /** - * - * - *
-     * Required. The DeployedModel to be mutated within the Endpoint. Only the
-     * following fields can be mutated:
-     *
-     * * `min_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `max_replica_count` in either
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-     * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-     * * `required_replica_count` in
-     * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-     * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-     * * `disable_container_logging` (v1 only)
-     * * `enable_container_logging` (v1beta1 only)
-     * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - internalGetDeployedModelFieldBuilder() { - if (deployedModelBuilder_ == null) { - deployedModelBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder>( - getDeployedModel(), getParentForChildren(), isClean()); - deployedModel_ = null; - } - return deployedModelBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - if (updateMask_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000004); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetUpdateMaskFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - internalGetUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.MutateDeployedModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.MutateDeployedModelRequest) - private static final com.google.cloud.vertexai.api.MutateDeployedModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.MutateDeployedModelRequest(); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MutateDeployedModelRequest 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.vertexai.api.MutateDeployedModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java deleted file mode 100644 index dd0e5c95c708..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface MutateDeployedModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.MutateDeployedModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to mutate a
-   * DeployedModel. Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint resource into which to mutate a
-   * DeployedModel. Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the deployedModel field is set. - */ - boolean hasDeployedModel(); - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The deployedModel. - */ - com.google.cloud.vertexai.api.DeployedModel getDeployedModel(); - - /** - * - * - *
-   * Required. The DeployedModel to be mutated within the Endpoint. Only the
-   * following fields can be mutated:
-   *
-   * * `min_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `max_replica_count` in either
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
-   * [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
-   * * `required_replica_count` in
-   * [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
-   * * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
-   * * `disable_container_logging` (v1 only)
-   * * `enable_container_logging` (v1beta1 only)
-   * 
- * - * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java deleted file mode 100644 index f6e5323192bf..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java +++ /dev/null @@ -1,703 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelResponse} - */ -@com.google.protobuf.Generated -public final class MutateDeployedModelResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.MutateDeployedModelResponse) - MutateDeployedModelResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "MutateDeployedModelResponse"); - } - - // Use MutateDeployedModelResponse.newBuilder() to construct. - private MutateDeployedModelResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private MutateDeployedModelResponse() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelResponse.class, - com.google.cloud.vertexai.api.MutateDeployedModelResponse.Builder.class); - } - - private int bitField0_; - public static final int DEPLOYED_MODEL_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.DeployedModel deployedModel_; - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - @java.lang.Override - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - - 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.writeMessage(1, getDeployedModel()); - } - 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.computeMessageSize(1, getDeployedModel()); - } - 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.vertexai.api.MutateDeployedModelResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.MutateDeployedModelResponse other = - (com.google.cloud.vertexai.api.MutateDeployedModelResponse) obj; - - if (hasDeployedModel() != other.hasDeployedModel()) return false; - if (hasDeployedModel()) { - if (!getDeployedModel().equals(other.getDeployedModel())) 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 (hasDeployedModel()) { - hash = (37 * hash) + DEPLOYED_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModel().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse 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.vertexai.api.MutateDeployedModelResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse 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.vertexai.api.MutateDeployedModelResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.MutateDeployedModelResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.MutateDeployedModelResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.MutateDeployedModelResponse) - com.google.cloud.vertexai.api.MutateDeployedModelResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.MutateDeployedModelResponse.class, - com.google.cloud.vertexai.api.MutateDeployedModelResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.MutateDeployedModelResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDeployedModelFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_MutateDeployedModelResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.MutateDeployedModelResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelResponse build() { - com.google.cloud.vertexai.api.MutateDeployedModelResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.MutateDeployedModelResponse buildPartial() { - com.google.cloud.vertexai.api.MutateDeployedModelResponse result = - new com.google.cloud.vertexai.api.MutateDeployedModelResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.MutateDeployedModelResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.deployedModel_ = - deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.MutateDeployedModelResponse) { - return mergeFrom((com.google.cloud.vertexai.api.MutateDeployedModelResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.MutateDeployedModelResponse other) { - if (other == com.google.cloud.vertexai.api.MutateDeployedModelResponse.getDefaultInstance()) - return this; - if (other.hasDeployedModel()) { - mergeDeployedModel(other.getDeployedModel()); - } - 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( - internalGetDeployedModelFieldBuilder().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.vertexai.api.DeployedModel deployedModel_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - deployedModelBuilder_; - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - public boolean hasDeployedModel() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - public com.google.cloud.vertexai.api.DeployedModel getDeployedModel() { - if (deployedModelBuilder_ == null) { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } else { - return deployedModelBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder setDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployedModel_ = value; - } else { - deployedModelBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder setDeployedModel( - com.google.cloud.vertexai.api.DeployedModel.Builder builderForValue) { - if (deployedModelBuilder_ == null) { - deployedModel_ = builderForValue.build(); - } else { - deployedModelBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel value) { - if (deployedModelBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && deployedModel_ != null - && deployedModel_ != com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance()) { - getDeployedModelBuilder().mergeFrom(value); - } else { - deployedModel_ = value; - } - } else { - deployedModelBuilder_.mergeFrom(value); - } - if (deployedModel_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public Builder clearDeployedModel() { - bitField0_ = (bitField0_ & ~0x00000001); - deployedModel_ = null; - if (deployedModelBuilder_ != null) { - deployedModelBuilder_.dispose(); - deployedModelBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public com.google.cloud.vertexai.api.DeployedModel.Builder getDeployedModelBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetDeployedModelFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder() { - if (deployedModelBuilder_ != null) { - return deployedModelBuilder_.getMessageOrBuilder(); - } else { - return deployedModel_ == null - ? com.google.cloud.vertexai.api.DeployedModel.getDefaultInstance() - : deployedModel_; - } - } - - /** - * - * - *
-     * The DeployedModel that's being mutated.
-     * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder> - internalGetDeployedModelFieldBuilder() { - if (deployedModelBuilder_ == null) { - deployedModelBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DeployedModel, - com.google.cloud.vertexai.api.DeployedModel.Builder, - com.google.cloud.vertexai.api.DeployedModelOrBuilder>( - getDeployedModel(), getParentForChildren(), isClean()); - deployedModel_ = null; - } - return deployedModelBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.MutateDeployedModelResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.MutateDeployedModelResponse) - private static final com.google.cloud.vertexai.api.MutateDeployedModelResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.MutateDeployedModelResponse(); - } - - public static com.google.cloud.vertexai.api.MutateDeployedModelResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MutateDeployedModelResponse 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.vertexai.api.MutateDeployedModelResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java deleted file mode 100644 index 163ef504710f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface MutateDeployedModelResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.MutateDeployedModelResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return Whether the deployedModel field is set. - */ - boolean hasDeployedModel(); - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - * - * @return The deployedModel. - */ - com.google.cloud.vertexai.api.DeployedModel getDeployedModel(); - - /** - * - * - *
-   * The DeployedModel that's being mutated.
-   * 
- * - * .google.cloud.vertexai.v1.DeployedModel deployed_model = 1; - */ - com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java deleted file mode 100644 index 1208e4d9d9c2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Neighbors for example-based explanations.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Neighbor} - */ -@com.google.protobuf.Generated -public final class Neighbor extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Neighbor) - NeighborOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Neighbor"); - } - - // Use Neighbor.newBuilder() to construct. - private Neighbor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Neighbor() { - neighborId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Neighbor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Neighbor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Neighbor.class, - com.google.cloud.vertexai.api.Neighbor.Builder.class); - } - - public static final int NEIGHBOR_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object neighborId_ = ""; - - /** - * - * - *
-   * Output only. The neighbor id.
-   * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborId. - */ - @java.lang.Override - public java.lang.String getNeighborId() { - java.lang.Object ref = neighborId_; - 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(); - neighborId_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The neighbor id.
-   * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for neighborId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNeighborIdBytes() { - java.lang.Object ref = neighborId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - neighborId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NEIGHBOR_DISTANCE_FIELD_NUMBER = 2; - private double neighborDistance_ = 0D; - - /** - * - * - *
-   * Output only. The neighbor distance.
-   * 
- * - * double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborDistance. - */ - @java.lang.Override - public double getNeighborDistance() { - return neighborDistance_; - } - - 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.GeneratedMessage.isStringEmpty(neighborId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, neighborId_); - } - if (java.lang.Double.doubleToRawLongBits(neighborDistance_) != 0) { - output.writeDouble(2, neighborDistance_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(neighborId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, neighborId_); - } - if (java.lang.Double.doubleToRawLongBits(neighborDistance_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, neighborDistance_); - } - 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.vertexai.api.Neighbor)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Neighbor other = (com.google.cloud.vertexai.api.Neighbor) obj; - - if (!getNeighborId().equals(other.getNeighborId())) return false; - if (java.lang.Double.doubleToLongBits(getNeighborDistance()) - != java.lang.Double.doubleToLongBits(other.getNeighborDistance())) 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) + NEIGHBOR_ID_FIELD_NUMBER; - hash = (53 * hash) + getNeighborId().hashCode(); - hash = (37 * hash) + NEIGHBOR_DISTANCE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getNeighborDistance())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Neighbor 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.vertexai.api.Neighbor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Neighbor 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.vertexai.api.Neighbor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Neighbor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Neighbor parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Neighbor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Neighbor 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Neighbors for example-based explanations.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Neighbor} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Neighbor) - com.google.cloud.vertexai.api.NeighborOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Neighbor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Neighbor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Neighbor.class, - com.google.cloud.vertexai.api.Neighbor.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Neighbor.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - neighborId_ = ""; - neighborDistance_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Neighbor_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Neighbor getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Neighbor.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Neighbor build() { - com.google.cloud.vertexai.api.Neighbor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Neighbor buildPartial() { - com.google.cloud.vertexai.api.Neighbor result = - new com.google.cloud.vertexai.api.Neighbor(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Neighbor result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.neighborId_ = neighborId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.neighborDistance_ = neighborDistance_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Neighbor) { - return mergeFrom((com.google.cloud.vertexai.api.Neighbor) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Neighbor other) { - if (other == com.google.cloud.vertexai.api.Neighbor.getDefaultInstance()) return this; - if (!other.getNeighborId().isEmpty()) { - neighborId_ = other.neighborId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (java.lang.Double.doubleToRawLongBits(other.getNeighborDistance()) != 0) { - setNeighborDistance(other.getNeighborDistance()); - } - 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: - { - neighborId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 17: - { - neighborDistance_ = input.readDouble(); - bitField0_ |= 0x00000002; - break; - } // case 17 - 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 neighborId_ = ""; - - /** - * - * - *
-     * Output only. The neighbor id.
-     * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborId. - */ - public java.lang.String getNeighborId() { - java.lang.Object ref = neighborId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - neighborId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The neighbor id.
-     * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for neighborId. - */ - public com.google.protobuf.ByteString getNeighborIdBytes() { - java.lang.Object ref = neighborId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - neighborId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The neighbor id.
-     * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The neighborId to set. - * @return This builder for chaining. - */ - public Builder setNeighborId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - neighborId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The neighbor id.
-     * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearNeighborId() { - neighborId_ = getDefaultInstance().getNeighborId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The neighbor id.
-     * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for neighborId to set. - * @return This builder for chaining. - */ - public Builder setNeighborIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - neighborId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private double neighborDistance_; - - /** - * - * - *
-     * Output only. The neighbor distance.
-     * 
- * - * double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborDistance. - */ - @java.lang.Override - public double getNeighborDistance() { - return neighborDistance_; - } - - /** - * - * - *
-     * Output only. The neighbor distance.
-     * 
- * - * double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The neighborDistance to set. - * @return This builder for chaining. - */ - public Builder setNeighborDistance(double value) { - - neighborDistance_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The neighbor distance.
-     * 
- * - * double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearNeighborDistance() { - bitField0_ = (bitField0_ & ~0x00000002); - neighborDistance_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Neighbor) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Neighbor) - private static final com.google.cloud.vertexai.api.Neighbor DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Neighbor(); - } - - public static com.google.cloud.vertexai.api.Neighbor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Neighbor 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.vertexai.api.Neighbor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java deleted file mode 100644 index 59d26d552044..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface NeighborOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Neighbor) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The neighbor id.
-   * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborId. - */ - java.lang.String getNeighborId(); - - /** - * - * - *
-   * Output only. The neighbor id.
-   * 
- * - * string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for neighborId. - */ - com.google.protobuf.ByteString getNeighborIdBytes(); - - /** - * - * - *
-   * Output only. The neighbor distance.
-   * 
- * - * double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The neighborDistance. - */ - double getNeighborDistance(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java deleted file mode 100644 index 88969c9110ce..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java +++ /dev/null @@ -1,993 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents a mount configuration for Network File System (NFS) to mount.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.NfsMount} - */ -@com.google.protobuf.Generated -public final class NfsMount extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.NfsMount) - NfsMountOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "NfsMount"); - } - - // Use NfsMount.newBuilder() to construct. - private NfsMount(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private NfsMount() { - server_ = ""; - path_ = ""; - mountPoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_NfsMount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_NfsMount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.NfsMount.class, - com.google.cloud.vertexai.api.NfsMount.Builder.class); - } - - public static final int SERVER_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object server_ = ""; - - /** - * - * - *
-   * Required. IP address of the NFS server.
-   * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The server. - */ - @java.lang.Override - public java.lang.String getServer() { - java.lang.Object ref = server_; - 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(); - server_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. IP address of the NFS server.
-   * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for server. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServerBytes() { - java.lang.Object ref = server_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - server_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PATH_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object path_ = ""; - - /** - * - * - *
-   * Required. Source path exported from NFS server.
-   * Has to start with '/', and combined with the ip address, it indicates
-   * the source mount path in the form of `server:path`
-   * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - 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(); - path_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. Source path exported from NFS server.
-   * Has to start with '/', and combined with the ip address, it indicates
-   * the source mount path in the form of `server:path`
-   * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MOUNT_POINT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object mountPoint_ = ""; - - /** - * - * - *
-   * Required. Destination mount path. The NFS will be mounted for the user
-   * under /mnt/nfs/<mount_point>
-   * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - @java.lang.Override - public java.lang.String getMountPoint() { - java.lang.Object ref = mountPoint_; - 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(); - mountPoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. Destination mount path. The NFS will be mounted for the user
-   * under /mnt/nfs/<mount_point>
-   * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMountPointBytes() { - java.lang.Object ref = mountPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mountPoint_ = 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.GeneratedMessage.isStringEmpty(server_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, server_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mountPoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, mountPoint_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(server_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, server_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mountPoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, mountPoint_); - } - 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.vertexai.api.NfsMount)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.NfsMount other = (com.google.cloud.vertexai.api.NfsMount) obj; - - if (!getServer().equals(other.getServer())) return false; - if (!getPath().equals(other.getPath())) return false; - if (!getMountPoint().equals(other.getMountPoint())) 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) + SERVER_FIELD_NUMBER; - hash = (53 * hash) + getServer().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (37 * hash) + MOUNT_POINT_FIELD_NUMBER; - hash = (53 * hash) + getMountPoint().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.NfsMount 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.vertexai.api.NfsMount parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.NfsMount 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.vertexai.api.NfsMount parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.NfsMount parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.NfsMount parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.NfsMount parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.NfsMount 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents a mount configuration for Network File System (NFS) to mount.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.NfsMount} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.NfsMount) - com.google.cloud.vertexai.api.NfsMountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_NfsMount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_NfsMount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.NfsMount.class, - com.google.cloud.vertexai.api.NfsMount.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.NfsMount.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - server_ = ""; - path_ = ""; - mountPoint_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_NfsMount_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.NfsMount getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.NfsMount.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.NfsMount build() { - com.google.cloud.vertexai.api.NfsMount result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.NfsMount buildPartial() { - com.google.cloud.vertexai.api.NfsMount result = - new com.google.cloud.vertexai.api.NfsMount(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.NfsMount result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.server_ = server_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.path_ = path_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.mountPoint_ = mountPoint_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.NfsMount) { - return mergeFrom((com.google.cloud.vertexai.api.NfsMount) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.NfsMount other) { - if (other == com.google.cloud.vertexai.api.NfsMount.getDefaultInstance()) return this; - if (!other.getServer().isEmpty()) { - server_ = other.server_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getPath().isEmpty()) { - path_ = other.path_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getMountPoint().isEmpty()) { - mountPoint_ = other.mountPoint_; - 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: - { - server_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - path_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - mountPoint_ = 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 server_ = ""; - - /** - * - * - *
-     * Required. IP address of the NFS server.
-     * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The server. - */ - public java.lang.String getServer() { - java.lang.Object ref = server_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - server_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. IP address of the NFS server.
-     * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for server. - */ - public com.google.protobuf.ByteString getServerBytes() { - java.lang.Object ref = server_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - server_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. IP address of the NFS server.
-     * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The server to set. - * @return This builder for chaining. - */ - public Builder setServer(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - server_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. IP address of the NFS server.
-     * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServer() { - server_ = getDefaultInstance().getServer(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. IP address of the NFS server.
-     * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for server to set. - * @return This builder for chaining. - */ - public Builder setServerBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - server_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object path_ = ""; - - /** - * - * - *
-     * Required. Source path exported from NFS server.
-     * Has to start with '/', and combined with the ip address, it indicates
-     * the source mount path in the form of `server:path`
-     * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. Source path exported from NFS server.
-     * Has to start with '/', and combined with the ip address, it indicates
-     * the source mount path in the form of `server:path`
-     * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for path. - */ - public com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. Source path exported from NFS server.
-     * Has to start with '/', and combined with the ip address, it indicates
-     * the source mount path in the form of `server:path`
-     * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - path_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Source path exported from NFS server.
-     * Has to start with '/', and combined with the ip address, it indicates
-     * the source mount path in the form of `server:path`
-     * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPath() { - path_ = getDefaultInstance().getPath(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Source path exported from NFS server.
-     * Has to start with '/', and combined with the ip address, it indicates
-     * the source mount path in the form of `server:path`
-     * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - path_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object mountPoint_ = ""; - - /** - * - * - *
-     * Required. Destination mount path. The NFS will be mounted for the user
-     * under /mnt/nfs/<mount_point>
-     * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - public java.lang.String getMountPoint() { - java.lang.Object ref = mountPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mountPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. Destination mount path. The NFS will be mounted for the user
-     * under /mnt/nfs/<mount_point>
-     * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - public com.google.protobuf.ByteString getMountPointBytes() { - java.lang.Object ref = mountPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mountPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. Destination mount path. The NFS will be mounted for the user
-     * under /mnt/nfs/<mount_point>
-     * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mountPoint to set. - * @return This builder for chaining. - */ - public Builder setMountPoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - mountPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Destination mount path. The NFS will be mounted for the user
-     * under /mnt/nfs/<mount_point>
-     * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMountPoint() { - mountPoint_ = getDefaultInstance().getMountPoint(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Destination mount path. The NFS will be mounted for the user
-     * under /mnt/nfs/<mount_point>
-     * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mountPoint to set. - * @return This builder for chaining. - */ - public Builder setMountPointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - mountPoint_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.NfsMount) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.NfsMount) - private static final com.google.cloud.vertexai.api.NfsMount DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.NfsMount(); - } - - public static com.google.cloud.vertexai.api.NfsMount getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NfsMount 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.vertexai.api.NfsMount getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java deleted file mode 100644 index 7de3fdf1d9f8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface NfsMountOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.NfsMount) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. IP address of the NFS server.
-   * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The server. - */ - java.lang.String getServer(); - - /** - * - * - *
-   * Required. IP address of the NFS server.
-   * 
- * - * string server = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for server. - */ - com.google.protobuf.ByteString getServerBytes(); - - /** - * - * - *
-   * Required. Source path exported from NFS server.
-   * Has to start with '/', and combined with the ip address, it indicates
-   * the source mount path in the form of `server:path`
-   * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The path. - */ - java.lang.String getPath(); - - /** - * - * - *
-   * Required. Source path exported from NFS server.
-   * Has to start with '/', and combined with the ip address, it indicates
-   * the source mount path in the form of `server:path`
-   * 
- * - * string path = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for path. - */ - com.google.protobuf.ByteString getPathBytes(); - - /** - * - * - *
-   * Required. Destination mount path. The NFS will be mounted for the user
-   * under /mnt/nfs/<mount_point>
-   * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mountPoint. - */ - java.lang.String getMountPoint(); - - /** - * - * - *
-   * Required. Destination mount path. The NFS will be mounted for the user
-   * under /mnt/nfs/<mount_point>
-   * 
- * - * string mount_point = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mountPoint. - */ - com.google.protobuf.ByteString getMountPointBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java deleted file mode 100644 index 86e4c227ef11..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/openapi.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class OpenApiProto extends com.google.protobuf.GeneratedFile { - private OpenApiProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "OpenApiProto"); - } - - 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_vertexai_v1_Schema_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Schema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_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/vertexai/v1/openapi.proto" - + "\022\030google.cloud.vertexai.v1\032\037google/api/f" - + "ield_behavior.proto\032\034google/protobuf/struct.proto\"\202\010\n" - + "\006Schema\0221\n" - + "\004type\030\001 \001(\0162\036.google.cloud.vertexai.v1.TypeB\003\340A\001\022\023\n" - + "\006format\030\007 \001(\tB\003\340A\001\022\022\n" - + "\005title\030\030 \001(\tB\003\340A\001\022\030\n" - + "\013description\030\010 \001(\tB\003\340A\001\022\025\n" - + "\010nullable\030\006 \001(\010B\003\340A\001\022,\n" - + "\007default\030\027 \001(\0132\026.google.protobuf.ValueB\003\340A\001\0224\n" - + "\005items\030\002 \001(\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001\022\026\n" - + "\tmin_items\030\025 \001(\003B\003\340A\001\022\026\n" - + "\tmax_items\030\026 \001(\003B\003\340A\001\022\021\n" - + "\004enum\030\t \003(\tB\003\340A\001\022I\n\n" - + "properties\030\003 \003(\01320.google.cl" - + "oud.vertexai.v1.Schema.PropertiesEntryB\003\340A\001\022\036\n" - + "\021property_ordering\030\031 \003(\tB\003\340A\001\022\025\n" - + "\010required\030\005 \003(\tB\003\340A\001\022\033\n" - + "\016min_properties\030\016 \001(\003B\003\340A\001\022\033\n" - + "\016max_properties\030\017 \001(\003B\003\340A\001\022\024\n" - + "\007minimum\030\020 \001(\001B\003\340A\001\022\024\n" - + "\007maximum\030\021 \001(\001B\003\340A\001\022\027\n\n" - + "min_length\030\022 \001(\003B\003\340A\001\022\027\n\n" - + "max_length\030\023 \001(\003B\003\340A\001\022\024\n" - + "\007pattern\030\024 \001(\tB\003\340A\001\022,\n" - + "\007example\030\004 \001(\0132\026.google.protobuf.ValueB\003\340A\001\0225\n" - + "\006any_of\030\013 \003(\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001\022:\n" - + "\025additional_properties\030\032" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\022\020\n" - + "\003ref\030\033 \001(\tB\003\340A\001\022=\n" - + "\004defs\030\034" - + " \003(\0132*.google.cloud.vertexai.v1.Schema.DefsEntryB\003\340A\001\032S\n" - + "\017PropertiesEntry\022\013\n" - + "\003key\030\001 \001(\t\022/\n" - + "\005value\030\002 \001(\0132 .google.cloud.vertexai.v1.Schema:\0028\001\032M\n" - + "\tDefsEntry\022\013\n" - + "\003key\030\001 \001(\t\022/\n" - + "\005value\030\002 \001(\0132 .google.cloud.vertexai.v1.Schema:\0028\001*e\n" - + "\004Type\022\024\n" - + "\020TYPE_UNSPECIFIED\020\000\022\n\n" - + "\006STRING\020\001\022\n\n" - + "\006NUMBER\020\002\022\013\n" - + "\007INTEGER\020\003\022\013\n" - + "\007BOOLEAN\020\004\022\t\n" - + "\005ARRAY\020\005\022\n\n" - + "\006OBJECT\020\006B\311\001\n" - + "\035com.google.cloud.vertexai.apiB\014OpenApiProtoP\001Z>cloud.g" - + "oogle.com/go/aiplatform/apiv1/aiplatform" - + "pb;aiplatformpb\252\002\032Google.Cloud.AIPlatfor" - + "m.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Goog" - + "le::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_Schema_descriptor = getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_Schema_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Schema_descriptor, - new java.lang.String[] { - "Type", - "Format", - "Title", - "Description", - "Nullable", - "Default", - "Items", - "MinItems", - "MaxItems", - "Enum", - "Properties", - "PropertyOrdering", - "Required", - "MinProperties", - "MaxProperties", - "Minimum", - "Maximum", - "MinLength", - "MaxLength", - "Pattern", - "Example", - "AnyOf", - "AdditionalProperties", - "Ref", - "Defs", - }); - internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_descriptor = - internal_static_google_cloud_vertexai_v1_Schema_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_Schema_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java deleted file mode 100644 index 601fceeb6cf6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/operation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class OperationProto extends com.google.protobuf.GeneratedFile { - private OperationProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "OperationProto"); - } - - 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_vertexai_v1_GenericOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_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/vertexai/v1/operation.pro" - + "to\022\030google.cloud.vertexai.v1\032\037google/api" - + "/field_behavior.proto\032\037google/protobuf/t" - + "imestamp.proto\032\027google/rpc/status.proto\"" - + "\271\001\n\030GenericOperationMetadata\0221\n\020partial_" - + "failures\030\001 \003(\0132\022.google.rpc.StatusB\003\340A\003\022" - + "4\n\013create_time\030\002 \001(\0132\032.google.protobuf.T" - + "imestampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\"g\n\027DeleteOpe" - + "rationMetadata\022L\n\020generic_metadata\030\001 \001(\013" - + "22.google.cloud.vertexai.v1.GenericOpera" - + "tionMetadataB\313\001\n\035com.google.cloud.vertex" - + "ai.apiB\016OperationProtoP\001Z>cloud.google.c" - + "om/go/aiplatform/apiv1/aiplatformpb;aipl" - + "atformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032" - + "Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Clo" - + "ud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenericOperationMetadata_descriptor, - new java.lang.String[] { - "PartialFailures", "CreateTime", "UpdateTime", - }); - internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DeleteOperationMetadata_descriptor, - new java.lang.String[] { - "GenericMetadata", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfig.java deleted file mode 100644 index 14da3a124391..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfig.java +++ /dev/null @@ -1,1550 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * PSC config that is used to automatically create PSC endpoints in the user
- * projects.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PSCAutomationConfig} - */ -@com.google.protobuf.Generated -public final class PSCAutomationConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PSCAutomationConfig) - PSCAutomationConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PSCAutomationConfig"); - } - - // Use PSCAutomationConfig.newBuilder() to construct. - private PSCAutomationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PSCAutomationConfig() { - projectId_ = ""; - network_ = ""; - ipAddress_ = ""; - forwardingRule_ = ""; - state_ = 0; - errorMessage_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PSCAutomationConfig.class, - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - - /** - * - * - *
-   * Required. Project id used to create forwarding rule.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. Project id used to create forwarding rule.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - - /** - * - * - *
-   * Required. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-   * `projects/{project}/global/networks/{network}`.
-   * 
- * - * 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 full name of the Google Compute Engine
-   * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-   * `projects/{project}/global/networks/{network}`.
-   * 
- * - * 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; - } - } - - public static final int IP_ADDRESS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object ipAddress_ = ""; - - /** - * - * - *
-   * Output only. IP address rule created by the PSC service automation.
-   * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The ipAddress. - */ - @java.lang.Override - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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(); - ipAddress_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. IP address rule created by the PSC service automation.
-   * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORWARDING_RULE_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object forwardingRule_ = ""; - - /** - * - * - *
-   * Output only. Forwarding rule created by the PSC service automation.
-   * 
- * - * string forwarding_rule = 4 [(.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. Forwarding rule created by the PSC service automation.
-   * 
- * - * string forwarding_rule = 4 [(.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 STATE_FIELD_NUMBER = 5; - private int state_ = 0; - - /** - * - * - *
-   * Output only. The state of the PSC service automation.
-   * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.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 state of the PSC service automation.
-   * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationState getState() { - com.google.cloud.vertexai.api.PSCAutomationState result = - com.google.cloud.vertexai.api.PSCAutomationState.forNumber(state_); - return result == null ? com.google.cloud.vertexai.api.PSCAutomationState.UNRECOGNIZED : result; - } - - public static final int ERROR_MESSAGE_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object errorMessage_ = ""; - - /** - * - * - *
-   * Output only. Error message if the PSC service automation failed.
-   * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-   * Output only. Error message if the PSC service automation failed.
-   * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.GeneratedMessage.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, ipAddress_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(forwardingRule_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, forwardingRule_); - } - if (state_ - != com.google.cloud.vertexai.api.PSCAutomationState.PSC_AUTOMATION_STATE_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, errorMessage_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ipAddress_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(forwardingRule_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, forwardingRule_); - } - if (state_ - != com.google.cloud.vertexai.api.PSCAutomationState.PSC_AUTOMATION_STATE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, 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.vertexai.api.PSCAutomationConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PSCAutomationConfig other = - (com.google.cloud.vertexai.api.PSCAutomationConfig) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getIpAddress().equals(other.getIpAddress())) return false; - if (!getForwardingRule().equals(other.getForwardingRule())) return false; - if (state_ != other.state_) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; - hash = (53 * hash) + getForwardingRule().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - 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.vertexai.api.PSCAutomationConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig 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.vertexai.api.PSCAutomationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig 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.vertexai.api.PSCAutomationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PSCAutomationConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * PSC config that is used to automatically create PSC endpoints in the user
-   * projects.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PSCAutomationConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PSCAutomationConfig) - com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PSCAutomationConfig.class, - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PSCAutomationConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - projectId_ = ""; - network_ = ""; - ipAddress_ = ""; - forwardingRule_ = ""; - state_ = 0; - errorMessage_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PSCAutomationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationConfig build() { - com.google.cloud.vertexai.api.PSCAutomationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationConfig buildPartial() { - com.google.cloud.vertexai.api.PSCAutomationConfig result = - new com.google.cloud.vertexai.api.PSCAutomationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PSCAutomationConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.ipAddress_ = ipAddress_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.forwardingRule_ = forwardingRule_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.errorMessage_ = errorMessage_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PSCAutomationConfig) { - return mergeFrom((com.google.cloud.vertexai.api.PSCAutomationConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PSCAutomationConfig other) { - if (other == com.google.cloud.vertexai.api.PSCAutomationConfig.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getForwardingRule().isEmpty()) { - forwardingRule_ = other.forwardingRule_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getErrorMessage().isEmpty()) { - errorMessage_ = other.errorMessage_; - bitField0_ |= 0x00000020; - 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: - { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - ipAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - forwardingRule_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 50: - { - errorMessage_ = 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 bitField0_; - - private java.lang.Object projectId_ = ""; - - /** - * - * - *
-     * Required. Project id used to create forwarding rule.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. Project id used to create forwarding rule.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. Project id used to create forwarding rule.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Project id used to create forwarding rule.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Project id used to create forwarding rule.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object network_ = ""; - - /** - * - * - *
-     * Required. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-     * `projects/{project}/global/networks/{network}`.
-     * 
- * - * 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 full name of the Google Compute Engine
-     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-     * `projects/{project}/global/networks/{network}`.
-     * 
- * - * 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 full name of the Google Compute Engine
-     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-     * `projects/{project}/global/networks/{network}`.
-     * 
- * - * 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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-     * `projects/{project}/global/networks/{network}`.
-     * 
- * - * string network = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The full name of the Google Compute Engine
-     * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-     * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-     * `projects/{project}/global/networks/{network}`.
-     * 
- * - * 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_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object ipAddress_ = ""; - - /** - * - * - *
-     * Output only. IP address rule created by the PSC service automation.
-     * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The ipAddress. - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. IP address rule created by the PSC service automation.
-     * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for ipAddress. - */ - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. IP address rule created by the PSC service automation.
-     * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ipAddress_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. IP address rule created by the PSC service automation.
-     * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearIpAddress() { - ipAddress_ = getDefaultInstance().getIpAddress(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. IP address rule created by the PSC service automation.
-     * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ipAddress_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object forwardingRule_ = ""; - - /** - * - * - *
-     * Output only. Forwarding rule created by the PSC service automation.
-     * 
- * - * string forwarding_rule = 4 [(.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. Forwarding rule created by the PSC service automation.
-     * 
- * - * string forwarding_rule = 4 [(.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. Forwarding rule created by the PSC service automation.
-     * 
- * - * string forwarding_rule = 4 [(.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_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Forwarding rule created by the PSC service automation.
-     * 
- * - * string forwarding_rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearForwardingRule() { - forwardingRule_ = getDefaultInstance().getForwardingRule(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Forwarding rule created by the PSC service automation.
-     * 
- * - * string forwarding_rule = 4 [(.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_ |= 0x00000008; - onChanged(); - return this; - } - - private int state_ = 0; - - /** - * - * - *
-     * Output only. The state of the PSC service automation.
-     * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.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 state of the PSC service automation.
-     * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.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_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The state of the PSC service automation.
-     * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationState getState() { - com.google.cloud.vertexai.api.PSCAutomationState result = - com.google.cloud.vertexai.api.PSCAutomationState.forNumber(state_); - return result == null - ? com.google.cloud.vertexai.api.PSCAutomationState.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. The state of the PSC service automation.
-     * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vertexai.api.PSCAutomationState value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - state_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The state of the PSC service automation.
-     * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000010); - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object errorMessage_ = ""; - - /** - * - * - *
-     * Output only. Error message if the PSC service automation failed.
-     * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-     * Output only. Error message if the PSC service automation failed.
-     * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - - /** - * - * - *
-     * Output only. Error message if the PSC service automation failed.
-     * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Error message if the PSC service automation failed.
-     * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearErrorMessage() { - errorMessage_ = getDefaultInstance().getErrorMessage(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Error message if the PSC service automation failed.
-     * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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_ |= 0x00000020; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PSCAutomationConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PSCAutomationConfig) - private static final com.google.cloud.vertexai.api.PSCAutomationConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PSCAutomationConfig(); - } - - public static com.google.cloud.vertexai.api.PSCAutomationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PSCAutomationConfig 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.vertexai.api.PSCAutomationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfigOrBuilder.java deleted file mode 100644 index eaf3b30f08ed..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationConfigOrBuilder.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PSCAutomationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PSCAutomationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project id used to create forwarding rule.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - - /** - * - * - *
-   * Required. Project id used to create forwarding rule.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-   * `projects/{project}/global/networks/{network}`.
-   * 
- * - * string network = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The network. - */ - java.lang.String getNetwork(); - - /** - * - * - *
-   * Required. The full name of the Google Compute Engine
-   * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
-   * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
-   * `projects/{project}/global/networks/{network}`.
-   * 
- * - * string network = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Output only. IP address rule created by the PSC service automation.
-   * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The ipAddress. - */ - java.lang.String getIpAddress(); - - /** - * - * - *
-   * Output only. IP address rule created by the PSC service automation.
-   * 
- * - * string ip_address = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for ipAddress. - */ - com.google.protobuf.ByteString getIpAddressBytes(); - - /** - * - * - *
-   * Output only. Forwarding rule created by the PSC service automation.
-   * 
- * - * string forwarding_rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The forwardingRule. - */ - java.lang.String getForwardingRule(); - - /** - * - * - *
-   * Output only. Forwarding rule created by the PSC service automation.
-   * 
- * - * string forwarding_rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for forwardingRule. - */ - com.google.protobuf.ByteString getForwardingRuleBytes(); - - /** - * - * - *
-   * Output only. The state of the PSC service automation.
-   * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - - /** - * - * - *
-   * Output only. The state of the PSC service automation.
-   * 
- * - * - * .google.cloud.vertexai.v1.PSCAutomationState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.vertexai.api.PSCAutomationState getState(); - - /** - * - * - *
-   * Output only. Error message if the PSC service automation failed.
-   * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The errorMessage. - */ - java.lang.String getErrorMessage(); - - /** - * - * - *
-   * Output only. Error message if the PSC service automation failed.
-   * 
- * - * string error_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for errorMessage. - */ - com.google.protobuf.ByteString getErrorMessageBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationState.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationState.java deleted file mode 100644 index eaed231081c4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PSCAutomationState.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The state of the PSC service automation.
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.PSCAutomationState} - */ -@com.google.protobuf.Generated -public enum PSCAutomationState implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Should not be used.
-   * 
- * - * PSC_AUTOMATION_STATE_UNSPECIFIED = 0; - */ - PSC_AUTOMATION_STATE_UNSPECIFIED(0), - /** - * - * - *
-   * The PSC service automation is successful.
-   * 
- * - * PSC_AUTOMATION_STATE_SUCCESSFUL = 1; - */ - PSC_AUTOMATION_STATE_SUCCESSFUL(1), - /** - * - * - *
-   * The PSC service automation has failed.
-   * 
- * - * PSC_AUTOMATION_STATE_FAILED = 2; - */ - PSC_AUTOMATION_STATE_FAILED(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PSCAutomationState"); - } - - /** - * - * - *
-   * Should not be used.
-   * 
- * - * PSC_AUTOMATION_STATE_UNSPECIFIED = 0; - */ - public static final int PSC_AUTOMATION_STATE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * The PSC service automation is successful.
-   * 
- * - * PSC_AUTOMATION_STATE_SUCCESSFUL = 1; - */ - public static final int PSC_AUTOMATION_STATE_SUCCESSFUL_VALUE = 1; - - /** - * - * - *
-   * The PSC service automation has failed.
-   * 
- * - * PSC_AUTOMATION_STATE_FAILED = 2; - */ - public static final int PSC_AUTOMATION_STATE_FAILED_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 PSCAutomationState 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 PSCAutomationState forNumber(int value) { - switch (value) { - case 0: - return PSC_AUTOMATION_STATE_UNSPECIFIED; - case 1: - return PSC_AUTOMATION_STATE_SUCCESSFUL; - case 2: - return PSC_AUTOMATION_STATE_FAILED; - 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 PSCAutomationState findValueByNumber(int number) { - return PSCAutomationState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final PSCAutomationState[] VALUES = values(); - - public static PSCAutomationState 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 PSCAutomationState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.PSCAutomationState) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java deleted file mode 100644 index 2a91b33c9631..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java +++ /dev/null @@ -1,3406 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A datatype containing media that is part of a multi-part `Content` message.
- *
- * A `Part` consists of data which has an associated datatype. A `Part` can only
- * contain one of the accepted types in `Part.data`.
- *
- * A `Part` must have a fixed IANA MIME type identifying the type and subtype
- * of the media if `inline_data` or `file_data` field is filled with raw bytes.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Part} - */ -@com.google.protobuf.Generated -public final class Part extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Part) - PartOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Part"); - } - - // Use Part.newBuilder() to construct. - private Part(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Part() { - thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Part_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Part_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Part.class, - com.google.cloud.vertexai.api.Part.Builder.class); - } - - 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 { - TEXT(1), - INLINE_DATA(2), - FILE_DATA(3), - FUNCTION_CALL(5), - FUNCTION_RESPONSE(6), - EXECUTABLE_CODE(8), - CODE_EXECUTION_RESULT(9), - 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 1: - return TEXT; - case 2: - return INLINE_DATA; - case 3: - return FILE_DATA; - case 5: - return FUNCTION_CALL; - case 6: - return FUNCTION_RESPONSE; - case 8: - return EXECUTABLE_CODE; - case 9: - return CODE_EXECUTION_RESULT; - case 0: - return DATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DataCase getDataCase() { - return DataCase.forNumber(dataCase_); - } - - private int metadataCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object metadata_; - - public enum MetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VIDEO_METADATA(4), - METADATA_NOT_SET(0); - private final int value; - - private MetadataCase(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 MetadataCase valueOf(int value) { - return forNumber(value); - } - - public static MetadataCase forNumber(int value) { - switch (value) { - case 4: - return VIDEO_METADATA; - case 0: - return METADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public static final int TEXT_FIELD_NUMBER = 1; - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the text field is set. - */ - public boolean hasText() { - return dataCase_ == 1; - } - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - 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_ == 1) { - data_ = s; - } - return s; - } - } - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - ref = data_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (dataCase_ == 1) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INLINE_DATA_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the inlineData field is set. - */ - @java.lang.Override - public boolean hasInlineData() { - return dataCase_ == 2; - } - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The inlineData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Blob getInlineData() { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.Blob) data_; - } - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlobOrBuilder getInlineDataOrBuilder() { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.Blob) data_; - } - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - - public static final int FILE_DATA_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the fileData field is set. - */ - @java.lang.Override - public boolean hasFileData() { - return dataCase_ == 3; - } - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The fileData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileData getFileData() { - if (dataCase_ == 3) { - return (com.google.cloud.vertexai.api.FileData) data_; - } - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileDataOrBuilder getFileDataOrBuilder() { - if (dataCase_ == 3) { - return (com.google.cloud.vertexai.api.FileData) data_; - } - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - - public static final int FUNCTION_CALL_FIELD_NUMBER = 5; - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCall field is set. - */ - @java.lang.Override - public boolean hasFunctionCall() { - return dataCase_ == 5; - } - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCall. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCall getFunctionCall() { - if (dataCase_ == 5) { - return (com.google.cloud.vertexai.api.FunctionCall) data_; - } - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallOrBuilder getFunctionCallOrBuilder() { - if (dataCase_ == 5) { - return (com.google.cloud.vertexai.api.FunctionCall) data_; - } - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - - public static final int FUNCTION_RESPONSE_FIELD_NUMBER = 6; - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionResponse field is set. - */ - @java.lang.Override - public boolean hasFunctionResponse() { - return dataCase_ == 6; - } - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionResponse. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponse getFunctionResponse() { - if (dataCase_ == 6) { - return (com.google.cloud.vertexai.api.FunctionResponse) data_; - } - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseOrBuilder getFunctionResponseOrBuilder() { - if (dataCase_ == 6) { - return (com.google.cloud.vertexai.api.FunctionResponse) data_; - } - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - - public static final int EXECUTABLE_CODE_FIELD_NUMBER = 8; - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executableCode field is set. - */ - @java.lang.Override - public boolean hasExecutableCode() { - return dataCase_ == 8; - } - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executableCode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode getExecutableCode() { - if (dataCase_ == 8) { - return (com.google.cloud.vertexai.api.ExecutableCode) data_; - } - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCodeOrBuilder getExecutableCodeOrBuilder() { - if (dataCase_ == 8) { - return (com.google.cloud.vertexai.api.ExecutableCode) data_; - } - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - - public static final int CODE_EXECUTION_RESULT_FIELD_NUMBER = 9; - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecutionResult field is set. - */ - @java.lang.Override - public boolean hasCodeExecutionResult() { - return dataCase_ == 9; - } - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecutionResult. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult getCodeExecutionResult() { - if (dataCase_ == 9) { - return (com.google.cloud.vertexai.api.CodeExecutionResult) data_; - } - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder - getCodeExecutionResultOrBuilder() { - if (dataCase_ == 9) { - return (com.google.cloud.vertexai.api.CodeExecutionResult) data_; - } - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - - public static final int THOUGHT_FIELD_NUMBER = 10; - private boolean thought_ = false; - - /** - * - * - *
-   * Indicates if the part is thought from the model.
-   * 
- * - * bool thought = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thought. - */ - @java.lang.Override - public boolean getThought() { - return thought_; - } - - public static final int THOUGHT_SIGNATURE_FIELD_NUMBER = 11; - private com.google.protobuf.ByteString thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * An opaque signature for the thought so it can be reused in subsequent
-   * requests.
-   * 
- * - * bytes thought_signature = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thoughtSignature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getThoughtSignature() { - return thoughtSignature_; - } - - public static final int VIDEO_METADATA_FIELD_NUMBER = 4; - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the videoMetadata field is set. - */ - @java.lang.Override - public boolean hasVideoMetadata() { - return metadataCase_ == 4; - } - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The videoMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadata getVideoMetadata() { - if (metadataCase_ == 4) { - return (com.google.cloud.vertexai.api.VideoMetadata) metadata_; - } - return com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadataOrBuilder getVideoMetadataOrBuilder() { - if (metadataCase_ == 4) { - return (com.google.cloud.vertexai.api.VideoMetadata) metadata_; - } - return com.google.cloud.vertexai.api.VideoMetadata.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 (dataCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, data_); - } - if (dataCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.Blob) data_); - } - if (dataCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.FileData) data_); - } - if (metadataCase_ == 4) { - output.writeMessage(4, (com.google.cloud.vertexai.api.VideoMetadata) metadata_); - } - if (dataCase_ == 5) { - output.writeMessage(5, (com.google.cloud.vertexai.api.FunctionCall) data_); - } - if (dataCase_ == 6) { - output.writeMessage(6, (com.google.cloud.vertexai.api.FunctionResponse) data_); - } - if (dataCase_ == 8) { - output.writeMessage(8, (com.google.cloud.vertexai.api.ExecutableCode) data_); - } - if (dataCase_ == 9) { - output.writeMessage(9, (com.google.cloud.vertexai.api.CodeExecutionResult) data_); - } - if (thought_ != false) { - output.writeBool(10, thought_); - } - if (!thoughtSignature_.isEmpty()) { - output.writeBytes(11, thoughtSignature_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, data_); - } - if (dataCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.Blob) data_); - } - if (dataCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.FileData) data_); - } - if (metadataCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.VideoMetadata) metadata_); - } - if (dataCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.vertexai.api.FunctionCall) data_); - } - if (dataCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.vertexai.api.FunctionResponse) data_); - } - if (dataCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.vertexai.api.ExecutableCode) data_); - } - if (dataCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, (com.google.cloud.vertexai.api.CodeExecutionResult) data_); - } - if (thought_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, thought_); - } - if (!thoughtSignature_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(11, thoughtSignature_); - } - 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.vertexai.api.Part)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Part other = (com.google.cloud.vertexai.api.Part) obj; - - if (getThought() != other.getThought()) return false; - if (!getThoughtSignature().equals(other.getThoughtSignature())) return false; - if (!getDataCase().equals(other.getDataCase())) return false; - switch (dataCase_) { - case 1: - if (!getText().equals(other.getText())) return false; - break; - case 2: - if (!getInlineData().equals(other.getInlineData())) return false; - break; - case 3: - if (!getFileData().equals(other.getFileData())) return false; - break; - case 5: - if (!getFunctionCall().equals(other.getFunctionCall())) return false; - break; - case 6: - if (!getFunctionResponse().equals(other.getFunctionResponse())) return false; - break; - case 8: - if (!getExecutableCode().equals(other.getExecutableCode())) return false; - break; - case 9: - if (!getCodeExecutionResult().equals(other.getCodeExecutionResult())) return false; - break; - case 0: - default: - } - if (!getMetadataCase().equals(other.getMetadataCase())) return false; - switch (metadataCase_) { - case 4: - if (!getVideoMetadata().equals(other.getVideoMetadata())) 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) + THOUGHT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getThought()); - hash = (37 * hash) + THOUGHT_SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getThoughtSignature().hashCode(); - switch (dataCase_) { - case 1: - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - break; - case 2: - hash = (37 * hash) + INLINE_DATA_FIELD_NUMBER; - hash = (53 * hash) + getInlineData().hashCode(); - break; - case 3: - hash = (37 * hash) + FILE_DATA_FIELD_NUMBER; - hash = (53 * hash) + getFileData().hashCode(); - break; - case 5: - hash = (37 * hash) + FUNCTION_CALL_FIELD_NUMBER; - hash = (53 * hash) + getFunctionCall().hashCode(); - break; - case 6: - hash = (37 * hash) + FUNCTION_RESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getFunctionResponse().hashCode(); - break; - case 8: - hash = (37 * hash) + EXECUTABLE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getExecutableCode().hashCode(); - break; - case 9: - hash = (37 * hash) + CODE_EXECUTION_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getCodeExecutionResult().hashCode(); - break; - case 0: - default: - } - switch (metadataCase_) { - case 4: - hash = (37 * hash) + VIDEO_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getVideoMetadata().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Part parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Part 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.vertexai.api.Part parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Part 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.vertexai.api.Part parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Part parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Part parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Part parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Part parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Part parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Part parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Part parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Part 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A datatype containing media that is part of a multi-part `Content` message.
-   *
-   * A `Part` consists of data which has an associated datatype. A `Part` can only
-   * contain one of the accepted types in `Part.data`.
-   *
-   * A `Part` must have a fixed IANA MIME type identifying the type and subtype
-   * of the media if `inline_data` or `file_data` field is filled with raw bytes.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Part} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Part) - com.google.cloud.vertexai.api.PartOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Part_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Part_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Part.class, - com.google.cloud.vertexai.api.Part.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Part.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (inlineDataBuilder_ != null) { - inlineDataBuilder_.clear(); - } - if (fileDataBuilder_ != null) { - fileDataBuilder_.clear(); - } - if (functionCallBuilder_ != null) { - functionCallBuilder_.clear(); - } - if (functionResponseBuilder_ != null) { - functionResponseBuilder_.clear(); - } - if (executableCodeBuilder_ != null) { - executableCodeBuilder_.clear(); - } - if (codeExecutionResultBuilder_ != null) { - codeExecutionResultBuilder_.clear(); - } - thought_ = false; - thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; - if (videoMetadataBuilder_ != null) { - videoMetadataBuilder_.clear(); - } - dataCase_ = 0; - data_ = null; - metadataCase_ = 0; - metadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Part_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Part getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Part.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Part build() { - com.google.cloud.vertexai.api.Part result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Part buildPartial() { - com.google.cloud.vertexai.api.Part result = new com.google.cloud.vertexai.api.Part(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Part result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000080) != 0)) { - result.thought_ = thought_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.thoughtSignature_ = thoughtSignature_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.Part result) { - result.dataCase_ = dataCase_; - result.data_ = this.data_; - if (dataCase_ == 2 && inlineDataBuilder_ != null) { - result.data_ = inlineDataBuilder_.build(); - } - if (dataCase_ == 3 && fileDataBuilder_ != null) { - result.data_ = fileDataBuilder_.build(); - } - if (dataCase_ == 5 && functionCallBuilder_ != null) { - result.data_ = functionCallBuilder_.build(); - } - if (dataCase_ == 6 && functionResponseBuilder_ != null) { - result.data_ = functionResponseBuilder_.build(); - } - if (dataCase_ == 8 && executableCodeBuilder_ != null) { - result.data_ = executableCodeBuilder_.build(); - } - if (dataCase_ == 9 && codeExecutionResultBuilder_ != null) { - result.data_ = codeExecutionResultBuilder_.build(); - } - result.metadataCase_ = metadataCase_; - result.metadata_ = this.metadata_; - if (metadataCase_ == 4 && videoMetadataBuilder_ != null) { - result.metadata_ = videoMetadataBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Part) { - return mergeFrom((com.google.cloud.vertexai.api.Part) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Part other) { - if (other == com.google.cloud.vertexai.api.Part.getDefaultInstance()) return this; - if (other.getThought() != false) { - setThought(other.getThought()); - } - if (!other.getThoughtSignature().isEmpty()) { - setThoughtSignature(other.getThoughtSignature()); - } - switch (other.getDataCase()) { - case TEXT: - { - dataCase_ = 1; - data_ = other.data_; - onChanged(); - break; - } - case INLINE_DATA: - { - mergeInlineData(other.getInlineData()); - break; - } - case FILE_DATA: - { - mergeFileData(other.getFileData()); - break; - } - case FUNCTION_CALL: - { - mergeFunctionCall(other.getFunctionCall()); - break; - } - case FUNCTION_RESPONSE: - { - mergeFunctionResponse(other.getFunctionResponse()); - break; - } - case EXECUTABLE_CODE: - { - mergeExecutableCode(other.getExecutableCode()); - break; - } - case CODE_EXECUTION_RESULT: - { - mergeCodeExecutionResult(other.getCodeExecutionResult()); - break; - } - case DATA_NOT_SET: - { - break; - } - } - switch (other.getMetadataCase()) { - case VIDEO_METADATA: - { - mergeVideoMetadata(other.getVideoMetadata()); - break; - } - case METADATA_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(); - dataCase_ = 1; - data_ = s; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetInlineDataFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetFileDataFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetVideoMetadataFieldBuilder().getBuilder(), extensionRegistry); - metadataCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetFunctionCallFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 5; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetFunctionResponseFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 6; - break; - } // case 50 - case 66: - { - input.readMessage( - internalGetExecutableCodeFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetCodeExecutionResultFieldBuilder().getBuilder(), extensionRegistry); - dataCase_ = 9; - break; - } // case 74 - case 80: - { - thought_ = input.readBool(); - bitField0_ |= 0x00000080; - break; - } // case 80 - case 90: - { - thoughtSignature_ = input.readBytes(); - bitField0_ |= 0x00000100; - break; - } // case 90 - 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 metadataCase_ = 0; - private java.lang.Object metadata_; - - public MetadataCase getMetadataCase() { - return MetadataCase.forNumber(metadataCase_); - } - - public Builder clearMetadata() { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the text field is set. - */ - @java.lang.Override - public boolean hasText() { - return dataCase_ == 1; - } - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - 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_ == 1) { - data_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = ""; - if (dataCase_ == 1) { - ref = data_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (dataCase_ == 1) { - data_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dataCase_ = 1; - data_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearText() { - if (dataCase_ == 1) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Text part (can be code).
-     * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dataCase_ = 1; - data_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Blob, - com.google.cloud.vertexai.api.Blob.Builder, - com.google.cloud.vertexai.api.BlobOrBuilder> - inlineDataBuilder_; - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the inlineData field is set. - */ - @java.lang.Override - public boolean hasInlineData() { - return dataCase_ == 2; - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The inlineData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Blob getInlineData() { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.Blob) data_; - } - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } else { - if (dataCase_ == 2) { - return inlineDataBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInlineData(com.google.cloud.vertexai.api.Blob value) { - if (inlineDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - inlineDataBuilder_.setMessage(value); - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInlineData(com.google.cloud.vertexai.api.Blob.Builder builderForValue) { - if (inlineDataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - inlineDataBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeInlineData(com.google.cloud.vertexai.api.Blob value) { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 2 && data_ != com.google.cloud.vertexai.api.Blob.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.Blob.newBuilder( - (com.google.cloud.vertexai.api.Blob) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 2) { - inlineDataBuilder_.mergeFrom(value); - } else { - inlineDataBuilder_.setMessage(value); - } - } - dataCase_ = 2; - return this; - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearInlineData() { - if (inlineDataBuilder_ == null) { - if (dataCase_ == 2) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 2) { - dataCase_ = 0; - data_ = null; - } - inlineDataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Blob.Builder getInlineDataBuilder() { - return internalGetInlineDataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlobOrBuilder getInlineDataOrBuilder() { - if ((dataCase_ == 2) && (inlineDataBuilder_ != null)) { - return inlineDataBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 2) { - return (com.google.cloud.vertexai.api.Blob) data_; - } - return com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Inlined bytes data.
-     * 
- * - * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Blob, - com.google.cloud.vertexai.api.Blob.Builder, - com.google.cloud.vertexai.api.BlobOrBuilder> - internalGetInlineDataFieldBuilder() { - if (inlineDataBuilder_ == null) { - if (!(dataCase_ == 2)) { - data_ = com.google.cloud.vertexai.api.Blob.getDefaultInstance(); - } - inlineDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Blob, - com.google.cloud.vertexai.api.Blob.Builder, - com.google.cloud.vertexai.api.BlobOrBuilder>( - (com.google.cloud.vertexai.api.Blob) data_, getParentForChildren(), isClean()); - data_ = null; - } - dataCase_ = 2; - onChanged(); - return inlineDataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileData, - com.google.cloud.vertexai.api.FileData.Builder, - com.google.cloud.vertexai.api.FileDataOrBuilder> - fileDataBuilder_; - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the fileData field is set. - */ - @java.lang.Override - public boolean hasFileData() { - return dataCase_ == 3; - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The fileData. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileData getFileData() { - if (fileDataBuilder_ == null) { - if (dataCase_ == 3) { - return (com.google.cloud.vertexai.api.FileData) data_; - } - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } else { - if (dataCase_ == 3) { - return fileDataBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFileData(com.google.cloud.vertexai.api.FileData value) { - if (fileDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - fileDataBuilder_.setMessage(value); - } - dataCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFileData(com.google.cloud.vertexai.api.FileData.Builder builderForValue) { - if (fileDataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - fileDataBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFileData(com.google.cloud.vertexai.api.FileData value) { - if (fileDataBuilder_ == null) { - if (dataCase_ == 3 - && data_ != com.google.cloud.vertexai.api.FileData.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.FileData.newBuilder( - (com.google.cloud.vertexai.api.FileData) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 3) { - fileDataBuilder_.mergeFrom(value); - } else { - fileDataBuilder_.setMessage(value); - } - } - dataCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFileData() { - if (fileDataBuilder_ == null) { - if (dataCase_ == 3) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 3) { - dataCase_ = 0; - data_ = null; - } - fileDataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FileData.Builder getFileDataBuilder() { - return internalGetFileDataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileDataOrBuilder getFileDataOrBuilder() { - if ((dataCase_ == 3) && (fileDataBuilder_ != null)) { - return fileDataBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 3) { - return (com.google.cloud.vertexai.api.FileData) data_; - } - return com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. URI based data.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileData, - com.google.cloud.vertexai.api.FileData.Builder, - com.google.cloud.vertexai.api.FileDataOrBuilder> - internalGetFileDataFieldBuilder() { - if (fileDataBuilder_ == null) { - if (!(dataCase_ == 3)) { - data_ = com.google.cloud.vertexai.api.FileData.getDefaultInstance(); - } - fileDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileData, - com.google.cloud.vertexai.api.FileData.Builder, - com.google.cloud.vertexai.api.FileDataOrBuilder>( - (com.google.cloud.vertexai.api.FileData) data_, getParentForChildren(), isClean()); - data_ = null; - } - dataCase_ = 3; - onChanged(); - return fileDataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCall, - com.google.cloud.vertexai.api.FunctionCall.Builder, - com.google.cloud.vertexai.api.FunctionCallOrBuilder> - functionCallBuilder_; - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCall field is set. - */ - @java.lang.Override - public boolean hasFunctionCall() { - return dataCase_ == 5; - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCall. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCall getFunctionCall() { - if (functionCallBuilder_ == null) { - if (dataCase_ == 5) { - return (com.google.cloud.vertexai.api.FunctionCall) data_; - } - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } else { - if (dataCase_ == 5) { - return functionCallBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionCall(com.google.cloud.vertexai.api.FunctionCall value) { - if (functionCallBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - functionCallBuilder_.setMessage(value); - } - dataCase_ = 5; - return this; - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionCall( - com.google.cloud.vertexai.api.FunctionCall.Builder builderForValue) { - if (functionCallBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - functionCallBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 5; - return this; - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFunctionCall(com.google.cloud.vertexai.api.FunctionCall value) { - if (functionCallBuilder_ == null) { - if (dataCase_ == 5 - && data_ != com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.FunctionCall.newBuilder( - (com.google.cloud.vertexai.api.FunctionCall) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 5) { - functionCallBuilder_.mergeFrom(value); - } else { - functionCallBuilder_.setMessage(value); - } - } - dataCase_ = 5; - return this; - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFunctionCall() { - if (functionCallBuilder_ == null) { - if (dataCase_ == 5) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 5) { - dataCase_ = 0; - data_ = null; - } - functionCallBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionCall.Builder getFunctionCallBuilder() { - return internalGetFunctionCallFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallOrBuilder getFunctionCallOrBuilder() { - if ((dataCase_ == 5) && (functionCallBuilder_ != null)) { - return functionCallBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 5) { - return (com.google.cloud.vertexai.api.FunctionCall) data_; - } - return com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. A predicted [FunctionCall] returned from the model that
-     * contains a string representing the [FunctionDeclaration.name] with the
-     * parameters and their values.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCall, - com.google.cloud.vertexai.api.FunctionCall.Builder, - com.google.cloud.vertexai.api.FunctionCallOrBuilder> - internalGetFunctionCallFieldBuilder() { - if (functionCallBuilder_ == null) { - if (!(dataCase_ == 5)) { - data_ = com.google.cloud.vertexai.api.FunctionCall.getDefaultInstance(); - } - functionCallBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCall, - com.google.cloud.vertexai.api.FunctionCall.Builder, - com.google.cloud.vertexai.api.FunctionCallOrBuilder>( - (com.google.cloud.vertexai.api.FunctionCall) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 5; - onChanged(); - return functionCallBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponse, - com.google.cloud.vertexai.api.FunctionResponse.Builder, - com.google.cloud.vertexai.api.FunctionResponseOrBuilder> - functionResponseBuilder_; - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionResponse field is set. - */ - @java.lang.Override - public boolean hasFunctionResponse() { - return dataCase_ == 6; - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionResponse. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponse getFunctionResponse() { - if (functionResponseBuilder_ == null) { - if (dataCase_ == 6) { - return (com.google.cloud.vertexai.api.FunctionResponse) data_; - } - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } else { - if (dataCase_ == 6) { - return functionResponseBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionResponse(com.google.cloud.vertexai.api.FunctionResponse value) { - if (functionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - functionResponseBuilder_.setMessage(value); - } - dataCase_ = 6; - return this; - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionResponse( - com.google.cloud.vertexai.api.FunctionResponse.Builder builderForValue) { - if (functionResponseBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - functionResponseBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 6; - return this; - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFunctionResponse(com.google.cloud.vertexai.api.FunctionResponse value) { - if (functionResponseBuilder_ == null) { - if (dataCase_ == 6 - && data_ != com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.FunctionResponse.newBuilder( - (com.google.cloud.vertexai.api.FunctionResponse) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 6) { - functionResponseBuilder_.mergeFrom(value); - } else { - functionResponseBuilder_.setMessage(value); - } - } - dataCase_ = 6; - return this; - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFunctionResponse() { - if (functionResponseBuilder_ == null) { - if (dataCase_ == 6) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 6) { - dataCase_ = 0; - data_ = null; - } - functionResponseBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionResponse.Builder getFunctionResponseBuilder() { - return internalGetFunctionResponseFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionResponseOrBuilder getFunctionResponseOrBuilder() { - if ((dataCase_ == 6) && (functionResponseBuilder_ != null)) { - return functionResponseBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 6) { - return (com.google.cloud.vertexai.api.FunctionResponse) data_; - } - return com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. The result output of a [FunctionCall] that contains a string
-     * representing the [FunctionDeclaration.name] and a structured JSON object
-     * containing any output from the function call. It is used as context to
-     * the model.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponse, - com.google.cloud.vertexai.api.FunctionResponse.Builder, - com.google.cloud.vertexai.api.FunctionResponseOrBuilder> - internalGetFunctionResponseFieldBuilder() { - if (functionResponseBuilder_ == null) { - if (!(dataCase_ == 6)) { - data_ = com.google.cloud.vertexai.api.FunctionResponse.getDefaultInstance(); - } - functionResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionResponse, - com.google.cloud.vertexai.api.FunctionResponse.Builder, - com.google.cloud.vertexai.api.FunctionResponseOrBuilder>( - (com.google.cloud.vertexai.api.FunctionResponse) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 6; - onChanged(); - return functionResponseBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExecutableCode, - com.google.cloud.vertexai.api.ExecutableCode.Builder, - com.google.cloud.vertexai.api.ExecutableCodeOrBuilder> - executableCodeBuilder_; - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executableCode field is set. - */ - @java.lang.Override - public boolean hasExecutableCode() { - return dataCase_ == 8; - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executableCode. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCode getExecutableCode() { - if (executableCodeBuilder_ == null) { - if (dataCase_ == 8) { - return (com.google.cloud.vertexai.api.ExecutableCode) data_; - } - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } else { - if (dataCase_ == 8) { - return executableCodeBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutableCode(com.google.cloud.vertexai.api.ExecutableCode value) { - if (executableCodeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - executableCodeBuilder_.setMessage(value); - } - dataCase_ = 8; - return this; - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutableCode( - com.google.cloud.vertexai.api.ExecutableCode.Builder builderForValue) { - if (executableCodeBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - executableCodeBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 8; - return this; - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeExecutableCode(com.google.cloud.vertexai.api.ExecutableCode value) { - if (executableCodeBuilder_ == null) { - if (dataCase_ == 8 - && data_ != com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.ExecutableCode.newBuilder( - (com.google.cloud.vertexai.api.ExecutableCode) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 8) { - executableCodeBuilder_.mergeFrom(value); - } else { - executableCodeBuilder_.setMessage(value); - } - } - dataCase_ = 8; - return this; - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearExecutableCode() { - if (executableCodeBuilder_ == null) { - if (dataCase_ == 8) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 8) { - dataCase_ = 0; - data_ = null; - } - executableCodeBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ExecutableCode.Builder getExecutableCodeBuilder() { - return internalGetExecutableCodeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ExecutableCodeOrBuilder getExecutableCodeOrBuilder() { - if ((dataCase_ == 8) && (executableCodeBuilder_ != null)) { - return executableCodeBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 8) { - return (com.google.cloud.vertexai.api.ExecutableCode) data_; - } - return com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Code generated by the model that is meant to be executed.
-     * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExecutableCode, - com.google.cloud.vertexai.api.ExecutableCode.Builder, - com.google.cloud.vertexai.api.ExecutableCodeOrBuilder> - internalGetExecutableCodeFieldBuilder() { - if (executableCodeBuilder_ == null) { - if (!(dataCase_ == 8)) { - data_ = com.google.cloud.vertexai.api.ExecutableCode.getDefaultInstance(); - } - executableCodeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ExecutableCode, - com.google.cloud.vertexai.api.ExecutableCode.Builder, - com.google.cloud.vertexai.api.ExecutableCodeOrBuilder>( - (com.google.cloud.vertexai.api.ExecutableCode) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 8; - onChanged(); - return executableCodeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CodeExecutionResult, - com.google.cloud.vertexai.api.CodeExecutionResult.Builder, - com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder> - codeExecutionResultBuilder_; - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecutionResult field is set. - */ - @java.lang.Override - public boolean hasCodeExecutionResult() { - return dataCase_ == 9; - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecutionResult. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResult getCodeExecutionResult() { - if (codeExecutionResultBuilder_ == null) { - if (dataCase_ == 9) { - return (com.google.cloud.vertexai.api.CodeExecutionResult) data_; - } - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } else { - if (dataCase_ == 9) { - return codeExecutionResultBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCodeExecutionResult(com.google.cloud.vertexai.api.CodeExecutionResult value) { - if (codeExecutionResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - codeExecutionResultBuilder_.setMessage(value); - } - dataCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCodeExecutionResult( - com.google.cloud.vertexai.api.CodeExecutionResult.Builder builderForValue) { - if (codeExecutionResultBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - codeExecutionResultBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeCodeExecutionResult( - com.google.cloud.vertexai.api.CodeExecutionResult value) { - if (codeExecutionResultBuilder_ == null) { - if (dataCase_ == 9 - && data_ != com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance()) { - data_ = - com.google.cloud.vertexai.api.CodeExecutionResult.newBuilder( - (com.google.cloud.vertexai.api.CodeExecutionResult) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 9) { - codeExecutionResultBuilder_.mergeFrom(value); - } else { - codeExecutionResultBuilder_.setMessage(value); - } - } - dataCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearCodeExecutionResult() { - if (codeExecutionResultBuilder_ == null) { - if (dataCase_ == 9) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 9) { - dataCase_ = 0; - data_ = null; - } - codeExecutionResultBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.CodeExecutionResult.Builder - getCodeExecutionResultBuilder() { - return internalGetCodeExecutionResultFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder - getCodeExecutionResultOrBuilder() { - if ((dataCase_ == 9) && (codeExecutionResultBuilder_ != null)) { - return codeExecutionResultBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 9) { - return (com.google.cloud.vertexai.api.CodeExecutionResult) data_; - } - return com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Result of executing the [ExecutableCode].
-     * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CodeExecutionResult, - com.google.cloud.vertexai.api.CodeExecutionResult.Builder, - com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder> - internalGetCodeExecutionResultFieldBuilder() { - if (codeExecutionResultBuilder_ == null) { - if (!(dataCase_ == 9)) { - data_ = com.google.cloud.vertexai.api.CodeExecutionResult.getDefaultInstance(); - } - codeExecutionResultBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CodeExecutionResult, - com.google.cloud.vertexai.api.CodeExecutionResult.Builder, - com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder>( - (com.google.cloud.vertexai.api.CodeExecutionResult) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 9; - onChanged(); - return codeExecutionResultBuilder_; - } - - private boolean thought_; - - /** - * - * - *
-     * Indicates if the part is thought from the model.
-     * 
- * - * bool thought = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thought. - */ - @java.lang.Override - public boolean getThought() { - return thought_; - } - - /** - * - * - *
-     * Indicates if the part is thought from the model.
-     * 
- * - * bool thought = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The thought to set. - * @return This builder for chaining. - */ - public Builder setThought(boolean value) { - - thought_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Indicates if the part is thought from the model.
-     * 
- * - * bool thought = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearThought() { - bitField0_ = (bitField0_ & ~0x00000080); - thought_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString thoughtSignature_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * An opaque signature for the thought so it can be reused in subsequent
-     * requests.
-     * 
- * - * bytes thought_signature = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thoughtSignature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getThoughtSignature() { - return thoughtSignature_; - } - - /** - * - * - *
-     * An opaque signature for the thought so it can be reused in subsequent
-     * requests.
-     * 
- * - * bytes thought_signature = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The thoughtSignature to set. - * @return This builder for chaining. - */ - public Builder setThoughtSignature(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - thoughtSignature_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * An opaque signature for the thought so it can be reused in subsequent
-     * requests.
-     * 
- * - * bytes thought_signature = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearThoughtSignature() { - bitField0_ = (bitField0_ & ~0x00000100); - thoughtSignature_ = getDefaultInstance().getThoughtSignature(); - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VideoMetadata, - com.google.cloud.vertexai.api.VideoMetadata.Builder, - com.google.cloud.vertexai.api.VideoMetadataOrBuilder> - videoMetadataBuilder_; - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the videoMetadata field is set. - */ - @java.lang.Override - public boolean hasVideoMetadata() { - return metadataCase_ == 4; - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The videoMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadata getVideoMetadata() { - if (videoMetadataBuilder_ == null) { - if (metadataCase_ == 4) { - return (com.google.cloud.vertexai.api.VideoMetadata) metadata_; - } - return com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } else { - if (metadataCase_ == 4) { - return videoMetadataBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setVideoMetadata(com.google.cloud.vertexai.api.VideoMetadata value) { - if (videoMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - videoMetadataBuilder_.setMessage(value); - } - metadataCase_ = 4; - return this; - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setVideoMetadata( - com.google.cloud.vertexai.api.VideoMetadata.Builder builderForValue) { - if (videoMetadataBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - videoMetadataBuilder_.setMessage(builderForValue.build()); - } - metadataCase_ = 4; - return this; - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeVideoMetadata(com.google.cloud.vertexai.api.VideoMetadata value) { - if (videoMetadataBuilder_ == null) { - if (metadataCase_ == 4 - && metadata_ != com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance()) { - metadata_ = - com.google.cloud.vertexai.api.VideoMetadata.newBuilder( - (com.google.cloud.vertexai.api.VideoMetadata) metadata_) - .mergeFrom(value) - .buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - if (metadataCase_ == 4) { - videoMetadataBuilder_.mergeFrom(value); - } else { - videoMetadataBuilder_.setMessage(value); - } - } - metadataCase_ = 4; - return this; - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearVideoMetadata() { - if (videoMetadataBuilder_ == null) { - if (metadataCase_ == 4) { - metadataCase_ = 0; - metadata_ = null; - onChanged(); - } - } else { - if (metadataCase_ == 4) { - metadataCase_ = 0; - metadata_ = null; - } - videoMetadataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VideoMetadata.Builder getVideoMetadataBuilder() { - return internalGetVideoMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadataOrBuilder getVideoMetadataOrBuilder() { - if ((metadataCase_ == 4) && (videoMetadataBuilder_ != null)) { - return videoMetadataBuilder_.getMessageOrBuilder(); - } else { - if (metadataCase_ == 4) { - return (com.google.cloud.vertexai.api.VideoMetadata) metadata_; - } - return com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Video metadata. The metadata should only be specified while the
-     * video data is presented in inline_data or file_data.
-     * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VideoMetadata, - com.google.cloud.vertexai.api.VideoMetadata.Builder, - com.google.cloud.vertexai.api.VideoMetadataOrBuilder> - internalGetVideoMetadataFieldBuilder() { - if (videoMetadataBuilder_ == null) { - if (!(metadataCase_ == 4)) { - metadata_ = com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } - videoMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VideoMetadata, - com.google.cloud.vertexai.api.VideoMetadata.Builder, - com.google.cloud.vertexai.api.VideoMetadataOrBuilder>( - (com.google.cloud.vertexai.api.VideoMetadata) metadata_, - getParentForChildren(), - isClean()); - metadata_ = null; - } - metadataCase_ = 4; - onChanged(); - return videoMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Part) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Part) - private static final com.google.cloud.vertexai.api.Part DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Part(); - } - - public static com.google.cloud.vertexai.api.Part getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Part 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.vertexai.api.Part getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java deleted file mode 100644 index a32748459d68..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PartOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Part) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the text field is set. - */ - boolean hasText(); - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The text. - */ - java.lang.String getText(); - - /** - * - * - *
-   * Optional. Text part (can be code).
-   * 
- * - * string text = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the inlineData field is set. - */ - boolean hasInlineData(); - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The inlineData. - */ - com.google.cloud.vertexai.api.Blob getInlineData(); - - /** - * - * - *
-   * Optional. Inlined bytes data.
-   * 
- * - * .google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.BlobOrBuilder getInlineDataOrBuilder(); - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the fileData field is set. - */ - boolean hasFileData(); - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The fileData. - */ - com.google.cloud.vertexai.api.FileData getFileData(); - - /** - * - * - *
-   * Optional. URI based data.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FileDataOrBuilder getFileDataOrBuilder(); - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCall field is set. - */ - boolean hasFunctionCall(); - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCall. - */ - com.google.cloud.vertexai.api.FunctionCall getFunctionCall(); - - /** - * - * - *
-   * Optional. A predicted [FunctionCall] returned from the model that
-   * contains a string representing the [FunctionDeclaration.name] with the
-   * parameters and their values.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionCallOrBuilder getFunctionCallOrBuilder(); - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionResponse field is set. - */ - boolean hasFunctionResponse(); - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionResponse. - */ - com.google.cloud.vertexai.api.FunctionResponse getFunctionResponse(); - - /** - * - * - *
-   * Optional. The result output of a [FunctionCall] that contains a string
-   * representing the [FunctionDeclaration.name] and a structured JSON object
-   * containing any output from the function call. It is used as context to
-   * the model.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionResponseOrBuilder getFunctionResponseOrBuilder(); - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executableCode field is set. - */ - boolean hasExecutableCode(); - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executableCode. - */ - com.google.cloud.vertexai.api.ExecutableCode getExecutableCode(); - - /** - * - * - *
-   * Optional. Code generated by the model that is meant to be executed.
-   * 
- * - * - * .google.cloud.vertexai.v1.ExecutableCode executable_code = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ExecutableCodeOrBuilder getExecutableCodeOrBuilder(); - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecutionResult field is set. - */ - boolean hasCodeExecutionResult(); - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecutionResult. - */ - com.google.cloud.vertexai.api.CodeExecutionResult getCodeExecutionResult(); - - /** - * - * - *
-   * Optional. Result of executing the [ExecutableCode].
-   * 
- * - * - * .google.cloud.vertexai.v1.CodeExecutionResult code_execution_result = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.CodeExecutionResultOrBuilder getCodeExecutionResultOrBuilder(); - - /** - * - * - *
-   * Indicates if the part is thought from the model.
-   * 
- * - * bool thought = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thought. - */ - boolean getThought(); - - /** - * - * - *
-   * An opaque signature for the thought so it can be reused in subsequent
-   * requests.
-   * 
- * - * bytes thought_signature = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The thoughtSignature. - */ - com.google.protobuf.ByteString getThoughtSignature(); - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the videoMetadata field is set. - */ - boolean hasVideoMetadata(); - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The videoMetadata. - */ - com.google.cloud.vertexai.api.VideoMetadata getVideoMetadata(); - - /** - * - * - *
-   * Optional. Video metadata. The metadata should only be specified while the
-   * video data is presented in inline_data or file_data.
-   * 
- * - * - * .google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.VideoMetadataOrBuilder getVideoMetadataOrBuilder(); - - com.google.cloud.vertexai.api.Part.DataCase getDataCase(); - - com.google.cloud.vertexai.api.Part.MetadataCase getMetadataCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArg.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArg.java deleted file mode 100644 index aa63c8c0ecff..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArg.java +++ /dev/null @@ -1,1521 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Partial argument value of the function call.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PartialArg} - */ -@com.google.protobuf.Generated -public final class PartialArg extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PartialArg) - PartialArgOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PartialArg"); - } - - // Use PartialArg.newBuilder() to construct. - private PartialArg(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PartialArg() { - jsonPath_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_PartialArg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_PartialArg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PartialArg.class, - com.google.cloud.vertexai.api.PartialArg.Builder.class); - } - - private int deltaCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object delta_; - - public enum DeltaCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NULL_VALUE(2), - NUMBER_VALUE(3), - STRING_VALUE(4), - BOOL_VALUE(5), - DELTA_NOT_SET(0); - private final int value; - - private DeltaCase(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 DeltaCase valueOf(int value) { - return forNumber(value); - } - - public static DeltaCase forNumber(int value) { - switch (value) { - case 2: - return NULL_VALUE; - case 3: - return NUMBER_VALUE; - case 4: - return STRING_VALUE; - case 5: - return BOOL_VALUE; - case 0: - return DELTA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DeltaCase getDeltaCase() { - return DeltaCase.forNumber(deltaCase_); - } - - public static final int NULL_VALUE_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nullValue field is set. - */ - public boolean hasNullValue() { - return deltaCase_ == 2; - } - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for nullValue. - */ - public int getNullValueValue() { - if (deltaCase_ == 2) { - return (java.lang.Integer) delta_; - } - return 0; - } - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nullValue. - */ - public com.google.protobuf.NullValue getNullValue() { - if (deltaCase_ == 2) { - com.google.protobuf.NullValue result = - com.google.protobuf.NullValue.forNumber((java.lang.Integer) delta_); - return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; - } - return com.google.protobuf.NullValue.NULL_VALUE; - } - - public static final int NUMBER_VALUE_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Optional. Represents a double value.
-   * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the numberValue field is set. - */ - @java.lang.Override - public boolean hasNumberValue() { - return deltaCase_ == 3; - } - - /** - * - * - *
-   * Optional. Represents a double value.
-   * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numberValue. - */ - @java.lang.Override - public double getNumberValue() { - if (deltaCase_ == 3) { - return (java.lang.Double) delta_; - } - return 0D; - } - - public static final int STRING_VALUE_FIELD_NUMBER = 4; - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the stringValue field is set. - */ - public boolean hasStringValue() { - return deltaCase_ == 4; - } - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stringValue. - */ - public java.lang.String getStringValue() { - java.lang.Object ref = ""; - if (deltaCase_ == 4) { - ref = delta_; - } - 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 (deltaCase_ == 4) { - delta_ = s; - } - return s; - } - } - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stringValue. - */ - public com.google.protobuf.ByteString getStringValueBytes() { - java.lang.Object ref = ""; - if (deltaCase_ == 4) { - ref = delta_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (deltaCase_ == 4) { - delta_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOOL_VALUE_FIELD_NUMBER = 5; - - /** - * - * - *
-   * Optional. Represents a boolean value.
-   * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the boolValue field is set. - */ - @java.lang.Override - public boolean hasBoolValue() { - return deltaCase_ == 5; - } - - /** - * - * - *
-   * Optional. Represents a boolean value.
-   * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The boolValue. - */ - @java.lang.Override - public boolean getBoolValue() { - if (deltaCase_ == 5) { - return (java.lang.Boolean) delta_; - } - return false; - } - - public static final int JSON_PATH_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object jsonPath_ = ""; - - /** - * - * - *
-   * Required. A JSON Path (RFC 9535) to the argument being streamed.
-   * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-   * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jsonPath. - */ - @java.lang.Override - public java.lang.String getJsonPath() { - java.lang.Object ref = jsonPath_; - 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(); - jsonPath_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. A JSON Path (RFC 9535) to the argument being streamed.
-   * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-   * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jsonPath. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJsonPathBytes() { - java.lang.Object ref = jsonPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jsonPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WILL_CONTINUE_FIELD_NUMBER = 6; - private boolean willContinue_ = false; - - /** - * - * - *
-   * Optional. Whether this is not the last part of the same json_path.
-   * If true, another PartialArg message for the current json_path is expected
-   * to follow.
-   * 
- * - * bool will_continue = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - @java.lang.Override - public boolean getWillContinue() { - return willContinue_; - } - - 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.GeneratedMessage.isStringEmpty(jsonPath_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, jsonPath_); - } - if (deltaCase_ == 2) { - output.writeEnum(2, ((java.lang.Integer) delta_)); - } - if (deltaCase_ == 3) { - output.writeDouble(3, (double) ((java.lang.Double) delta_)); - } - if (deltaCase_ == 4) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, delta_); - } - if (deltaCase_ == 5) { - output.writeBool(5, (boolean) ((java.lang.Boolean) delta_)); - } - if (willContinue_ != false) { - output.writeBool(6, willContinue_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jsonPath_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, jsonPath_); - } - if (deltaCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeEnumSize(2, ((java.lang.Integer) delta_)); - } - if (deltaCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 3, (double) ((java.lang.Double) delta_)); - } - if (deltaCase_ == 4) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, delta_); - } - if (deltaCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize( - 5, (boolean) ((java.lang.Boolean) delta_)); - } - if (willContinue_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, willContinue_); - } - 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.vertexai.api.PartialArg)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PartialArg other = (com.google.cloud.vertexai.api.PartialArg) obj; - - if (!getJsonPath().equals(other.getJsonPath())) return false; - if (getWillContinue() != other.getWillContinue()) return false; - if (!getDeltaCase().equals(other.getDeltaCase())) return false; - switch (deltaCase_) { - case 2: - if (getNullValueValue() != other.getNullValueValue()) return false; - break; - case 3: - if (java.lang.Double.doubleToLongBits(getNumberValue()) - != java.lang.Double.doubleToLongBits(other.getNumberValue())) return false; - break; - case 4: - if (!getStringValue().equals(other.getStringValue())) return false; - break; - case 5: - if (getBoolValue() != other.getBoolValue()) 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) + JSON_PATH_FIELD_NUMBER; - hash = (53 * hash) + getJsonPath().hashCode(); - hash = (37 * hash) + WILL_CONTINUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWillContinue()); - switch (deltaCase_) { - case 2: - hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getNullValueValue(); - break; - case 3: - hash = (37 * hash) + NUMBER_VALUE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getNumberValue())); - break; - case 4: - hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getStringValue().hashCode(); - break; - case 5: - hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PartialArg 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.vertexai.api.PartialArg parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PartialArg 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.vertexai.api.PartialArg parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PartialArg parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PartialArg parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PartialArg parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PartialArg 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Partial argument value of the function call.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PartialArg} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PartialArg) - com.google.cloud.vertexai.api.PartialArgOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_PartialArg_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_PartialArg_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PartialArg.class, - com.google.cloud.vertexai.api.PartialArg.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PartialArg.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - jsonPath_ = ""; - willContinue_ = false; - deltaCase_ = 0; - delta_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_PartialArg_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PartialArg getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PartialArg.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PartialArg build() { - com.google.cloud.vertexai.api.PartialArg result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PartialArg buildPartial() { - com.google.cloud.vertexai.api.PartialArg result = - new com.google.cloud.vertexai.api.PartialArg(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PartialArg result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.jsonPath_ = jsonPath_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.willContinue_ = willContinue_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.PartialArg result) { - result.deltaCase_ = deltaCase_; - result.delta_ = this.delta_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PartialArg) { - return mergeFrom((com.google.cloud.vertexai.api.PartialArg) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PartialArg other) { - if (other == com.google.cloud.vertexai.api.PartialArg.getDefaultInstance()) return this; - if (!other.getJsonPath().isEmpty()) { - jsonPath_ = other.jsonPath_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.getWillContinue() != false) { - setWillContinue(other.getWillContinue()); - } - switch (other.getDeltaCase()) { - case NULL_VALUE: - { - setNullValueValue(other.getNullValueValue()); - break; - } - case NUMBER_VALUE: - { - setNumberValue(other.getNumberValue()); - break; - } - case STRING_VALUE: - { - deltaCase_ = 4; - delta_ = other.delta_; - onChanged(); - break; - } - case BOOL_VALUE: - { - setBoolValue(other.getBoolValue()); - break; - } - case DELTA_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: - { - jsonPath_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 10 - case 16: - { - int rawValue = input.readEnum(); - deltaCase_ = 2; - delta_ = rawValue; - break; - } // case 16 - case 25: - { - delta_ = input.readDouble(); - deltaCase_ = 3; - break; - } // case 25 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - deltaCase_ = 4; - delta_ = s; - break; - } // case 34 - case 40: - { - delta_ = input.readBool(); - deltaCase_ = 5; - break; - } // case 40 - case 48: - { - willContinue_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - 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 deltaCase_ = 0; - private java.lang.Object delta_; - - public DeltaCase getDeltaCase() { - return DeltaCase.forNumber(deltaCase_); - } - - public Builder clearDelta() { - deltaCase_ = 0; - delta_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nullValue field is set. - */ - @java.lang.Override - public boolean hasNullValue() { - return deltaCase_ == 2; - } - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for nullValue. - */ - @java.lang.Override - public int getNullValueValue() { - if (deltaCase_ == 2) { - return ((java.lang.Integer) delta_).intValue(); - } - return 0; - } - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for nullValue to set. - * @return This builder for chaining. - */ - public Builder setNullValueValue(int value) { - deltaCase_ = 2; - delta_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nullValue. - */ - @java.lang.Override - public com.google.protobuf.NullValue getNullValue() { - if (deltaCase_ == 2) { - com.google.protobuf.NullValue result = - com.google.protobuf.NullValue.forNumber((java.lang.Integer) delta_); - return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; - } - return com.google.protobuf.NullValue.NULL_VALUE; - } - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The nullValue to set. - * @return This builder for chaining. - */ - public Builder setNullValue(com.google.protobuf.NullValue value) { - if (value == null) { - throw new NullPointerException(); - } - deltaCase_ = 2; - delta_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a null value.
-     * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearNullValue() { - if (deltaCase_ == 2) { - deltaCase_ = 0; - delta_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Represents a double value.
-     * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the numberValue field is set. - */ - public boolean hasNumberValue() { - return deltaCase_ == 3; - } - - /** - * - * - *
-     * Optional. Represents a double value.
-     * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numberValue. - */ - public double getNumberValue() { - if (deltaCase_ == 3) { - return (java.lang.Double) delta_; - } - return 0D; - } - - /** - * - * - *
-     * Optional. Represents a double value.
-     * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The numberValue to set. - * @return This builder for chaining. - */ - public Builder setNumberValue(double value) { - - deltaCase_ = 3; - delta_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a double value.
-     * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNumberValue() { - if (deltaCase_ == 3) { - deltaCase_ = 0; - delta_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the stringValue field is set. - */ - @java.lang.Override - public boolean hasStringValue() { - return deltaCase_ == 4; - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stringValue. - */ - @java.lang.Override - public java.lang.String getStringValue() { - java.lang.Object ref = ""; - if (deltaCase_ == 4) { - ref = delta_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (deltaCase_ == 4) { - delta_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stringValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStringValueBytes() { - java.lang.Object ref = ""; - if (deltaCase_ == 4) { - ref = delta_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (deltaCase_ == 4) { - delta_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The stringValue to set. - * @return This builder for chaining. - */ - public Builder setStringValue(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - deltaCase_ = 4; - delta_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearStringValue() { - if (deltaCase_ == 4) { - deltaCase_ = 0; - delta_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Represents a string value.
-     * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for stringValue to set. - * @return This builder for chaining. - */ - public Builder setStringValueBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - deltaCase_ = 4; - delta_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a boolean value.
-     * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the boolValue field is set. - */ - public boolean hasBoolValue() { - return deltaCase_ == 5; - } - - /** - * - * - *
-     * Optional. Represents a boolean value.
-     * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The boolValue. - */ - public boolean getBoolValue() { - if (deltaCase_ == 5) { - return (java.lang.Boolean) delta_; - } - return false; - } - - /** - * - * - *
-     * Optional. Represents a boolean value.
-     * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The boolValue to set. - * @return This builder for chaining. - */ - public Builder setBoolValue(boolean value) { - - deltaCase_ = 5; - delta_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Represents a boolean value.
-     * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearBoolValue() { - if (deltaCase_ == 5) { - deltaCase_ = 0; - delta_ = null; - onChanged(); - } - return this; - } - - private java.lang.Object jsonPath_ = ""; - - /** - * - * - *
-     * Required. A JSON Path (RFC 9535) to the argument being streamed.
-     * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-     * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jsonPath. - */ - public java.lang.String getJsonPath() { - java.lang.Object ref = jsonPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jsonPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. A JSON Path (RFC 9535) to the argument being streamed.
-     * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-     * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jsonPath. - */ - public com.google.protobuf.ByteString getJsonPathBytes() { - java.lang.Object ref = jsonPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jsonPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. A JSON Path (RFC 9535) to the argument being streamed.
-     * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-     * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The jsonPath to set. - * @return This builder for chaining. - */ - public Builder setJsonPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - jsonPath_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. A JSON Path (RFC 9535) to the argument being streamed.
-     * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-     * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearJsonPath() { - jsonPath_ = getDefaultInstance().getJsonPath(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. A JSON Path (RFC 9535) to the argument being streamed.
-     * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-     * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for jsonPath to set. - * @return This builder for chaining. - */ - public Builder setJsonPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - jsonPath_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private boolean willContinue_; - - /** - * - * - *
-     * Optional. Whether this is not the last part of the same json_path.
-     * If true, another PartialArg message for the current json_path is expected
-     * to follow.
-     * 
- * - * bool will_continue = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - @java.lang.Override - public boolean getWillContinue() { - return willContinue_; - } - - /** - * - * - *
-     * Optional. Whether this is not the last part of the same json_path.
-     * If true, another PartialArg message for the current json_path is expected
-     * to follow.
-     * 
- * - * bool will_continue = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The willContinue to set. - * @return This builder for chaining. - */ - public Builder setWillContinue(boolean value) { - - willContinue_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Whether this is not the last part of the same json_path.
-     * If true, another PartialArg message for the current json_path is expected
-     * to follow.
-     * 
- * - * bool will_continue = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearWillContinue() { - bitField0_ = (bitField0_ & ~0x00000020); - willContinue_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PartialArg) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PartialArg) - private static final com.google.cloud.vertexai.api.PartialArg DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PartialArg(); - } - - public static com.google.cloud.vertexai.api.PartialArg getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PartialArg 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.vertexai.api.PartialArg getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArgOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArgOrBuilder.java deleted file mode 100644 index 48515c84e61e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartialArgOrBuilder.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PartialArgOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PartialArg) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nullValue field is set. - */ - boolean hasNullValue(); - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for nullValue. - */ - int getNullValueValue(); - - /** - * - * - *
-   * Optional. Represents a null value.
-   * 
- * - * .google.protobuf.NullValue null_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nullValue. - */ - com.google.protobuf.NullValue getNullValue(); - - /** - * - * - *
-   * Optional. Represents a double value.
-   * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the numberValue field is set. - */ - boolean hasNumberValue(); - - /** - * - * - *
-   * Optional. Represents a double value.
-   * 
- * - * double number_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numberValue. - */ - double getNumberValue(); - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the stringValue field is set. - */ - boolean hasStringValue(); - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stringValue. - */ - java.lang.String getStringValue(); - - /** - * - * - *
-   * Optional. Represents a string value.
-   * 
- * - * string string_value = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stringValue. - */ - com.google.protobuf.ByteString getStringValueBytes(); - - /** - * - * - *
-   * Optional. Represents a boolean value.
-   * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the boolValue field is set. - */ - boolean hasBoolValue(); - - /** - * - * - *
-   * Optional. Represents a boolean value.
-   * 
- * - * bool bool_value = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The boolValue. - */ - boolean getBoolValue(); - - /** - * - * - *
-   * Required. A JSON Path (RFC 9535) to the argument being streamed.
-   * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-   * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jsonPath. - */ - java.lang.String getJsonPath(); - - /** - * - * - *
-   * Required. A JSON Path (RFC 9535) to the argument being streamed.
-   * https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data".
-   * 
- * - * string json_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jsonPath. - */ - com.google.protobuf.ByteString getJsonPathBytes(); - - /** - * - * - *
-   * Optional. Whether this is not the last part of the same json_path.
-   * If true, another PartialArg message for the current json_path is expected
-   * to follow.
-   * 
- * - * bool will_continue = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The willContinue. - */ - boolean getWillContinue(); - - com.google.cloud.vertexai.api.PartialArg.DeltaCase getDeltaCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java deleted file mode 100644 index 19ee6f9db619..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java +++ /dev/null @@ -1,723 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents the spec of [persistent
- * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] options.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PersistentDiskSpec} - */ -@com.google.protobuf.Generated -public final class PersistentDiskSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PersistentDiskSpec) - PersistentDiskSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PersistentDiskSpec"); - } - - // Use PersistentDiskSpec.newBuilder() to construct. - private PersistentDiskSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PersistentDiskSpec() { - diskType_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PersistentDiskSpec.class, - com.google.cloud.vertexai.api.PersistentDiskSpec.Builder.class); - } - - public static final int DISK_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object diskType_ = ""; - - /** - * - * - *
-   * Type of the disk (default is "pd-standard").
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-   * "pd-standard" (Persistent Disk Hard Disk Drive)
-   * "pd-balanced" (Balanced Persistent Disk)
-   * "pd-extreme" (Extreme Persistent Disk)
-   * 
- * - * string disk_type = 1; - * - * @return The diskType. - */ - @java.lang.Override - public java.lang.String getDiskType() { - java.lang.Object ref = diskType_; - 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(); - diskType_ = s; - return s; - } - } - - /** - * - * - *
-   * Type of the disk (default is "pd-standard").
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-   * "pd-standard" (Persistent Disk Hard Disk Drive)
-   * "pd-balanced" (Balanced Persistent Disk)
-   * "pd-extreme" (Extreme Persistent Disk)
-   * 
- * - * string disk_type = 1; - * - * @return The bytes for diskType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDiskTypeBytes() { - java.lang.Object ref = diskType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - diskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISK_SIZE_GB_FIELD_NUMBER = 2; - private long diskSizeGb_ = 0L; - - /** - * - * - *
-   * Size in GB of the disk (default is 100GB).
-   * 
- * - * int64 disk_size_gb = 2; - * - * @return The diskSizeGb. - */ - @java.lang.Override - public long getDiskSizeGb() { - return diskSizeGb_; - } - - 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.GeneratedMessage.isStringEmpty(diskType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, diskType_); - } - if (diskSizeGb_ != 0L) { - output.writeInt64(2, diskSizeGb_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(diskType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, diskType_); - } - if (diskSizeGb_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, diskSizeGb_); - } - 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.vertexai.api.PersistentDiskSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PersistentDiskSpec other = - (com.google.cloud.vertexai.api.PersistentDiskSpec) obj; - - if (!getDiskType().equals(other.getDiskType())) return false; - if (getDiskSizeGb() != other.getDiskSizeGb()) 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) + DISK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getDiskType().hashCode(); - hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec 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.vertexai.api.PersistentDiskSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec 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.vertexai.api.PersistentDiskSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PersistentDiskSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents the spec of [persistent
-   * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] options.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PersistentDiskSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PersistentDiskSpec) - com.google.cloud.vertexai.api.PersistentDiskSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PersistentDiskSpec.class, - com.google.cloud.vertexai.api.PersistentDiskSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PersistentDiskSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - diskType_ = ""; - diskSizeGb_ = 0L; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_PersistentDiskSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PersistentDiskSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PersistentDiskSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PersistentDiskSpec build() { - com.google.cloud.vertexai.api.PersistentDiskSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PersistentDiskSpec buildPartial() { - com.google.cloud.vertexai.api.PersistentDiskSpec result = - new com.google.cloud.vertexai.api.PersistentDiskSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PersistentDiskSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.diskType_ = diskType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.diskSizeGb_ = diskSizeGb_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PersistentDiskSpec) { - return mergeFrom((com.google.cloud.vertexai.api.PersistentDiskSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PersistentDiskSpec other) { - if (other == com.google.cloud.vertexai.api.PersistentDiskSpec.getDefaultInstance()) - return this; - if (!other.getDiskType().isEmpty()) { - diskType_ = other.diskType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getDiskSizeGb() != 0L) { - setDiskSizeGb(other.getDiskSizeGb()); - } - 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: - { - diskType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - diskSizeGb_ = 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 java.lang.Object diskType_ = ""; - - /** - * - * - *
-     * Type of the disk (default is "pd-standard").
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-     * "pd-standard" (Persistent Disk Hard Disk Drive)
-     * "pd-balanced" (Balanced Persistent Disk)
-     * "pd-extreme" (Extreme Persistent Disk)
-     * 
- * - * string disk_type = 1; - * - * @return The diskType. - */ - public java.lang.String getDiskType() { - java.lang.Object ref = diskType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - diskType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Type of the disk (default is "pd-standard").
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-     * "pd-standard" (Persistent Disk Hard Disk Drive)
-     * "pd-balanced" (Balanced Persistent Disk)
-     * "pd-extreme" (Extreme Persistent Disk)
-     * 
- * - * string disk_type = 1; - * - * @return The bytes for diskType. - */ - public com.google.protobuf.ByteString getDiskTypeBytes() { - java.lang.Object ref = diskType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - diskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Type of the disk (default is "pd-standard").
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-     * "pd-standard" (Persistent Disk Hard Disk Drive)
-     * "pd-balanced" (Balanced Persistent Disk)
-     * "pd-extreme" (Extreme Persistent Disk)
-     * 
- * - * string disk_type = 1; - * - * @param value The diskType to set. - * @return This builder for chaining. - */ - public Builder setDiskType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - diskType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Type of the disk (default is "pd-standard").
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-     * "pd-standard" (Persistent Disk Hard Disk Drive)
-     * "pd-balanced" (Balanced Persistent Disk)
-     * "pd-extreme" (Extreme Persistent Disk)
-     * 
- * - * string disk_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearDiskType() { - diskType_ = getDefaultInstance().getDiskType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Type of the disk (default is "pd-standard").
-     * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-     * "pd-standard" (Persistent Disk Hard Disk Drive)
-     * "pd-balanced" (Balanced Persistent Disk)
-     * "pd-extreme" (Extreme Persistent Disk)
-     * 
- * - * string disk_type = 1; - * - * @param value The bytes for diskType to set. - * @return This builder for chaining. - */ - public Builder setDiskTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - diskType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private long diskSizeGb_; - - /** - * - * - *
-     * Size in GB of the disk (default is 100GB).
-     * 
- * - * int64 disk_size_gb = 2; - * - * @return The diskSizeGb. - */ - @java.lang.Override - public long getDiskSizeGb() { - return diskSizeGb_; - } - - /** - * - * - *
-     * Size in GB of the disk (default is 100GB).
-     * 
- * - * int64 disk_size_gb = 2; - * - * @param value The diskSizeGb to set. - * @return This builder for chaining. - */ - public Builder setDiskSizeGb(long value) { - - diskSizeGb_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Size in GB of the disk (default is 100GB).
-     * 
- * - * int64 disk_size_gb = 2; - * - * @return This builder for chaining. - */ - public Builder clearDiskSizeGb() { - bitField0_ = (bitField0_ & ~0x00000002); - diskSizeGb_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PersistentDiskSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PersistentDiskSpec) - private static final com.google.cloud.vertexai.api.PersistentDiskSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PersistentDiskSpec(); - } - - public static com.google.cloud.vertexai.api.PersistentDiskSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PersistentDiskSpec 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.vertexai.api.PersistentDiskSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java deleted file mode 100644 index 8211af811e1c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PersistentDiskSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PersistentDiskSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Type of the disk (default is "pd-standard").
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-   * "pd-standard" (Persistent Disk Hard Disk Drive)
-   * "pd-balanced" (Balanced Persistent Disk)
-   * "pd-extreme" (Extreme Persistent Disk)
-   * 
- * - * string disk_type = 1; - * - * @return The diskType. - */ - java.lang.String getDiskType(); - - /** - * - * - *
-   * Type of the disk (default is "pd-standard").
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
-   * "pd-standard" (Persistent Disk Hard Disk Drive)
-   * "pd-balanced" (Balanced Persistent Disk)
-   * "pd-extreme" (Extreme Persistent Disk)
-   * 
- * - * string disk_type = 1; - * - * @return The bytes for diskType. - */ - com.google.protobuf.ByteString getDiskTypeBytes(); - - /** - * - * - *
-   * Size in GB of the disk (default is 100GB).
-   * 
- * - * int64 disk_size_gb = 2; - * - * @return The diskSizeGb. - */ - long getDiskSizeGb(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfig.java deleted file mode 100644 index a6205a8b9689..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfig.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for a prebuilt voice.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrebuiltVoiceConfig} - */ -@com.google.protobuf.Generated -public final class PrebuiltVoiceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PrebuiltVoiceConfig) - PrebuiltVoiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PrebuiltVoiceConfig"); - } - - // Use PrebuiltVoiceConfig.newBuilder() to construct. - private PrebuiltVoiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PrebuiltVoiceConfig() { - voiceName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.class, - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder.class); - } - - private int bitField0_; - public static final int VOICE_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object voiceName_ = ""; - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return Whether the voiceName field is set. - */ - @java.lang.Override - public boolean hasVoiceName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return The voiceName. - */ - @java.lang.Override - public java.lang.String getVoiceName() { - java.lang.Object ref = voiceName_; - 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(); - voiceName_ = s; - return s; - } - } - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return The bytes for voiceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVoiceNameBytes() { - java.lang.Object ref = voiceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - voiceName_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, voiceName_); - } - 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.GeneratedMessage.computeStringSize(1, voiceName_); - } - 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.vertexai.api.PrebuiltVoiceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PrebuiltVoiceConfig other = - (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) obj; - - if (hasVoiceName() != other.hasVoiceName()) return false; - if (hasVoiceName()) { - if (!getVoiceName().equals(other.getVoiceName())) 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 (hasVoiceName()) { - hash = (37 * hash) + VOICE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getVoiceName().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig 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.vertexai.api.PrebuiltVoiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig 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.vertexai.api.PrebuiltVoiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PrebuiltVoiceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for a prebuilt voice.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrebuiltVoiceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PrebuiltVoiceConfig) - com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.class, - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PrebuiltVoiceConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - voiceName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_PrebuiltVoiceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig build() { - com.google.cloud.vertexai.api.PrebuiltVoiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig buildPartial() { - com.google.cloud.vertexai.api.PrebuiltVoiceConfig result = - new com.google.cloud.vertexai.api.PrebuiltVoiceConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PrebuiltVoiceConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.voiceName_ = voiceName_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PrebuiltVoiceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.PrebuiltVoiceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PrebuiltVoiceConfig other) { - if (other == com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance()) - return this; - if (other.hasVoiceName()) { - voiceName_ = other.voiceName_; - 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: - { - voiceName_ = 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 voiceName_ = ""; - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @return Whether the voiceName field is set. - */ - public boolean hasVoiceName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @return The voiceName. - */ - public java.lang.String getVoiceName() { - java.lang.Object ref = voiceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - voiceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @return The bytes for voiceName. - */ - public com.google.protobuf.ByteString getVoiceNameBytes() { - java.lang.Object ref = voiceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - voiceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @param value The voiceName to set. - * @return This builder for chaining. - */ - public Builder setVoiceName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - voiceName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearVoiceName() { - voiceName_ = getDefaultInstance().getVoiceName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * The name of the prebuilt voice to use.
-     * 
- * - * optional string voice_name = 1; - * - * @param value The bytes for voiceName to set. - * @return This builder for chaining. - */ - public Builder setVoiceNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - voiceName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PrebuiltVoiceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PrebuiltVoiceConfig) - private static final com.google.cloud.vertexai.api.PrebuiltVoiceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PrebuiltVoiceConfig(); - } - - public static com.google.cloud.vertexai.api.PrebuiltVoiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrebuiltVoiceConfig 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.vertexai.api.PrebuiltVoiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfigOrBuilder.java deleted file mode 100644 index 0894dc96b65a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrebuiltVoiceConfigOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PrebuiltVoiceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PrebuiltVoiceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return Whether the voiceName field is set. - */ - boolean hasVoiceName(); - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return The voiceName. - */ - java.lang.String getVoiceName(); - - /** - * - * - *
-   * The name of the prebuilt voice to use.
-   * 
- * - * optional string voice_name = 1; - * - * @return The bytes for voiceName. - */ - com.google.protobuf.ByteString getVoiceNameBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java deleted file mode 100644 index ae75a3a64c12..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java +++ /dev/null @@ -1,2051 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictRequest} - */ -@com.google.protobuf.Generated -public final class PredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PredictRequest) - PredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PredictRequest"); - } - - // Use PredictRequest.newBuilder() to construct. - private PredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PredictRequest() { - endpoint_ = ""; - instances_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictRequest.class, - com.google.cloud.vertexai.api.PredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List instances_; - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getInstancesOrBuilderList() { - return instances_; - } - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.Value getInstances(int index) { - return instances_.get(index); - } - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - return instances_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 3; - private com.google.protobuf.Value parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.protobuf.Value getParameters() { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(2, instances_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getParameters()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.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.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - 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.vertexai.api.PredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PredictRequest other = - (com.google.cloud.vertexai.api.PredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInstancesList().equals(other.getInstancesList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequest 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.vertexai.api.PredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequest 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.vertexai.api.PredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PredictRequest) - com.google.cloud.vertexai.api.PredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictRequest.class, - com.google.cloud.vertexai.api.PredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInstancesFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - } else { - instances_ = null; - instancesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - internalGetMutableLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequest build() { - com.google.cloud.vertexai.api.PredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequest buildPartial() { - com.google.cloud.vertexai.api.PredictRequest result = - new com.google.cloud.vertexai.api.PredictRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.PredictRequest result) { - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.PredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.PredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PredictRequest other) { - if (other == com.google.cloud.vertexai.api.PredictRequest.getDefaultInstance()) return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000002); - instancesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInstancesFieldBuilder() - : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000008; - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(m); - } else { - instancesBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetParametersFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List instances_ = - java.util.Collections.emptyList(); - - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - instancesBuilder_; - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllInstances(java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder getInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder() { - return internalGetInstancesFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Value.Builder addInstancesBuilder(int index) { - return internalGetInstancesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The instances that are the input to the prediction call.
-     * A DeployedModel may have an upper limit on the number of instances it
-     * supports per request, and when it is exceeded the prediction call errors
-     * in case of AutoML Models, or, in case of customer created Models, the
-     * behaviour is as documented by that Model.
-     * The schema of any single instance may be specified via Endpoint's
-     * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-     * 
- * - * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getInstancesBuilderList() { - return internalGetInstancesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - instances_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - instances_ = null; - } - return instancesBuilder_; - } - - private com.google.protobuf.Value parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return The parameters. - */ - public com.google.protobuf.Value getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public Builder setParameters(com.google.protobuf.Value value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public Builder setParameters(com.google.protobuf.Value.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public Builder mergeParameters(com.google.protobuf.Value value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.protobuf.Value.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public com.google.protobuf.Value.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null ? com.google.protobuf.Value.getDefaultInstance() : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction. The schema of the parameters may
-     * be specified via Endpoint's DeployedModels' [Model's
-     * ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-     * 
- * - * .google.protobuf.Value parameters = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; - return this; - } - - /** - * - * - *
-     * Optional. The user labels for Imagen billing usage only. Only Imagen
-     * supports labels. For other use cases, it will be ignored.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PredictRequest) - private static final com.google.cloud.vertexai.api.PredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PredictRequest(); - } - - public static com.google.cloud.vertexai.api.PredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredictRequest 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.vertexai.api.PredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java deleted file mode 100644 index dba1d2d3fa4a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getInstancesList(); - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.Value getInstances(int index); - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getInstancesCount(); - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getInstancesOrBuilderList(); - - /** - * - * - *
-   * Required. The instances that are the input to the prediction call.
-   * A DeployedModel may have an upper limit on the number of instances it
-   * supports per request, and when it is exceeded the prediction call errors
-   * in case of AutoML Models, or, in case of customer created Models, the
-   * behaviour is as documented by that Model.
-   * The schema of any single instance may be specified via Endpoint's
-   * DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - * - * @return The parameters. - */ - com.google.protobuf.Value getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction. The schema of the parameters may
-   * be specified via Endpoint's DeployedModels' [Model's
-   * ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
-   * 
- * - * .google.protobuf.Value parameters = 3; - */ - com.google.protobuf.ValueOrBuilder getParametersOrBuilder(); - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - - /** - * - * - *
-   * Optional. The user labels for Imagen billing usage only. Only Imagen
-   * supports labels. For other use cases, it will be ignored.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java deleted file mode 100644 index e6407641e255..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for logging request-response to a BigQuery table.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig} - */ -@com.google.protobuf.Generated -public final class PredictRequestResponseLoggingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig) - PredictRequestResponseLoggingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PredictRequestResponseLoggingConfig"); - } - - // Use PredictRequestResponseLoggingConfig.newBuilder() to construct. - private PredictRequestResponseLoggingConfig( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PredictRequestResponseLoggingConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.class, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder.class); - } - - private int bitField0_; - public static final int ENABLED_FIELD_NUMBER = 1; - private boolean enabled_ = false; - - /** - * - * - *
-   * If logging is enabled or not.
-   * 
- * - * bool enabled = 1; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - - public static final int SAMPLING_RATE_FIELD_NUMBER = 2; - private double samplingRate_ = 0D; - - /** - * - * - *
-   * Percentage of requests to be logged, expressed as a fraction in
-   * range(0,1].
-   * 
- * - * double sampling_rate = 2; - * - * @return The samplingRate. - */ - @java.lang.Override - public double getSamplingRate() { - return samplingRate_; - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.BigQueryDestination bigqueryDestination_; - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestination getBigqueryDestination() { - return bigqueryDestination_ == null - ? com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance() - : bigqueryDestination_; - } - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - return bigqueryDestination_ == null - ? com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance() - : bigqueryDestination_; - } - - 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 (enabled_ != false) { - output.writeBool(1, enabled_); - } - if (java.lang.Double.doubleToRawLongBits(samplingRate_) != 0) { - output.writeDouble(2, samplingRate_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getBigqueryDestination()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); - } - if (java.lang.Double.doubleToRawLongBits(samplingRate_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, samplingRate_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBigqueryDestination()); - } - 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.vertexai.api.PredictRequestResponseLoggingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig other = - (com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig) obj; - - if (getEnabled() != other.getEnabled()) return false; - if (java.lang.Double.doubleToLongBits(getSamplingRate()) - != java.lang.Double.doubleToLongBits(other.getSamplingRate())) return false; - if (hasBigqueryDestination() != other.hasBigqueryDestination()) return false; - if (hasBigqueryDestination()) { - if (!getBigqueryDestination().equals(other.getBigqueryDestination())) 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) + ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); - hash = (37 * hash) + SAMPLING_RATE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getSamplingRate())); - if (hasBigqueryDestination()) { - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig 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.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig 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.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PredictRequestResponseLoggingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for logging request-response to a BigQuery table.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig) - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.class, - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetBigqueryDestinationFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enabled_ = false; - samplingRate_ = 0D; - bigqueryDestination_ = null; - if (bigqueryDestinationBuilder_ != null) { - bigqueryDestinationBuilder_.dispose(); - bigqueryDestinationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PredictRequestResponseLoggingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig build() { - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig buildPartial() { - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig result = - new com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enabled_ = enabled_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.samplingRate_ = samplingRate_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.bigqueryDestination_ = - bigqueryDestinationBuilder_ == null - ? bigqueryDestination_ - : bigqueryDestinationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig other) { - if (other - == com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.getDefaultInstance()) - return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - if (java.lang.Double.doubleToRawLongBits(other.getSamplingRate()) != 0) { - setSamplingRate(other.getSamplingRate()); - } - if (other.hasBigqueryDestination()) { - mergeBigqueryDestination(other.getBigqueryDestination()); - } - 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: - { - enabled_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 17: - { - samplingRate_ = input.readDouble(); - bitField0_ |= 0x00000002; - break; - } // case 17 - case 26: - { - input.readMessage( - internalGetBigqueryDestinationFieldBuilder().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 boolean enabled_; - - /** - * - * - *
-     * If logging is enabled or not.
-     * 
- * - * bool enabled = 1; - * - * @return The enabled. - */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - - /** - * - * - *
-     * If logging is enabled or not.
-     * 
- * - * bool enabled = 1; - * - * @param value The enabled to set. - * @return This builder for chaining. - */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * If logging is enabled or not.
-     * 
- * - * bool enabled = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnabled() { - bitField0_ = (bitField0_ & ~0x00000001); - enabled_ = false; - onChanged(); - return this; - } - - private double samplingRate_; - - /** - * - * - *
-     * Percentage of requests to be logged, expressed as a fraction in
-     * range(0,1].
-     * 
- * - * double sampling_rate = 2; - * - * @return The samplingRate. - */ - @java.lang.Override - public double getSamplingRate() { - return samplingRate_; - } - - /** - * - * - *
-     * Percentage of requests to be logged, expressed as a fraction in
-     * range(0,1].
-     * 
- * - * double sampling_rate = 2; - * - * @param value The samplingRate to set. - * @return This builder for chaining. - */ - public Builder setSamplingRate(double value) { - - samplingRate_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Percentage of requests to be logged, expressed as a fraction in
-     * range(0,1].
-     * 
- * - * double sampling_rate = 2; - * - * @return This builder for chaining. - */ - public Builder clearSamplingRate() { - bitField0_ = (bitField0_ & ~0x00000002); - samplingRate_ = 0D; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.BigQueryDestination bigqueryDestination_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - bigqueryDestinationBuilder_; - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.vertexai.api.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - return bigqueryDestination_ == null - ? com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance() - : bigqueryDestination_; - } else { - return bigqueryDestinationBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public Builder setBigqueryDestination(com.google.cloud.vertexai.api.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - bigqueryDestination_ = value; - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public Builder setBigqueryDestination( - com.google.cloud.vertexai.api.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestination_ = builderForValue.build(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public Builder mergeBigqueryDestination( - com.google.cloud.vertexai.api.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && bigqueryDestination_ != null - && bigqueryDestination_ - != com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance()) { - getBigqueryDestinationBuilder().mergeFrom(value); - } else { - bigqueryDestination_ = value; - } - } else { - bigqueryDestinationBuilder_.mergeFrom(value); - } - if (bigqueryDestination_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public Builder clearBigqueryDestination() { - bitField0_ = (bitField0_ & ~0x00000004); - bigqueryDestination_ = null; - if (bigqueryDestinationBuilder_ != null) { - bigqueryDestinationBuilder_.dispose(); - bigqueryDestinationBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public com.google.cloud.vertexai.api.BigQueryDestination.Builder - getBigqueryDestinationBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetBigqueryDestinationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - public com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if (bigqueryDestinationBuilder_ != null) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - return bigqueryDestination_ == null - ? com.google.cloud.vertexai.api.BigQueryDestination.getDefaultInstance() - : bigqueryDestination_; - } - } - - /** - * - * - *
-     * BigQuery table for logging.
-     * If only given a project, a new dataset will be created with name
-     * `logging_<endpoint-display-name>_<endpoint-id>` where
-     * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-     * most special characters will become underscores). If no table name is
-     * given, a new table will be created with name `request_response_logging`
-     * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder> - internalGetBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BigQueryDestination, - com.google.cloud.vertexai.api.BigQueryDestination.Builder, - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder>( - getBigqueryDestination(), getParentForChildren(), isClean()); - bigqueryDestination_ = null; - } - return bigqueryDestinationBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig) - private static final com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig(); - } - - public static com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredictRequestResponseLoggingConfig 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.vertexai.api.PredictRequestResponseLoggingConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java deleted file mode 100644 index 637d0fac02b4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PredictRequestResponseLoggingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PredictRequestResponseLoggingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * If logging is enabled or not.
-   * 
- * - * bool enabled = 1; - * - * @return The enabled. - */ - boolean getEnabled(); - - /** - * - * - *
-   * Percentage of requests to be logged, expressed as a fraction in
-   * range(0,1].
-   * 
- * - * double sampling_rate = 2; - * - * @return The samplingRate. - */ - double getSamplingRate(); - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - * - * @return The bigqueryDestination. - */ - com.google.cloud.vertexai.api.BigQueryDestination getBigqueryDestination(); - - /** - * - * - *
-   * BigQuery table for logging.
-   * If only given a project, a new dataset will be created with name
-   * `logging_<endpoint-display-name>_<endpoint-id>` where
-   * <endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
-   * most special characters will become underscores). If no table name is
-   * given, a new table will be created with name `request_response_logging`
-   * 
- * - * .google.cloud.vertexai.v1.BigQueryDestination bigquery_destination = 3; - */ - com.google.cloud.vertexai.api.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java deleted file mode 100644 index 16c6107e7b9d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java +++ /dev/null @@ -1,2114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictResponse} - */ -@com.google.protobuf.Generated -public final class PredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PredictResponse) - PredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PredictResponse"); - } - - // Use PredictResponse.newBuilder() to construct. - private PredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PredictResponse() { - predictions_ = java.util.Collections.emptyList(); - deployedModelId_ = ""; - model_ = ""; - modelVersionId_ = ""; - modelDisplayName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictResponse.class, - com.google.cloud.vertexai.api.PredictResponse.Builder.class); - } - - private int bitField0_; - public static final int PREDICTIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List predictions_; - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - @java.lang.Override - public java.util.List getPredictionsList() { - return predictions_; - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - @java.lang.Override - public java.util.List - getPredictionsOrBuilderList() { - return predictions_; - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - @java.lang.Override - public int getPredictionsCount() { - return predictions_.size(); - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - @java.lang.Override - public com.google.protobuf.Value getPredictions(int index) { - return predictions_.get(index); - } - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { - return predictions_.get(index); - } - - public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this prediction.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - @java.lang.Override - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - 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(); - deployedModelId_ = s; - return s; - } - } - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this prediction.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-   * Output only. The resource name of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The resource name of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_VERSION_ID_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-   * Output only. The version ID of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - @java.lang.Override - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - 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(); - modelVersionId_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The version ID of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_DISPLAY_NAME_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelDisplayName_ = ""; - - /** - * - * - *
-   * Output only. The [display
-   * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-   * deployed as the DeployedModel that this prediction hits.
-   * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelDisplayName. - */ - @java.lang.Override - public java.lang.String getModelDisplayName() { - java.lang.Object ref = modelDisplayName_; - 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(); - modelDisplayName_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The [display
-   * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-   * deployed as the DeployedModel that this prediction hits.
-   * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelDisplayNameBytes() { - java.lang.Object ref = modelDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 6; - private com.google.protobuf.Value metadata_; - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The metadata. - */ - @java.lang.Override - public com.google.protobuf.Value getMetadata() { - return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; - } - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; - } - - 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 < predictions_.size(); i++) { - output.writeMessage(1, predictions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, deployedModelId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelDisplayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, modelDisplayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, modelVersionId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getMetadata()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < predictions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, predictions_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deployedModelId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelDisplayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, modelDisplayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, modelVersionId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetadata()); - } - 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.vertexai.api.PredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PredictResponse other = - (com.google.cloud.vertexai.api.PredictResponse) obj; - - if (!getPredictionsList().equals(other.getPredictionsList())) return false; - if (!getDeployedModelId().equals(other.getDeployedModelId())) return false; - if (!getModel().equals(other.getModel())) return false; - if (!getModelVersionId().equals(other.getModelVersionId())) return false; - if (!getModelDisplayName().equals(other.getModelDisplayName())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) 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 (getPredictionsCount() > 0) { - hash = (37 * hash) + PREDICTIONS_FIELD_NUMBER; - hash = (53 * hash) + getPredictionsList().hashCode(); - } - hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModelId().hashCode(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; - hash = (53 * hash) + getModelVersionId().hashCode(); - hash = (37 * hash) + MODEL_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getModelDisplayName().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictResponse 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.vertexai.api.PredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictResponse 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.vertexai.api.PredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PredictResponse) - com.google.cloud.vertexai.api.PredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PredictResponse.class, - com.google.cloud.vertexai.api.PredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPredictionsFieldBuilder(); - internalGetMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (predictionsBuilder_ == null) { - predictions_ = java.util.Collections.emptyList(); - } else { - predictions_ = null; - predictionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - deployedModelId_ = ""; - model_ = ""; - modelVersionId_ = ""; - modelDisplayName_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictResponse build() { - com.google.cloud.vertexai.api.PredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PredictResponse buildPartial() { - com.google.cloud.vertexai.api.PredictResponse result = - new com.google.cloud.vertexai.api.PredictResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.PredictResponse result) { - if (predictionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - predictions_ = java.util.Collections.unmodifiableList(predictions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.predictions_ = predictions_; - } else { - result.predictions_ = predictionsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.PredictResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployedModelId_ = deployedModelId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.model_ = model_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.modelVersionId_ = modelVersionId_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.modelDisplayName_ = modelDisplayName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.PredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PredictResponse other) { - if (other == com.google.cloud.vertexai.api.PredictResponse.getDefaultInstance()) return this; - if (predictionsBuilder_ == null) { - if (!other.predictions_.isEmpty()) { - if (predictions_.isEmpty()) { - predictions_ = other.predictions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePredictionsIsMutable(); - predictions_.addAll(other.predictions_); - } - onChanged(); - } - } else { - if (!other.predictions_.isEmpty()) { - if (predictionsBuilder_.isEmpty()) { - predictionsBuilder_.dispose(); - predictionsBuilder_ = null; - predictions_ = other.predictions_; - bitField0_ = (bitField0_ & ~0x00000001); - predictionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPredictionsFieldBuilder() - : null; - } else { - predictionsBuilder_.addAllMessages(other.predictions_); - } - } - } - if (!other.getDeployedModelId().isEmpty()) { - deployedModelId_ = other.deployedModelId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getModelVersionId().isEmpty()) { - modelVersionId_ = other.modelVersionId_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getModelDisplayName().isEmpty()) { - modelDisplayName_ = other.modelDisplayName_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - 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.protobuf.Value m = - input.readMessage(com.google.protobuf.Value.parser(), extensionRegistry); - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(m); - } else { - predictionsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - deployedModelId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - modelDisplayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - modelVersionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetMetadataFieldBuilder().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.util.List predictions_ = - java.util.Collections.emptyList(); - - private void ensurePredictionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - predictions_ = new java.util.ArrayList(predictions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - predictionsBuilder_; - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public java.util.List getPredictionsList() { - if (predictionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(predictions_); - } else { - return predictionsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public int getPredictionsCount() { - if (predictionsBuilder_ == null) { - return predictions_.size(); - } else { - return predictionsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public com.google.protobuf.Value getPredictions(int index) { - if (predictionsBuilder_ == null) { - return predictions_.get(index); - } else { - return predictionsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder setPredictions(int index, com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.set(index, value); - onChanged(); - } else { - predictionsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder setPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.set(index, builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder addPredictions(com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.add(value); - onChanged(); - } else { - predictionsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder addPredictions(int index, com.google.protobuf.Value value) { - if (predictionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictionsIsMutable(); - predictions_.add(index, value); - onChanged(); - } else { - predictionsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder addPredictions(com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder addPredictions(int index, com.google.protobuf.Value.Builder builderForValue) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.add(index, builderForValue.build()); - onChanged(); - } else { - predictionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder addAllPredictions( - java.lang.Iterable values) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, predictions_); - onChanged(); - } else { - predictionsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder clearPredictions() { - if (predictionsBuilder_ == null) { - predictions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - predictionsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public Builder removePredictions(int index) { - if (predictionsBuilder_ == null) { - ensurePredictionsIsMutable(); - predictions_.remove(index); - onChanged(); - } else { - predictionsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public com.google.protobuf.Value.Builder getPredictionsBuilder(int index) { - return internalGetPredictionsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index) { - if (predictionsBuilder_ == null) { - return predictions_.get(index); - } else { - return predictionsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public java.util.List - getPredictionsOrBuilderList() { - if (predictionsBuilder_ != null) { - return predictionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(predictions_); - } - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public com.google.protobuf.Value.Builder addPredictionsBuilder() { - return internalGetPredictionsFieldBuilder() - .addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public com.google.protobuf.Value.Builder addPredictionsBuilder(int index) { - return internalGetPredictionsFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - - /** - * - * - *
-     * The predictions that are the output of the predictions call.
-     * The schema of any single prediction may be specified via Endpoint's
-     * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-     * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-     * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-     * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - public java.util.List getPredictionsBuilderList() { - return internalGetPredictionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetPredictionsFieldBuilder() { - if (predictionsBuilder_ == null) { - predictionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - predictions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - predictions_ = null; - } - return predictionsBuilder_; - } - - private java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this prediction.
-     * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deployedModelId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this prediction.
-     * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this prediction.
-     * 
- * - * string deployed_model_id = 2; - * - * @param value The deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this prediction.
-     * 
- * - * string deployed_model_id = 2; - * - * @return This builder for chaining. - */ - public Builder clearDeployedModelId() { - deployedModelId_ = getDefaultInstance().getDeployedModelId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * ID of the Endpoint's DeployedModel that served this prediction.
-     * 
- * - * string deployed_model_id = 2; - * - * @param value The bytes for deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - - /** - * - * - *
-     * Output only. The resource name of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The resource name of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The resource name of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-     * Output only. The version ID of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelVersionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The version ID of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The version ID of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelVersionId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The version ID of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearModelVersionId() { - modelVersionId_ = getDefaultInstance().getModelVersionId(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The version ID of the Model which is deployed as the
-     * DeployedModel that this prediction hits.
-     * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelVersionId_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object modelDisplayName_ = ""; - - /** - * - * - *
-     * Output only. The [display
-     * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-     * deployed as the DeployedModel that this prediction hits.
-     * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelDisplayName. - */ - public java.lang.String getModelDisplayName() { - java.lang.Object ref = modelDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The [display
-     * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-     * deployed as the DeployedModel that this prediction hits.
-     * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelDisplayName. - */ - public com.google.protobuf.ByteString getModelDisplayNameBytes() { - java.lang.Object ref = modelDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The [display
-     * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-     * deployed as the DeployedModel that this prediction hits.
-     * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The modelDisplayName to set. - * @return This builder for chaining. - */ - public Builder setModelDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelDisplayName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The [display
-     * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-     * deployed as the DeployedModel that this prediction hits.
-     * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearModelDisplayName() { - modelDisplayName_ = getDefaultInstance().getModelDisplayName(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The [display
-     * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-     * deployed as the DeployedModel that this prediction hits.
-     * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for modelDisplayName to set. - * @return This builder for chaining. - */ - public Builder setModelDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelDisplayName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Value metadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - metadataBuilder_; - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metadata. - */ - public com.google.protobuf.Value getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadata(com.google.protobuf.Value value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetadata(com.google.protobuf.Value.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetadata(com.google.protobuf.Value value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && metadata_ != null - && metadata_ != com.google.protobuf.Value.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000020); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Value.Builder getMetadataBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.ValueOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? com.google.protobuf.Value.getDefaultInstance() : metadata_; - } - } - - /** - * - * - *
-     * Output only. Request-level metadata returned by the model. The metadata
-     * type will be dependent upon the model implementation.
-     * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PredictResponse) - private static final com.google.cloud.vertexai.api.PredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PredictResponse(); - } - - public static com.google.cloud.vertexai.api.PredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredictResponse 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.vertexai.api.PredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java deleted file mode 100644 index e4ff31298694..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - java.util.List getPredictionsList(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - com.google.protobuf.Value getPredictions(int index); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - int getPredictionsCount(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - java.util.List getPredictionsOrBuilderList(); - - /** - * - * - *
-   * The predictions that are the output of the predictions call.
-   * The schema of any single prediction may be specified via Endpoint's
-   * DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
-   * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
-   * [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
-   * 
- * - * repeated .google.protobuf.Value predictions = 1; - */ - com.google.protobuf.ValueOrBuilder getPredictionsOrBuilder(int index); - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this prediction.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The deployedModelId. - */ - java.lang.String getDeployedModelId(); - - /** - * - * - *
-   * ID of the Endpoint's DeployedModel that served this prediction.
-   * 
- * - * string deployed_model_id = 2; - * - * @return The bytes for deployedModelId. - */ - com.google.protobuf.ByteString getDeployedModelIdBytes(); - - /** - * - * - *
-   * Output only. The resource name of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-   * Output only. The resource name of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * - * string model = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-   * Output only. The version ID of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - java.lang.String getModelVersionId(); - - /** - * - * - *
-   * Output only. The version ID of the Model which is deployed as the
-   * DeployedModel that this prediction hits.
-   * 
- * - * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - com.google.protobuf.ByteString getModelVersionIdBytes(); - - /** - * - * - *
-   * Output only. The [display
-   * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-   * deployed as the DeployedModel that this prediction hits.
-   * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelDisplayName. - */ - java.lang.String getModelDisplayName(); - - /** - * - * - *
-   * Output only. The [display
-   * name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
-   * deployed as the DeployedModel that this prediction hits.
-   * 
- * - * string model_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelDisplayName. - */ - com.google.protobuf.ByteString getModelDisplayNameBytes(); - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The metadata. - */ - com.google.protobuf.Value getMetadata(); - - /** - * - * - *
-   * Output only. Request-level metadata returned by the model. The metadata
-   * type will be dependent upon the model implementation.
-   * 
- * - * .google.protobuf.Value metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.ValueOrBuilder getMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java deleted file mode 100644 index 34c371f74633..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java +++ /dev/null @@ -1,757 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class PredictionServiceProto extends com.google.protobuf.GeneratedFile { - private PredictionServiceProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PredictionServiceProto"); - } - - 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_vertexai_v1_PredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RawPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DirectPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplainRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExplainResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CountTokensRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CountTokensResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_EmbedContentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_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" - + "1google/cloud/vertexai/v1/prediction_se" - + "rvice.proto\022\030google.cloud.vertexai.v1\032\034g" - + "oogle/api/annotations.proto\032\027google/api/" - + "client.proto\032\037google/api/field_behavior." - + "proto\032\031google/api/httpbody.proto\032\031google" - + "/api/resource.proto\032&google/cloud/vertexai/v1/content.proto\032*google/cloud/vertex" - + "ai/v1/explanation.proto\032#google/cloud/vertexai/v1/tool.proto\032$google/cloud/verte" - + "xai/v1/types.proto\032-google/cloud/vertexa" - + "i/v1/usage_metadata.proto\032\034google/protob" - + "uf/struct.proto\032\037google/protobuf/timestamp.proto\"\244\002\n" - + "\016PredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022.\n" - + "\tinstances\030\002 \003(\0132\026.google.protobuf.ValueB\003\340A\002\022*\n\n" - + "parameters\030\003 \001(\0132\026.google.protobuf.Value\022I\n" - + "\006labels\030\004 \003(\01324." - + "google.cloud.vertexai.v1.PredictRequest.LabelsEntryB\003\340A\001\032-\n" - + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\200\002\n" - + "\017PredictResponse\022+\n" - + "\013predictions\030\001 \003(\0132\026.google.protobuf.Value\022\031\n" - + "\021deployed_model_id\030\002 \001(\t\0226\n" - + "\005model\030\003 \001(\tB\'\340A\003\372A!\n" - + "\037aiplatform.googleapis.com/Model\022\035\n" - + "\020model_version_id\030\005 \001(\tB\003\340A\003\022\037\n" - + "\022model_display_name\030\004 \001(\tB\003\340A\003\022-\n" - + "\010metadata\030\006 \001(\0132\026.google.protobuf.ValueB\003\340A\003\"z\n" - + "\021RawPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\'\n" - + "\thttp_body\030\002 \001(\0132\024.google.api.HttpBody\"\200\001\n" - + "\027StreamRawPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\'\n" - + "\thttp_body\030\002 \001(\0132\024.google.api.HttpBody\"\274\001\n" - + "\024DirectPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\0220\n" - + "\006inputs\030\002 \003(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" - + "parameters\030\003 \001(\0132 .google.cloud.vertexai.v1.Tensor\"\200\001\n" - + "\025DirectPredictResponse\0221\n" - + "\007outputs\030\001 \003(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" - + "parameters\030\002 \001(\0132 .google.cloud.vertexai.v1.Tensor\"{\n" - + "\027DirectRawPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\023\n" - + "\013method_name\030\002 \001(\t\022\r\n" - + "\005input\030\003 \001(\014\"*\n" - + "\030DirectRawPredictResponse\022\016\n" - + "\006output\030\001 \001(\014\"\314\001\n" - + "\032StreamDirectPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\0225\n" - + "\006inputs\030\002 \003(\0132 .google.cloud.vertexai.v1.TensorB\003\340A\001\0229\n\n" - + "parameters\030\003 \001(\0132" - + " .google.cloud.vertexai.v1.TensorB\003\340A\001\"\206\001\n" - + "\033StreamDirectPredictResponse\0221\n" - + "\007outputs\030\001 \003(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" - + "parameters\030\002 \001(\0132 .google.cloud.vertexai.v1.Tensor\"\213\001\n" - + "\035StreamDirectRawPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\030\n" - + "\013method_name\030\002 \001(\tB\003\340A\001\022\022\n" - + "\005input\030\003 \001(\014B\003\340A\001\"0\n" - + "\036StreamDirectRawPredictResponse\022\016\n" - + "\006output\030\001 \001(\014\"\277\001\n" - + "\027StreamingPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\0220\n" - + "\006inputs\030\002 \003(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" - + "parameters\030\003 \001(\0132 .google.cloud.vertexai.v1.Tensor\"\203\001\n" - + "\030StreamingPredictResponse\0221\n" - + "\007outputs\030\001 \003(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" - + "parameters\030\002 \001(\0132 .google.cloud.vertexai.v1.Tensor\"~\n" - + "\032StreamingRawPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\023\n" - + "\013method_name\030\002 \001(\t\022\r\n" - + "\005input\030\003 \001(\014\"-\n" - + "\033StreamingRawPredictResponse\022\016\n" - + "\006output\030\001 \001(\014\"\233\002\n" - + "\016ExplainRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022.\n" - + "\tinstances\030\002 \003(\0132\026.google.protobuf.ValueB\003\340A\002\022*\n\n" - + "parameters\030\004 \001(\0132\026.google.protobuf.Value\022T\n" - + "\031explanation_spec_override\030\005 \001(\01321.go" - + "ogle.cloud.vertexai.v1.ExplanationSpecOverride\022\031\n" - + "\021deployed_model_id\030\003 \001(\t\"\226\001\n" - + "\017ExplainResponse\022;\n" - + "\014explanations\030\001 \003(\0132%.google.cloud.vertexai.v1.Explanation\022\031\n" - + "\021deployed_model_id\030\002 \001(\t\022+\n" - + "\013predictions\030\003 \003(\0132\026.google.protobuf.Value\"\313\003\n" - + "\022CountTokensRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\022\022\n" - + "\005model\030\003 \001(\tB\003\340A\001\022.\n" - + "\tinstances\030\002 \003(\0132\026.google.protobuf.ValueB\003\340A\001\0228\n" - + "\010contents\030\004 \003(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\001\022G\n" - + "\022system_instruction\030\005" - + " \001(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\001H\000\210\001\001\0222\n" - + "\005tools\030\006 \003(\0132\036.google.cloud.vertexai.v1.ToolB\003\340A\001\022O\n" - + "\021generation_config\030\007 \001(\0132*.google.c" - + "loud.vertexai.v1.GenerationConfigB\003\340A\001H\001\210\001\001B\025\n" - + "\023_system_instructionB\024\n" - + "\022_generation_config\"\240\001\n" - + "\023CountTokensResponse\022\024\n" - + "\014total_tokens\030\001 \001(\005\022!\n" - + "\031total_billable_characters\030\002 \001(\005\022P\n" - + "\025prompt_tokens_details\030\003 \003(\013" - + "2,.google.cloud.vertexai.v1.ModalityTokenCountB\003\340A\003\"\345\005\n" - + "\026GenerateContentRequest\022\022\n" - + "\005model\030\005 \001(\tB\003\340A\002\0228\n" - + "\010contents\030\002 \003(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\002\022G\n" - + "\022system_instruction\030\010" - + " \001(\0132!.google.cloud.vertexai.v1.ContentB\003\340A\001H\000\210\001\001\022G\n" - + "\016cached_content\030\t \001(\tB/\340A\001\372A)\n" - + "\'aiplatform.googleapis.com/CachedContent\0222\n" - + "\005tools\030\006 \003(\0132\036.google.cloud.vertexai.v1.ToolB\003\340A\001\022>\n" - + "\013tool_config\030\007" - + " \001(\0132$.google.cloud.vertexai.v1.ToolConfigB\003\340A\001\022Q\n" - + "\006labels\030\n" - + " \003(\0132<.goo" - + "gle.cloud.vertexai.v1.GenerateContentRequest.LabelsEntryB\003\340A\001\022E\n" - + "\017safety_settings\030\003" - + " \003(\0132\'.google.cloud.vertexai.v1.SafetySettingB\003\340A\001\022K\n" - + "\022model_armor_config\030\013 \001(\013" - + "2*.google.cloud.vertexai.v1.ModelArmorConfigB\003\340A\001\022J\n" - + "\021generation_config\030\004 \001(\0132*.g" - + "oogle.cloud.vertexai.v1.GenerationConfigB\003\340A\001\032-\n" - + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001B\025\n" - + "\023_system_instruction\"\240\t\n" - + "\027GenerateContentResponse\022<\n\n" - + "candidates\030\002 " - + "\003(\0132#.google.cloud.vertexai.v1.CandidateB\003\340A\003\022\032\n\r" - + "model_version\030\013 \001(\tB\003\340A\003\0224\n" - + "\013create_time\030\014" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" - + "\013response_id\030\r" - + " \001(\tB\003\340A\003\022^\n" - + "\017prompt_feedback\030\003 \001(\0132@.google.cloud.vertex" - + "ai.v1.GenerateContentResponse.PromptFeedbackB\003\340A\003\022W\n" - + "\016usage_metadata\030\004 \001(\0132?.goog" - + "le.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata\032\363\002\n" - + "\016PromptFeedback\022i\n" - + "\014block_reason\030\001 \001(\0162N.google.cloud.verte" - + "xai.v1.GenerateContentResponse.PromptFeedback.BlockedReasonB\003\340A\003\022C\n" - + "\016safety_ratings\030\002" - + " \003(\0132&.google.cloud.vertexai.v1.SafetyRatingB\003\340A\003\022!\n" - + "\024block_reason_message\030\003 \001(\tB\003\340A\003\"\215\001\n\r" - + "BlockedReason\022\036\n" - + "\032BLOCKED_REASON_UNSPECIFIED\020\000\022\n\n" - + "\006SAFETY\020\001\022\t\n" - + "\005OTHER\020\002\022\r\n" - + "\tBLOCKLIST\020\003\022\026\n" - + "\022PROHIBITED_CONTENT\020\004\022\017\n" - + "\013MODEL_ARMOR\020\005\022\r\n" - + "\tJAILBREAK\020\006\032\253\003\n\r" - + "UsageMetadata\022\032\n" - + "\022prompt_token_count\030\001 \001(\005\022\036\n" - + "\026candidates_token_count\030\002 \001(\005\022!\n" - + "\024thoughts_token_count\030\016 \001(\005B\003\340A\003\022\031\n" - + "\021total_token_count\030\003 \001(\005\022\'\n" - + "\032cached_content_token_count\030\005 \001(\005B\003\340A\003\022P\n" - + "\025prompt_tokens_details\030\t" - + " \003(\0132,.google.cloud.vertexai.v1.ModalityTokenCountB\003\340A\003\022O\n" - + "\024cache_tokens_details\030\n" - + " \003(\0132,.google.cloud.vertexai.v1.ModalityTokenCountB\003\340A\003\022T\n" - + "\031candidates_tokens_details\030\013" - + " \003(\0132,.google.cloud.vertexai.v1.ModalityTokenCountB\003\340A\003\"\200\005\n" - + "\023EmbedContentRequest\022;\n" - + "\005model\030\001 \001(\tB\'\372A$\n" - + "\"aiplatform.googleapis.com/EndpointH\000\210\001\001\0227\n" - + "\007content\030\002" - + " \001(\0132!.google.cloud.vertexai.v1.ContentH\001\210\001\001\022\027\n" - + "\005title\030\004 \001(\tB\003\340A\001H\002\210\001\001\022\\\n" - + "\ttask_type\030\005 \001(\0162?.google.cloud.vertexai.v1.Embe" - + "dContentRequest.EmbeddingTaskTypeB\003\340A\001H\003\210\001\001\022\'\n" - + "\025output_dimensionality\030\006 \001(\005B\003\340A\001H\004\210\001\001\022\037\n\r" - + "auto_truncate\030\007 \001(\010B\003\340A\001H\005\210\001\001\"\327\001\n" - + "\021EmbeddingTaskType\022\017\n" - + "\013UNSPECIFIED\020\000\022\023\n" - + "\017RETRIEVAL_QUERY\020\002\022\026\n" - + "\022RETRIEVAL_DOCUMENT\020\003\022\027\n" - + "\023SEMANTIC_SIMILARITY\020\004\022\022\n" - + "\016CLASSIFICATION\020\005\022\016\n\n" - + "CLUSTERING\020\006\022\026\n" - + "\022QUESTION_ANSWERING\020\007\022\025\n" - + "\021FACT_VERIFICATION\020\010\022\030\n" - + "\024CODE_RETRIEVAL_QUERY\020\tB\010\n" - + "\006_modelB\n\n" - + "\010_contentB\010\n" - + "\006_titleB\014\n\n" - + "_task_typeB\030\n" - + "\026_output_dimensionalityB\020\n" - + "\016_auto_truncate\"\324\001\n" - + "\024EmbedContentResponse\022K\n" - + "\tembedding\030\001 \001(\01328.google.c" - + "loud.vertexai.v1.EmbedContentResponse.Embedding\022?\n" - + "\016usage_metadata\030\002" - + " \001(\0132\'.google.cloud.vertexai.v1.UsageMetadata\022\021\n" - + "\ttruncated\030\004 \001(\010\032\033\n" - + "\tEmbedding\022\016\n" - + "\006values\030\001 \003(\0022\223\033\n" - + "\021PredictionService\022\220\002\n" - + "\007Predict\022(.google.cloud.vertexai.v1.PredictRequest\032).g" - + "oogle.cloud.vertexai.v1.PredictResponse\"" - + "\257\001\332A\035endpoint,instances,parameters\202\323\344\223\002\210" - + "\001\"9/v1/{endpoint=projects/*/locations/*/" - + "endpoints/*}:predict:\001*ZH\"C/v1/{endpoint" - + "=projects/*/locations/*/publishers/*/models/*}:predict:\001*\022\374\001\n\n" - + "RawPredict\022+.google.cloud.vertexai.v1.RawPredictRequest\032\024." - + "google.api.HttpBody\"\252\001\332A\022endpoint,http_b" - + "ody\202\323\344\223\002\216\001\"\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\001*\022\211\003\n" - + "\017GenerateContent\0220.google.cloud.vertexai.v1.Gener" - + "ateContentRequest\0321.google.cloud.vertexa" - + "i.v1.GenerateContentResponse\"\220\002\332A\016model," - + "contents\202\323\344\223\002\370\001\">/v1/{model=projects/*/l" - + "ocations/*/endpoints/*}:generateContent:\001*ZM\"H/v1/{model=projects/*/locations/*/" - + "publishers/*/models/*}:generateContent:\001*Z,\"\'/v1/{model=endpoints/*}:generateCon" - + "tent:\001*Z6\"1/v1/{model=publishers/*/models/*}:generateContent:\001*\022\251\003\n" - + "\025StreamGenerateContent\0220.google.cloud.vertexai.v1.Gen" - + "erateContentRequest\0321.google.cloud.verte" - + "xai.v1.GenerateContentResponse\"\250\002\332A\016mode" - + "l,contents\202\323\344\223\002\220\002\"D/v1/{model=projects/*" - + "/locations/*/endpoints/*}:streamGenerateContent:\001*ZS\"N/v1/{model=projects/*/loca" - + "tions/*/publishers/*/models/*}:streamGenerateContent:\001*Z2\"-/v1/{model=endpoints/" - + "*}:streamGenerateContent:\001*Z<\"7/v1/{mode" - + "l=publishers/*/models/*}:streamGenerateContent:\001*0\001\022\317\001\n" - + "\014EmbedContent\022-.google.cloud.vertexai.v1.EmbedContentRequest\032..go" - + "ogle.cloud.vertexai.v1.EmbedContentResponse\"`\332A\r" - + "model,content\202\323\344\223\002J\"E/v1/{model=" - + "projects/*/locations/*/publishers/*/mode" - + "ls/*}:embedContent:\001*\032\206\001\312A\031aiplatform.go" - + "ogleapis.com\322Aghttps://www.googleapis.com/auth/cloud-platform,https://www.google" - + "apis.com/auth/cloud-platform.read-onlyB\323\001\n" - + "\035com.google.cloud.vertexai.apiB\026Predic" - + "tionServiceProtoP\001Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatform" - + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" - + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.HttpBodyProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.vertexai.api.ContentProto.getDescriptor(), - com.google.cloud.vertexai.api.ExplanationProto.getDescriptor(), - com.google.cloud.vertexai.api.ToolProto.getDescriptor(), - com.google.cloud.vertexai.api.TypesProto.getDescriptor(), - com.google.cloud.vertexai.api.UsageMetadataProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_PredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Instances", "Parameters", "Labels", - }); - internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_PredictRequest_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PredictRequest_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_PredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PredictResponse_descriptor, - new java.lang.String[] { - "Predictions", - "DeployedModelId", - "Model", - "ModelVersionId", - "ModelDisplayName", - "Metadata", - }); - internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_RawPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "HttpBody", - }); - internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "HttpBody", - }); - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Inputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_DirectPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor, - new java.lang.String[] { - "Outputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "MethodName", "Input", - }); - internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor, - new java.lang.String[] { - "Output", - }); - internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Inputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor, - new java.lang.String[] { - "Outputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "MethodName", "Input", - }); - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor, - new java.lang.String[] { - "Output", - }); - internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Inputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor, - new java.lang.String[] { - "Outputs", "Parameters", - }); - internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor = - getDescriptor().getMessageType(14); - internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor, - new java.lang.String[] { - "Endpoint", "MethodName", "Input", - }); - internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor = - getDescriptor().getMessageType(15); - internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor, - new java.lang.String[] { - "Output", - }); - internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor = - getDescriptor().getMessageType(16); - internal_static_google_cloud_vertexai_v1_ExplainRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor, - new java.lang.String[] { - "Endpoint", "Instances", "Parameters", "ExplanationSpecOverride", "DeployedModelId", - }); - internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor = - getDescriptor().getMessageType(17); - internal_static_google_cloud_vertexai_v1_ExplainResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor, - new java.lang.String[] { - "Explanations", "DeployedModelId", "Predictions", - }); - internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor = - getDescriptor().getMessageType(18); - internal_static_google_cloud_vertexai_v1_CountTokensRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor, - new java.lang.String[] { - "Endpoint", - "Model", - "Instances", - "Contents", - "SystemInstruction", - "Tools", - "GenerationConfig", - }); - internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor = - getDescriptor().getMessageType(19); - internal_static_google_cloud_vertexai_v1_CountTokensResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor, - new java.lang.String[] { - "TotalTokens", "TotalBillableCharacters", "PromptTokensDetails", - }); - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor = - getDescriptor().getMessageType(20); - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor, - new java.lang.String[] { - "Model", - "Contents", - "SystemInstruction", - "CachedContent", - "Tools", - "ToolConfig", - "Labels", - "SafetySettings", - "ModelArmorConfig", - "GenerationConfig", - }); - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_descriptor = - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenerateContentRequest_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor = - getDescriptor().getMessageType(21); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor, - new java.lang.String[] { - "Candidates", - "ModelVersion", - "CreateTime", - "ResponseId", - "PromptFeedback", - "UsageMetadata", - }); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor = - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor.getNestedType( - 0); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_PromptFeedback_descriptor, - new java.lang.String[] { - "BlockReason", "SafetyRatings", "BlockReasonMessage", - }); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor = - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor.getNestedType( - 1); - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GenerateContentResponse_UsageMetadata_descriptor, - new java.lang.String[] { - "PromptTokenCount", - "CandidatesTokenCount", - "ThoughtsTokenCount", - "TotalTokenCount", - "CachedContentTokenCount", - "PromptTokensDetails", - "CacheTokensDetails", - "CandidatesTokensDetails", - }); - internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor = - getDescriptor().getMessageType(22); - internal_static_google_cloud_vertexai_v1_EmbedContentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_EmbedContentRequest_descriptor, - new java.lang.String[] { - "Model", "Content", "Title", "TaskType", "OutputDimensionality", "AutoTruncate", - }); - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor = - getDescriptor().getMessageType(23); - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor, - new java.lang.String[] { - "Embedding", "UsageMetadata", "Truncated", - }); - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor = - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_EmbedContentResponse_Embedding_descriptor, - new java.lang.String[] { - "Values", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.HttpBodyProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.ContentProto.getDescriptor(); - com.google.cloud.vertexai.api.ExplanationProto.getDescriptor(); - com.google.cloud.vertexai.api.ToolProto.getDescriptor(); - com.google.cloud.vertexai.api.TypesProto.getDescriptor(); - com.google.cloud.vertexai.api.UsageMetadataProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - 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); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java deleted file mode 100644 index 284863223bad..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java +++ /dev/null @@ -1,1125 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Preset configuration for example-based explanations
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Presets} - */ -@com.google.protobuf.Generated -public final class Presets extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Presets) - PresetsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Presets"); - } - - // Use Presets.newBuilder() to construct. - private Presets(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Presets() { - query_ = 0; - modality_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Presets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Presets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Presets.class, - com.google.cloud.vertexai.api.Presets.Builder.class); - } - - /** - * - * - *
-   * Preset option controlling parameters for query speed-precision trade-off
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Presets.Query} - */ - public enum Query implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * More precise neighbors as a trade-off against slower response.
-     * 
- * - * PRECISE = 0; - */ - PRECISE(0), - /** - * - * - *
-     * Faster response as a trade-off against less precise neighbors.
-     * 
- * - * FAST = 1; - */ - FAST(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Query"); - } - - /** - * - * - *
-     * More precise neighbors as a trade-off against slower response.
-     * 
- * - * PRECISE = 0; - */ - public static final int PRECISE_VALUE = 0; - - /** - * - * - *
-     * Faster response as a trade-off against less precise neighbors.
-     * 
- * - * FAST = 1; - */ - public static final int FAST_VALUE = 1; - - 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 Query 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 Query forNumber(int value) { - switch (value) { - case 0: - return PRECISE; - case 1: - return FAST; - 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 Query findValueByNumber(int number) { - return Query.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Presets.getDescriptor().getEnumTypes().get(0); - } - - private static final Query[] VALUES = values(); - - public static Query 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 Query(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Presets.Query) - } - - /** - * - * - *
-   * Preset option controlling parameters for different modalities
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Presets.Modality} - */ - public enum Modality implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Should not be set. Added as a recommended best practice for enums
-     * 
- * - * MODALITY_UNSPECIFIED = 0; - */ - MODALITY_UNSPECIFIED(0), - /** - * - * - *
-     * IMAGE modality
-     * 
- * - * IMAGE = 1; - */ - IMAGE(1), - /** - * - * - *
-     * TEXT modality
-     * 
- * - * TEXT = 2; - */ - TEXT(2), - /** - * - * - *
-     * TABULAR modality
-     * 
- * - * TABULAR = 3; - */ - TABULAR(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Modality"); - } - - /** - * - * - *
-     * Should not be set. Added as a recommended best practice for enums
-     * 
- * - * MODALITY_UNSPECIFIED = 0; - */ - public static final int MODALITY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * IMAGE modality
-     * 
- * - * IMAGE = 1; - */ - public static final int IMAGE_VALUE = 1; - - /** - * - * - *
-     * TEXT modality
-     * 
- * - * TEXT = 2; - */ - public static final int TEXT_VALUE = 2; - - /** - * - * - *
-     * TABULAR modality
-     * 
- * - * TABULAR = 3; - */ - public static final int TABULAR_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 Modality 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 Modality forNumber(int value) { - switch (value) { - case 0: - return MODALITY_UNSPECIFIED; - case 1: - return IMAGE; - case 2: - return TEXT; - case 3: - return TABULAR; - 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 Modality findValueByNumber(int number) { - return Modality.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Presets.getDescriptor().getEnumTypes().get(1); - } - - private static final Modality[] VALUES = values(); - - public static Modality 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 Modality(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Presets.Modality) - } - - private int bitField0_; - public static final int QUERY_FIELD_NUMBER = 1; - private int query_ = 0; - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return Whether the query field is set. - */ - @java.lang.Override - public boolean hasQuery() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The enum numeric value on the wire for query. - */ - @java.lang.Override - public int getQueryValue() { - return query_; - } - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The query. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets.Query getQuery() { - com.google.cloud.vertexai.api.Presets.Query result = - com.google.cloud.vertexai.api.Presets.Query.forNumber(query_); - return result == null ? com.google.cloud.vertexai.api.Presets.Query.UNRECOGNIZED : result; - } - - public static final int MODALITY_FIELD_NUMBER = 2; - private int modality_ = 0; - - /** - * - * - *
-   * The modality of the uploaded model, which automatically configures the
-   * distance measurement and feature normalization for the underlying example
-   * index and queries. If your model does not precisely fit one of these types,
-   * it is okay to choose the closest type.
-   * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The enum numeric value on the wire for modality. - */ - @java.lang.Override - public int getModalityValue() { - return modality_; - } - - /** - * - * - *
-   * The modality of the uploaded model, which automatically configures the
-   * distance measurement and feature normalization for the underlying example
-   * index and queries. If your model does not precisely fit one of these types,
-   * it is okay to choose the closest type.
-   * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The modality. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets.Modality getModality() { - com.google.cloud.vertexai.api.Presets.Modality result = - com.google.cloud.vertexai.api.Presets.Modality.forNumber(modality_); - return result == null ? com.google.cloud.vertexai.api.Presets.Modality.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 (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, query_); - } - if (modality_ - != com.google.cloud.vertexai.api.Presets.Modality.MODALITY_UNSPECIFIED.getNumber()) { - output.writeEnum(2, modality_); - } - 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.computeEnumSize(1, query_); - } - if (modality_ - != com.google.cloud.vertexai.api.Presets.Modality.MODALITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, modality_); - } - 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.vertexai.api.Presets)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Presets other = (com.google.cloud.vertexai.api.Presets) obj; - - if (hasQuery() != other.hasQuery()) return false; - if (hasQuery()) { - if (query_ != other.query_) return false; - } - if (modality_ != other.modality_) 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 (hasQuery()) { - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + query_; - } - hash = (37 * hash) + MODALITY_FIELD_NUMBER; - hash = (53 * hash) + modality_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Presets parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Presets 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.vertexai.api.Presets parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Presets 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.vertexai.api.Presets parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Presets parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Presets parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Presets parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Presets parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Presets parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Presets parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Presets parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Presets 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Preset configuration for example-based explanations
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Presets} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Presets) - com.google.cloud.vertexai.api.PresetsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Presets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Presets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Presets.class, - com.google.cloud.vertexai.api.Presets.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Presets.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - query_ = 0; - modality_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_Presets_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Presets getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Presets.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Presets build() { - com.google.cloud.vertexai.api.Presets result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Presets buildPartial() { - com.google.cloud.vertexai.api.Presets result = - new com.google.cloud.vertexai.api.Presets(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Presets result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.query_ = query_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.modality_ = modality_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Presets) { - return mergeFrom((com.google.cloud.vertexai.api.Presets) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Presets other) { - if (other == com.google.cloud.vertexai.api.Presets.getDefaultInstance()) return this; - if (other.hasQuery()) { - setQueryValue(other.getQueryValue()); - } - if (other.modality_ != 0) { - setModalityValue(other.getModalityValue()); - } - 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: - { - query_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - modality_ = input.readEnum(); - 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 query_ = 0; - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return Whether the query field is set. - */ - @java.lang.Override - public boolean hasQuery() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The enum numeric value on the wire for query. - */ - @java.lang.Override - public int getQueryValue() { - return query_; - } - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @param value The enum numeric value on the wire for query to set. - * @return This builder for chaining. - */ - public Builder setQueryValue(int value) { - query_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The query. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets.Query getQuery() { - com.google.cloud.vertexai.api.Presets.Query result = - com.google.cloud.vertexai.api.Presets.Query.forNumber(query_); - return result == null ? com.google.cloud.vertexai.api.Presets.Query.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery(com.google.cloud.vertexai.api.Presets.Query value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - query_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Preset option controlling parameters for speed-precision trade-off when
-     * querying for examples. If omitted, defaults to `PRECISE`.
-     * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return This builder for chaining. - */ - public Builder clearQuery() { - bitField0_ = (bitField0_ & ~0x00000001); - query_ = 0; - onChanged(); - return this; - } - - private int modality_ = 0; - - /** - * - * - *
-     * The modality of the uploaded model, which automatically configures the
-     * distance measurement and feature normalization for the underlying example
-     * index and queries. If your model does not precisely fit one of these types,
-     * it is okay to choose the closest type.
-     * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The enum numeric value on the wire for modality. - */ - @java.lang.Override - public int getModalityValue() { - return modality_; - } - - /** - * - * - *
-     * The modality of the uploaded model, which automatically configures the
-     * distance measurement and feature normalization for the underlying example
-     * index and queries. If your model does not precisely fit one of these types,
-     * it is okay to choose the closest type.
-     * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @param value The enum numeric value on the wire for modality to set. - * @return This builder for chaining. - */ - public Builder setModalityValue(int value) { - modality_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The modality of the uploaded model, which automatically configures the
-     * distance measurement and feature normalization for the underlying example
-     * index and queries. If your model does not precisely fit one of these types,
-     * it is okay to choose the closest type.
-     * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The modality. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Presets.Modality getModality() { - com.google.cloud.vertexai.api.Presets.Modality result = - com.google.cloud.vertexai.api.Presets.Modality.forNumber(modality_); - return result == null ? com.google.cloud.vertexai.api.Presets.Modality.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * The modality of the uploaded model, which automatically configures the
-     * distance measurement and feature normalization for the underlying example
-     * index and queries. If your model does not precisely fit one of these types,
-     * it is okay to choose the closest type.
-     * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @param value The modality to set. - * @return This builder for chaining. - */ - public Builder setModality(com.google.cloud.vertexai.api.Presets.Modality value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - modality_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * The modality of the uploaded model, which automatically configures the
-     * distance measurement and feature normalization for the underlying example
-     * index and queries. If your model does not precisely fit one of these types,
-     * it is okay to choose the closest type.
-     * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return This builder for chaining. - */ - public Builder clearModality() { - bitField0_ = (bitField0_ & ~0x00000002); - modality_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Presets) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Presets) - private static final com.google.cloud.vertexai.api.Presets DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Presets(); - } - - public static com.google.cloud.vertexai.api.Presets getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Presets 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.vertexai.api.Presets getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java deleted file mode 100644 index ea58ecfd9d4d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PresetsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Presets) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return Whether the query field is set. - */ - boolean hasQuery(); - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The enum numeric value on the wire for query. - */ - int getQueryValue(); - - /** - * - * - *
-   * Preset option controlling parameters for speed-precision trade-off when
-   * querying for examples. If omitted, defaults to `PRECISE`.
-   * 
- * - * optional .google.cloud.vertexai.v1.Presets.Query query = 1; - * - * @return The query. - */ - com.google.cloud.vertexai.api.Presets.Query getQuery(); - - /** - * - * - *
-   * The modality of the uploaded model, which automatically configures the
-   * distance measurement and feature normalization for the underlying example
-   * index and queries. If your model does not precisely fit one of these types,
-   * it is okay to choose the closest type.
-   * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The enum numeric value on the wire for modality. - */ - int getModalityValue(); - - /** - * - * - *
-   * The modality of the uploaded model, which automatically configures the
-   * distance measurement and feature normalization for the underlying example
-   * index and queries. If your model does not precisely fit one of these types,
-   * it is okay to choose the closest type.
-   * 
- * - * .google.cloud.vertexai.v1.Presets.Modality modality = 2; - * - * @return The modality. - */ - com.google.cloud.vertexai.api.Presets.Modality getModality(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java deleted file mode 100644 index 3cdbb7466cff..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java +++ /dev/null @@ -1,1177 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * PrivateEndpoints proto is used to provide paths for users to send
- * requests privately.
- * To send request via private service access, use predict_http_uri,
- * explain_http_uri or health_http_uri. To send request via private service
- * connect, use service_attachment.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrivateEndpoints} - */ -@com.google.protobuf.Generated -public final class PrivateEndpoints extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PrivateEndpoints) - PrivateEndpointsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PrivateEndpoints"); - } - - // Use PrivateEndpoints.newBuilder() to construct. - private PrivateEndpoints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PrivateEndpoints() { - predictHttpUri_ = ""; - explainHttpUri_ = ""; - healthHttpUri_ = ""; - serviceAttachment_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PrivateEndpoints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrivateEndpoints.class, - com.google.cloud.vertexai.api.PrivateEndpoints.Builder.class); - } - - public static final int PREDICT_HTTP_URI_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object predictHttpUri_ = ""; - - /** - * - * - *
-   * Output only. Http(s) path to send prediction requests.
-   * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The predictHttpUri. - */ - @java.lang.Override - public java.lang.String getPredictHttpUri() { - java.lang.Object ref = predictHttpUri_; - 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(); - predictHttpUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Http(s) path to send prediction requests.
-   * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for predictHttpUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPredictHttpUriBytes() { - java.lang.Object ref = predictHttpUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - predictHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXPLAIN_HTTP_URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object explainHttpUri_ = ""; - - /** - * - * - *
-   * Output only. Http(s) path to send explain requests.
-   * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The explainHttpUri. - */ - @java.lang.Override - public java.lang.String getExplainHttpUri() { - java.lang.Object ref = explainHttpUri_; - 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(); - explainHttpUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Http(s) path to send explain requests.
-   * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for explainHttpUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getExplainHttpUriBytes() { - java.lang.Object ref = explainHttpUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explainHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HEALTH_HTTP_URI_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object healthHttpUri_ = ""; - - /** - * - * - *
-   * Output only. Http(s) path to send health check requests.
-   * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The healthHttpUri. - */ - @java.lang.Override - public java.lang.String getHealthHttpUri() { - java.lang.Object ref = healthHttpUri_; - 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(); - healthHttpUri_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. Http(s) path to send health check requests.
-   * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for healthHttpUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHealthHttpUriBytes() { - java.lang.Object ref = healthHttpUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - healthHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ATTACHMENT_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAttachment_ = ""; - - /** - * - * - *
-   * Output only. The name of the service attachment resource. Populated if
-   * private service connect is enabled.
-   * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - @java.lang.Override - public java.lang.String getServiceAttachment() { - java.lang.Object ref = serviceAttachment_; - 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(); - serviceAttachment_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The name of the service attachment resource. Populated if
-   * private service connect is enabled.
-   * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAttachmentBytes() { - java.lang.Object ref = serviceAttachment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAttachment_ = 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.GeneratedMessage.isStringEmpty(predictHttpUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, predictHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explainHttpUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, explainHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(healthHttpUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, healthHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, serviceAttachment_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(predictHttpUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, predictHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explainHttpUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, explainHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(healthHttpUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, healthHttpUri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, serviceAttachment_); - } - 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.vertexai.api.PrivateEndpoints)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PrivateEndpoints other = - (com.google.cloud.vertexai.api.PrivateEndpoints) obj; - - if (!getPredictHttpUri().equals(other.getPredictHttpUri())) return false; - if (!getExplainHttpUri().equals(other.getExplainHttpUri())) return false; - if (!getHealthHttpUri().equals(other.getHealthHttpUri())) return false; - if (!getServiceAttachment().equals(other.getServiceAttachment())) 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) + PREDICT_HTTP_URI_FIELD_NUMBER; - hash = (53 * hash) + getPredictHttpUri().hashCode(); - hash = (37 * hash) + EXPLAIN_HTTP_URI_FIELD_NUMBER; - hash = (53 * hash) + getExplainHttpUri().hashCode(); - hash = (37 * hash) + HEALTH_HTTP_URI_FIELD_NUMBER; - hash = (53 * hash) + getHealthHttpUri().hashCode(); - hash = (37 * hash) + SERVICE_ATTACHMENT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAttachment().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints 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.vertexai.api.PrivateEndpoints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints 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.vertexai.api.PrivateEndpoints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PrivateEndpoints 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * PrivateEndpoints proto is used to provide paths for users to send
-   * requests privately.
-   * To send request via private service access, use predict_http_uri,
-   * explain_http_uri or health_http_uri. To send request via private service
-   * connect, use service_attachment.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrivateEndpoints} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PrivateEndpoints) - com.google.cloud.vertexai.api.PrivateEndpointsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PrivateEndpoints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrivateEndpoints.class, - com.google.cloud.vertexai.api.PrivateEndpoints.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PrivateEndpoints.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - predictHttpUri_ = ""; - explainHttpUri_ = ""; - healthHttpUri_ = ""; - serviceAttachment_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_PrivateEndpoints_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateEndpoints getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateEndpoints build() { - com.google.cloud.vertexai.api.PrivateEndpoints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateEndpoints buildPartial() { - com.google.cloud.vertexai.api.PrivateEndpoints result = - new com.google.cloud.vertexai.api.PrivateEndpoints(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PrivateEndpoints result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.predictHttpUri_ = predictHttpUri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.explainHttpUri_ = explainHttpUri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.healthHttpUri_ = healthHttpUri_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAttachment_ = serviceAttachment_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PrivateEndpoints) { - return mergeFrom((com.google.cloud.vertexai.api.PrivateEndpoints) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PrivateEndpoints other) { - if (other == com.google.cloud.vertexai.api.PrivateEndpoints.getDefaultInstance()) return this; - if (!other.getPredictHttpUri().isEmpty()) { - predictHttpUri_ = other.predictHttpUri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getExplainHttpUri().isEmpty()) { - explainHttpUri_ = other.explainHttpUri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getHealthHttpUri().isEmpty()) { - healthHttpUri_ = other.healthHttpUri_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServiceAttachment().isEmpty()) { - serviceAttachment_ = other.serviceAttachment_; - 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: - { - predictHttpUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - explainHttpUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - healthHttpUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - serviceAttachment_ = 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 predictHttpUri_ = ""; - - /** - * - * - *
-     * Output only. Http(s) path to send prediction requests.
-     * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The predictHttpUri. - */ - public java.lang.String getPredictHttpUri() { - java.lang.Object ref = predictHttpUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - predictHttpUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send prediction requests.
-     * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for predictHttpUri. - */ - public com.google.protobuf.ByteString getPredictHttpUriBytes() { - java.lang.Object ref = predictHttpUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - predictHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send prediction requests.
-     * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The predictHttpUri to set. - * @return This builder for chaining. - */ - public Builder setPredictHttpUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - predictHttpUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send prediction requests.
-     * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearPredictHttpUri() { - predictHttpUri_ = getDefaultInstance().getPredictHttpUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send prediction requests.
-     * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for predictHttpUri to set. - * @return This builder for chaining. - */ - public Builder setPredictHttpUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - predictHttpUri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object explainHttpUri_ = ""; - - /** - * - * - *
-     * Output only. Http(s) path to send explain requests.
-     * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The explainHttpUri. - */ - public java.lang.String getExplainHttpUri() { - java.lang.Object ref = explainHttpUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - explainHttpUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send explain requests.
-     * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for explainHttpUri. - */ - public com.google.protobuf.ByteString getExplainHttpUriBytes() { - java.lang.Object ref = explainHttpUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - explainHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send explain requests.
-     * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The explainHttpUri to set. - * @return This builder for chaining. - */ - public Builder setExplainHttpUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - explainHttpUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send explain requests.
-     * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearExplainHttpUri() { - explainHttpUri_ = getDefaultInstance().getExplainHttpUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send explain requests.
-     * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for explainHttpUri to set. - * @return This builder for chaining. - */ - public Builder setExplainHttpUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - explainHttpUri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object healthHttpUri_ = ""; - - /** - * - * - *
-     * Output only. Http(s) path to send health check requests.
-     * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The healthHttpUri. - */ - public java.lang.String getHealthHttpUri() { - java.lang.Object ref = healthHttpUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - healthHttpUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send health check requests.
-     * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for healthHttpUri. - */ - public com.google.protobuf.ByteString getHealthHttpUriBytes() { - java.lang.Object ref = healthHttpUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - healthHttpUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. Http(s) path to send health check requests.
-     * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The healthHttpUri to set. - * @return This builder for chaining. - */ - public Builder setHealthHttpUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - healthHttpUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send health check requests.
-     * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearHealthHttpUri() { - healthHttpUri_ = getDefaultInstance().getHealthHttpUri(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Http(s) path to send health check requests.
-     * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for healthHttpUri to set. - * @return This builder for chaining. - */ - public Builder setHealthHttpUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - healthHttpUri_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serviceAttachment_ = ""; - - /** - * - * - *
-     * Output only. The name of the service attachment resource. Populated if
-     * private service connect is enabled.
-     * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - public java.lang.String getServiceAttachment() { - java.lang.Object ref = serviceAttachment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAttachment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The name of the service attachment resource. Populated if
-     * private service connect is enabled.
-     * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - public com.google.protobuf.ByteString getServiceAttachmentBytes() { - java.lang.Object ref = serviceAttachment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAttachment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The name of the service attachment resource. Populated if
-     * private service connect is enabled.
-     * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The serviceAttachment to set. - * @return This builder for chaining. - */ - public Builder setServiceAttachment(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAttachment_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The name of the service attachment resource. Populated if
-     * private service connect is enabled.
-     * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAttachment() { - serviceAttachment_ = getDefaultInstance().getServiceAttachment(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The name of the service attachment resource. Populated if
-     * private service connect is enabled.
-     * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for serviceAttachment to set. - * @return This builder for chaining. - */ - public Builder setServiceAttachmentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAttachment_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PrivateEndpoints) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PrivateEndpoints) - private static final com.google.cloud.vertexai.api.PrivateEndpoints DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PrivateEndpoints(); - } - - public static com.google.cloud.vertexai.api.PrivateEndpoints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrivateEndpoints 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.vertexai.api.PrivateEndpoints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java deleted file mode 100644 index f9adee320abb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PrivateEndpointsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PrivateEndpoints) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Http(s) path to send prediction requests.
-   * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The predictHttpUri. - */ - java.lang.String getPredictHttpUri(); - - /** - * - * - *
-   * Output only. Http(s) path to send prediction requests.
-   * 
- * - * string predict_http_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for predictHttpUri. - */ - com.google.protobuf.ByteString getPredictHttpUriBytes(); - - /** - * - * - *
-   * Output only. Http(s) path to send explain requests.
-   * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The explainHttpUri. - */ - java.lang.String getExplainHttpUri(); - - /** - * - * - *
-   * Output only. Http(s) path to send explain requests.
-   * 
- * - * string explain_http_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for explainHttpUri. - */ - com.google.protobuf.ByteString getExplainHttpUriBytes(); - - /** - * - * - *
-   * Output only. Http(s) path to send health check requests.
-   * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The healthHttpUri. - */ - java.lang.String getHealthHttpUri(); - - /** - * - * - *
-   * Output only. Http(s) path to send health check requests.
-   * 
- * - * string health_http_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for healthHttpUri. - */ - com.google.protobuf.ByteString getHealthHttpUriBytes(); - - /** - * - * - *
-   * Output only. The name of the service attachment resource. Populated if
-   * private service connect is enabled.
-   * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - java.lang.String getServiceAttachment(); - - /** - * - * - *
-   * Output only. The name of the service attachment resource. Populated if
-   * private service connect is enabled.
-   * 
- * - * string service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - com.google.protobuf.ByteString getServiceAttachmentBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfig.java deleted file mode 100644 index fe3db82f7467..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfig.java +++ /dev/null @@ -1,1618 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Represents configuration for private service connect.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrivateServiceConnectConfig} - */ -@com.google.protobuf.Generated -public final class PrivateServiceConnectConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PrivateServiceConnectConfig) - PrivateServiceConnectConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PrivateServiceConnectConfig"); - } - - // Use PrivateServiceConnectConfig.newBuilder() to construct. - private PrivateServiceConnectConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PrivateServiceConnectConfig() { - projectAllowlist_ = com.google.protobuf.LazyStringArrayList.emptyList(); - pscAutomationConfigs_ = java.util.Collections.emptyList(); - serviceAttachment_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.class, - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder.class); - } - - public static final int ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER = 1; - private boolean enablePrivateServiceConnect_ = false; - - /** - * - * - *
-   * Required. If true, expose the IndexEndpoint via private service connect.
-   * 
- * - * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The enablePrivateServiceConnect. - */ - @java.lang.Override - public boolean getEnablePrivateServiceConnect() { - return enablePrivateServiceConnect_; - } - - public static final int PROJECT_ALLOWLIST_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList projectAllowlist_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @return A list containing the projectAllowlist. - */ - public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { - return projectAllowlist_; - } - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @return The count of projectAllowlist. - */ - public int getProjectAllowlistCount() { - return projectAllowlist_.size(); - } - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the element to return. - * @return The projectAllowlist at the given index. - */ - public java.lang.String getProjectAllowlist(int index) { - return projectAllowlist_.get(index); - } - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the value to return. - * @return The bytes of the projectAllowlist at the given index. - */ - public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { - return projectAllowlist_.getByteString(index); - } - - public static final int PSC_AUTOMATION_CONFIGS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List pscAutomationConfigs_; - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getPscAutomationConfigsList() { - return pscAutomationConfigs_; - } - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getPscAutomationConfigsOrBuilderList() { - return pscAutomationConfigs_; - } - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getPscAutomationConfigsCount() { - return pscAutomationConfigs_.size(); - } - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationConfig getPscAutomationConfigs(int index) { - return pscAutomationConfigs_.get(index); - } - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder - getPscAutomationConfigsOrBuilder(int index) { - return pscAutomationConfigs_.get(index); - } - - public static final int SERVICE_ATTACHMENT_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAttachment_ = ""; - - /** - * - * - *
-   * Output only. The name of the generated service attachment resource.
-   * This is only populated if the endpoint is deployed with
-   * PrivateServiceConnect.
-   * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - @java.lang.Override - public java.lang.String getServiceAttachment() { - java.lang.Object ref = serviceAttachment_; - 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(); - serviceAttachment_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The name of the generated service attachment resource.
-   * This is only populated if the endpoint is deployed with
-   * PrivateServiceConnect.
-   * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAttachmentBytes() { - java.lang.Object ref = serviceAttachment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAttachment_ = 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 (enablePrivateServiceConnect_ != false) { - output.writeBool(1, enablePrivateServiceConnect_); - } - for (int i = 0; i < projectAllowlist_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, projectAllowlist_.getRaw(i)); - } - for (int i = 0; i < pscAutomationConfigs_.size(); i++) { - output.writeMessage(3, pscAutomationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, serviceAttachment_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enablePrivateServiceConnect_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateServiceConnect_); - } - { - int dataSize = 0; - for (int i = 0; i < projectAllowlist_.size(); i++) { - dataSize += computeStringSizeNoTag(projectAllowlist_.getRaw(i)); - } - size += dataSize; - size += 1 * getProjectAllowlistList().size(); - } - for (int i = 0; i < pscAutomationConfigs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, pscAutomationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, serviceAttachment_); - } - 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.vertexai.api.PrivateServiceConnectConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PrivateServiceConnectConfig other = - (com.google.cloud.vertexai.api.PrivateServiceConnectConfig) obj; - - if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; - if (!getProjectAllowlistList().equals(other.getProjectAllowlistList())) return false; - if (!getPscAutomationConfigsList().equals(other.getPscAutomationConfigsList())) return false; - if (!getServiceAttachment().equals(other.getServiceAttachment())) 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) + ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); - if (getProjectAllowlistCount() > 0) { - hash = (37 * hash) + PROJECT_ALLOWLIST_FIELD_NUMBER; - hash = (53 * hash) + getProjectAllowlistList().hashCode(); - } - if (getPscAutomationConfigsCount() > 0) { - hash = (37 * hash) + PSC_AUTOMATION_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getPscAutomationConfigsList().hashCode(); - } - hash = (37 * hash) + SERVICE_ATTACHMENT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAttachment().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig 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.vertexai.api.PrivateServiceConnectConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig 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.vertexai.api.PrivateServiceConnectConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PrivateServiceConnectConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Represents configuration for private service connect.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PrivateServiceConnectConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PrivateServiceConnectConfig) - com.google.cloud.vertexai.api.PrivateServiceConnectConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.class, - com.google.cloud.vertexai.api.PrivateServiceConnectConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PrivateServiceConnectConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enablePrivateServiceConnect_ = false; - projectAllowlist_ = com.google.protobuf.LazyStringArrayList.emptyList(); - if (pscAutomationConfigsBuilder_ == null) { - pscAutomationConfigs_ = java.util.Collections.emptyList(); - } else { - pscAutomationConfigs_ = null; - pscAutomationConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - serviceAttachment_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig build() { - com.google.cloud.vertexai.api.PrivateServiceConnectConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PrivateServiceConnectConfig buildPartial() { - com.google.cloud.vertexai.api.PrivateServiceConnectConfig result = - new com.google.cloud.vertexai.api.PrivateServiceConnectConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.PrivateServiceConnectConfig result) { - if (pscAutomationConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - pscAutomationConfigs_ = java.util.Collections.unmodifiableList(pscAutomationConfigs_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.pscAutomationConfigs_ = pscAutomationConfigs_; - } else { - result.pscAutomationConfigs_ = pscAutomationConfigsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.PrivateServiceConnectConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - projectAllowlist_.makeImmutable(); - result.projectAllowlist_ = projectAllowlist_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAttachment_ = serviceAttachment_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PrivateServiceConnectConfig) { - return mergeFrom((com.google.cloud.vertexai.api.PrivateServiceConnectConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PrivateServiceConnectConfig other) { - if (other == com.google.cloud.vertexai.api.PrivateServiceConnectConfig.getDefaultInstance()) - return this; - if (other.getEnablePrivateServiceConnect() != false) { - setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); - } - if (!other.projectAllowlist_.isEmpty()) { - if (projectAllowlist_.isEmpty()) { - projectAllowlist_ = other.projectAllowlist_; - bitField0_ |= 0x00000002; - } else { - ensureProjectAllowlistIsMutable(); - projectAllowlist_.addAll(other.projectAllowlist_); - } - onChanged(); - } - if (pscAutomationConfigsBuilder_ == null) { - if (!other.pscAutomationConfigs_.isEmpty()) { - if (pscAutomationConfigs_.isEmpty()) { - pscAutomationConfigs_ = other.pscAutomationConfigs_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.addAll(other.pscAutomationConfigs_); - } - onChanged(); - } - } else { - if (!other.pscAutomationConfigs_.isEmpty()) { - if (pscAutomationConfigsBuilder_.isEmpty()) { - pscAutomationConfigsBuilder_.dispose(); - pscAutomationConfigsBuilder_ = null; - pscAutomationConfigs_ = other.pscAutomationConfigs_; - bitField0_ = (bitField0_ & ~0x00000004); - pscAutomationConfigsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPscAutomationConfigsFieldBuilder() - : null; - } else { - pscAutomationConfigsBuilder_.addAllMessages(other.pscAutomationConfigs_); - } - } - } - if (!other.getServiceAttachment().isEmpty()) { - serviceAttachment_ = other.serviceAttachment_; - 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 8: - { - enablePrivateServiceConnect_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureProjectAllowlistIsMutable(); - projectAllowlist_.add(s); - break; - } // case 18 - case 26: - { - com.google.cloud.vertexai.api.PSCAutomationConfig m = - input.readMessage( - com.google.cloud.vertexai.api.PSCAutomationConfig.parser(), - extensionRegistry); - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.add(m); - } else { - pscAutomationConfigsBuilder_.addMessage(m); - } - break; - } // case 26 - case 42: - { - serviceAttachment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - 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 boolean enablePrivateServiceConnect_; - - /** - * - * - *
-     * Required. If true, expose the IndexEndpoint via private service connect.
-     * 
- * - * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enablePrivateServiceConnect. - */ - @java.lang.Override - public boolean getEnablePrivateServiceConnect() { - return enablePrivateServiceConnect_; - } - - /** - * - * - *
-     * Required. If true, expose the IndexEndpoint via private service connect.
-     * 
- * - * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enablePrivateServiceConnect to set. - * @return This builder for chaining. - */ - public Builder setEnablePrivateServiceConnect(boolean value) { - - enablePrivateServiceConnect_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. If true, expose the IndexEndpoint via private service connect.
-     * 
- * - * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEnablePrivateServiceConnect() { - bitField0_ = (bitField0_ & ~0x00000001); - enablePrivateServiceConnect_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList projectAllowlist_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureProjectAllowlistIsMutable() { - if (!projectAllowlist_.isModifiable()) { - projectAllowlist_ = new com.google.protobuf.LazyStringArrayList(projectAllowlist_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @return A list containing the projectAllowlist. - */ - public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { - projectAllowlist_.makeImmutable(); - return projectAllowlist_; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @return The count of projectAllowlist. - */ - public int getProjectAllowlistCount() { - return projectAllowlist_.size(); - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the element to return. - * @return The projectAllowlist at the given index. - */ - public java.lang.String getProjectAllowlist(int index) { - return projectAllowlist_.get(index); - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the value to return. - * @return The bytes of the projectAllowlist at the given index. - */ - public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { - return projectAllowlist_.getByteString(index); - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index to set the value at. - * @param value The projectAllowlist to set. - * @return This builder for chaining. - */ - public Builder setProjectAllowlist(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectAllowlistIsMutable(); - projectAllowlist_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param value The projectAllowlist to add. - * @return This builder for chaining. - */ - public Builder addProjectAllowlist(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProjectAllowlistIsMutable(); - projectAllowlist_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param values The projectAllowlist to add. - * @return This builder for chaining. - */ - public Builder addAllProjectAllowlist(java.lang.Iterable values) { - ensureProjectAllowlistIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projectAllowlist_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @return This builder for chaining. - */ - public Builder clearProjectAllowlist() { - projectAllowlist_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of Projects from which the forwarding rule will target the service
-     * attachment.
-     * 
- * - * repeated string project_allowlist = 2; - * - * @param value The bytes of the projectAllowlist to add. - * @return This builder for chaining. - */ - public Builder addProjectAllowlistBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProjectAllowlistIsMutable(); - projectAllowlist_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List - pscAutomationConfigs_ = java.util.Collections.emptyList(); - - private void ensurePscAutomationConfigsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - pscAutomationConfigs_ = - new java.util.ArrayList( - pscAutomationConfigs_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PSCAutomationConfig, - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder, - com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder> - pscAutomationConfigsBuilder_; - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPscAutomationConfigsList() { - if (pscAutomationConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pscAutomationConfigs_); - } else { - return pscAutomationConfigsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getPscAutomationConfigsCount() { - if (pscAutomationConfigsBuilder_ == null) { - return pscAutomationConfigs_.size(); - } else { - return pscAutomationConfigsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PSCAutomationConfig getPscAutomationConfigs(int index) { - if (pscAutomationConfigsBuilder_ == null) { - return pscAutomationConfigs_.get(index); - } else { - return pscAutomationConfigsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPscAutomationConfigs( - int index, com.google.cloud.vertexai.api.PSCAutomationConfig value) { - if (pscAutomationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.set(index, value); - onChanged(); - } else { - pscAutomationConfigsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPscAutomationConfigs( - int index, com.google.cloud.vertexai.api.PSCAutomationConfig.Builder builderForValue) { - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - pscAutomationConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPscAutomationConfigs( - com.google.cloud.vertexai.api.PSCAutomationConfig value) { - if (pscAutomationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.add(value); - onChanged(); - } else { - pscAutomationConfigsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPscAutomationConfigs( - int index, com.google.cloud.vertexai.api.PSCAutomationConfig value) { - if (pscAutomationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.add(index, value); - onChanged(); - } else { - pscAutomationConfigsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPscAutomationConfigs( - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder builderForValue) { - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.add(builderForValue.build()); - onChanged(); - } else { - pscAutomationConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPscAutomationConfigs( - int index, com.google.cloud.vertexai.api.PSCAutomationConfig.Builder builderForValue) { - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - pscAutomationConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllPscAutomationConfigs( - java.lang.Iterable values) { - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscAutomationConfigs_); - onChanged(); - } else { - pscAutomationConfigsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPscAutomationConfigs() { - if (pscAutomationConfigsBuilder_ == null) { - pscAutomationConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - pscAutomationConfigsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removePscAutomationConfigs(int index) { - if (pscAutomationConfigsBuilder_ == null) { - ensurePscAutomationConfigsIsMutable(); - pscAutomationConfigs_.remove(index); - onChanged(); - } else { - pscAutomationConfigsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PSCAutomationConfig.Builder getPscAutomationConfigsBuilder( - int index) { - return internalGetPscAutomationConfigsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder - getPscAutomationConfigsOrBuilder(int index) { - if (pscAutomationConfigsBuilder_ == null) { - return pscAutomationConfigs_.get(index); - } else { - return pscAutomationConfigsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPscAutomationConfigsOrBuilderList() { - if (pscAutomationConfigsBuilder_ != null) { - return pscAutomationConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pscAutomationConfigs_); - } - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PSCAutomationConfig.Builder - addPscAutomationConfigsBuilder() { - return internalGetPscAutomationConfigsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.PSCAutomationConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.PSCAutomationConfig.Builder addPscAutomationConfigsBuilder( - int index) { - return internalGetPscAutomationConfigsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.PSCAutomationConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. List of projects and networks where the PSC endpoints will be
-     * created. This field is used by Online Inference(Prediction) only.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPscAutomationConfigsBuilderList() { - return internalGetPscAutomationConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PSCAutomationConfig, - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder, - com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder> - internalGetPscAutomationConfigsFieldBuilder() { - if (pscAutomationConfigsBuilder_ == null) { - pscAutomationConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.PSCAutomationConfig, - com.google.cloud.vertexai.api.PSCAutomationConfig.Builder, - com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder>( - pscAutomationConfigs_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - pscAutomationConfigs_ = null; - } - return pscAutomationConfigsBuilder_; - } - - private java.lang.Object serviceAttachment_ = ""; - - /** - * - * - *
-     * Output only. The name of the generated service attachment resource.
-     * This is only populated if the endpoint is deployed with
-     * PrivateServiceConnect.
-     * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - public java.lang.String getServiceAttachment() { - java.lang.Object ref = serviceAttachment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAttachment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The name of the generated service attachment resource.
-     * This is only populated if the endpoint is deployed with
-     * PrivateServiceConnect.
-     * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - public com.google.protobuf.ByteString getServiceAttachmentBytes() { - java.lang.Object ref = serviceAttachment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAttachment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The name of the generated service attachment resource.
-     * This is only populated if the endpoint is deployed with
-     * PrivateServiceConnect.
-     * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The serviceAttachment to set. - * @return This builder for chaining. - */ - public Builder setServiceAttachment(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAttachment_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The name of the generated service attachment resource.
-     * This is only populated if the endpoint is deployed with
-     * PrivateServiceConnect.
-     * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAttachment() { - serviceAttachment_ = getDefaultInstance().getServiceAttachment(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The name of the generated service attachment resource.
-     * This is only populated if the endpoint is deployed with
-     * PrivateServiceConnect.
-     * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for serviceAttachment to set. - * @return This builder for chaining. - */ - public Builder setServiceAttachmentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAttachment_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PrivateServiceConnectConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PrivateServiceConnectConfig) - private static final com.google.cloud.vertexai.api.PrivateServiceConnectConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PrivateServiceConnectConfig(); - } - - public static com.google.cloud.vertexai.api.PrivateServiceConnectConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrivateServiceConnectConfig 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.vertexai.api.PrivateServiceConnectConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfigOrBuilder.java deleted file mode 100644 index e652d57c01c8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateServiceConnectConfigOrBuilder.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PrivateServiceConnectConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PrivateServiceConnectConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. If true, expose the IndexEndpoint via private service connect.
-   * 
- * - * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The enablePrivateServiceConnect. - */ - boolean getEnablePrivateServiceConnect(); - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @return A list containing the projectAllowlist. - */ - java.util.List getProjectAllowlistList(); - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @return The count of projectAllowlist. - */ - int getProjectAllowlistCount(); - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the element to return. - * @return The projectAllowlist at the given index. - */ - java.lang.String getProjectAllowlist(int index); - - /** - * - * - *
-   * A list of Projects from which the forwarding rule will target the service
-   * attachment.
-   * 
- * - * repeated string project_allowlist = 2; - * - * @param index The index of the value to return. - * @return The bytes of the projectAllowlist at the given index. - */ - com.google.protobuf.ByteString getProjectAllowlistBytes(int index); - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getPscAutomationConfigsList(); - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.PSCAutomationConfig getPscAutomationConfigs(int index); - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPscAutomationConfigsCount(); - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getPscAutomationConfigsOrBuilderList(); - - /** - * - * - *
-   * Optional. List of projects and networks where the PSC endpoints will be
-   * created. This field is used by Online Inference(Prediction) only.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.PSCAutomationConfig psc_automation_configs = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.PSCAutomationConfigOrBuilder getPscAutomationConfigsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. The name of the generated service attachment resource.
-   * This is only populated if the endpoint is deployed with
-   * PrivateServiceConnect.
-   * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAttachment. - */ - java.lang.String getServiceAttachment(); - - /** - * - * - *
-   * Output only. The name of the generated service attachment resource.
-   * This is only populated if the endpoint is deployed with
-   * PrivateServiceConnect.
-   * 
- * - * string service_attachment = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAttachment. - */ - com.google.protobuf.ByteString getServiceAttachmentBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpoints.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpoints.java deleted file mode 100644 index ff2eace72485..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpoints.java +++ /dev/null @@ -1,976 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * PscAutomatedEndpoints defines the output of the forwarding rule
- * automatically created by each PscAutomationConfig.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PscAutomatedEndpoints} - */ -@com.google.protobuf.Generated -public final class PscAutomatedEndpoints extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PscAutomatedEndpoints) - PscAutomatedEndpointsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PscAutomatedEndpoints"); - } - - // Use PscAutomatedEndpoints.newBuilder() to construct. - private PscAutomatedEndpoints(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PscAutomatedEndpoints() { - projectId_ = ""; - network_ = ""; - matchAddress_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PscAutomatedEndpoints.class, - com.google.cloud.vertexai.api.PscAutomatedEndpoints.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object projectId_ = ""; - - /** - * - * - *
-   * Corresponding project_id in pscAutomationConfigs
-   * 
- * - * 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; - } - } - - /** - * - * - *
-   * Corresponding project_id in pscAutomationConfigs
-   * 
- * - * 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 NETWORK_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object network_ = ""; - - /** - * - * - *
-   * Corresponding network in pscAutomationConfigs.
-   * 
- * - * string network = 2; - * - * @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; - } - } - - /** - * - * - *
-   * Corresponding network in pscAutomationConfigs.
-   * 
- * - * string network = 2; - * - * @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; - } - } - - public static final int MATCH_ADDRESS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object matchAddress_ = ""; - - /** - * - * - *
-   * Ip Address created by the automated forwarding rule.
-   * 
- * - * string match_address = 3; - * - * @return The matchAddress. - */ - @java.lang.Override - public java.lang.String getMatchAddress() { - java.lang.Object ref = matchAddress_; - 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(); - matchAddress_ = s; - return s; - } - } - - /** - * - * - *
-   * Ip Address created by the automated forwarding rule.
-   * 
- * - * string match_address = 3; - * - * @return The bytes for matchAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMatchAddressBytes() { - java.lang.Object ref = matchAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - matchAddress_ = 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.GeneratedMessage.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchAddress_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, matchAddress_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, network_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchAddress_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, matchAddress_); - } - 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.vertexai.api.PscAutomatedEndpoints)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PscAutomatedEndpoints other = - (com.google.cloud.vertexai.api.PscAutomatedEndpoints) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getNetwork().equals(other.getNetwork())) return false; - if (!getMatchAddress().equals(other.getMatchAddress())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - hash = (37 * hash) + MATCH_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getMatchAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints 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.vertexai.api.PscAutomatedEndpoints parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints 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.vertexai.api.PscAutomatedEndpoints parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PscAutomatedEndpoints 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * PscAutomatedEndpoints defines the output of the forwarding rule
-   * automatically created by each PscAutomationConfig.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PscAutomatedEndpoints} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PscAutomatedEndpoints) - com.google.cloud.vertexai.api.PscAutomatedEndpointsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PscAutomatedEndpoints.class, - com.google.cloud.vertexai.api.PscAutomatedEndpoints.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PscAutomatedEndpoints.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - projectId_ = ""; - network_ = ""; - matchAddress_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscAutomatedEndpoints getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PscAutomatedEndpoints.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscAutomatedEndpoints build() { - com.google.cloud.vertexai.api.PscAutomatedEndpoints result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscAutomatedEndpoints buildPartial() { - com.google.cloud.vertexai.api.PscAutomatedEndpoints result = - new com.google.cloud.vertexai.api.PscAutomatedEndpoints(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.PscAutomatedEndpoints result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.projectId_ = projectId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.network_ = network_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.matchAddress_ = matchAddress_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PscAutomatedEndpoints) { - return mergeFrom((com.google.cloud.vertexai.api.PscAutomatedEndpoints) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PscAutomatedEndpoints other) { - if (other == com.google.cloud.vertexai.api.PscAutomatedEndpoints.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getNetwork().isEmpty()) { - network_ = other.network_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getMatchAddress().isEmpty()) { - matchAddress_ = other.matchAddress_; - 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: - { - projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - matchAddress_ = 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 projectId_ = ""; - - /** - * - * - *
-     * Corresponding project_id in pscAutomationConfigs
-     * 
- * - * 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; - } - } - - /** - * - * - *
-     * Corresponding project_id in pscAutomationConfigs
-     * 
- * - * 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; - } - } - - /** - * - * - *
-     * Corresponding project_id in pscAutomationConfigs
-     * 
- * - * 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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Corresponding project_id in pscAutomationConfigs
-     * 
- * - * string project_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Corresponding project_id in pscAutomationConfigs
-     * 
- * - * 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_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object network_ = ""; - - /** - * - * - *
-     * Corresponding network in pscAutomationConfigs.
-     * 
- * - * string network = 2; - * - * @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; - } - } - - /** - * - * - *
-     * Corresponding network in pscAutomationConfigs.
-     * 
- * - * string network = 2; - * - * @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; - } - } - - /** - * - * - *
-     * Corresponding network in pscAutomationConfigs.
-     * 
- * - * string network = 2; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Corresponding network in pscAutomationConfigs.
-     * 
- * - * string network = 2; - * - * @return This builder for chaining. - */ - public Builder clearNetwork() { - network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Corresponding network in pscAutomationConfigs.
-     * 
- * - * string network = 2; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object matchAddress_ = ""; - - /** - * - * - *
-     * Ip Address created by the automated forwarding rule.
-     * 
- * - * string match_address = 3; - * - * @return The matchAddress. - */ - public java.lang.String getMatchAddress() { - java.lang.Object ref = matchAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - matchAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Ip Address created by the automated forwarding rule.
-     * 
- * - * string match_address = 3; - * - * @return The bytes for matchAddress. - */ - public com.google.protobuf.ByteString getMatchAddressBytes() { - java.lang.Object ref = matchAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - matchAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Ip Address created by the automated forwarding rule.
-     * 
- * - * string match_address = 3; - * - * @param value The matchAddress to set. - * @return This builder for chaining. - */ - public Builder setMatchAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - matchAddress_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Ip Address created by the automated forwarding rule.
-     * 
- * - * string match_address = 3; - * - * @return This builder for chaining. - */ - public Builder clearMatchAddress() { - matchAddress_ = getDefaultInstance().getMatchAddress(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Ip Address created by the automated forwarding rule.
-     * 
- * - * string match_address = 3; - * - * @param value The bytes for matchAddress to set. - * @return This builder for chaining. - */ - public Builder setMatchAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - matchAddress_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PscAutomatedEndpoints) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PscAutomatedEndpoints) - private static final com.google.cloud.vertexai.api.PscAutomatedEndpoints DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PscAutomatedEndpoints(); - } - - public static com.google.cloud.vertexai.api.PscAutomatedEndpoints getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PscAutomatedEndpoints 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.vertexai.api.PscAutomatedEndpoints getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpointsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpointsOrBuilder.java deleted file mode 100644 index c60d106e3013..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscAutomatedEndpointsOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PscAutomatedEndpointsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PscAutomatedEndpoints) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Corresponding project_id in pscAutomationConfigs
-   * 
- * - * string project_id = 1; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - - /** - * - * - *
-   * Corresponding project_id in pscAutomationConfigs
-   * 
- * - * string project_id = 1; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Corresponding network in pscAutomationConfigs.
-   * 
- * - * string network = 2; - * - * @return The network. - */ - java.lang.String getNetwork(); - - /** - * - * - *
-   * Corresponding network in pscAutomationConfigs.
-   * 
- * - * string network = 2; - * - * @return The bytes for network. - */ - com.google.protobuf.ByteString getNetworkBytes(); - - /** - * - * - *
-   * Ip Address created by the automated forwarding rule.
-   * 
- * - * string match_address = 3; - * - * @return The matchAddress. - */ - java.lang.String getMatchAddress(); - - /** - * - * - *
-   * Ip Address created by the automated forwarding rule.
-   * 
- * - * string match_address = 3; - * - * @return The bytes for matchAddress. - */ - com.google.protobuf.ByteString getMatchAddressBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfig.java deleted file mode 100644 index 1313ebbeebc6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfig.java +++ /dev/null @@ -1,1319 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for PSC-I.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PscInterfaceConfig} - */ -@com.google.protobuf.Generated -public final class PscInterfaceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.PscInterfaceConfig) - PscInterfaceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PscInterfaceConfig"); - } - - // Use PscInterfaceConfig.newBuilder() to construct. - private PscInterfaceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PscInterfaceConfig() { - networkAttachment_ = ""; - dnsPeeringConfigs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PscInterfaceConfig.class, - com.google.cloud.vertexai.api.PscInterfaceConfig.Builder.class); - } - - public static final int NETWORK_ATTACHMENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object networkAttachment_ = ""; - - /** - * - * - *
-   * Optional. The name of the Compute Engine
-   * [network
-   * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-   * attach to the resource within the region and user project.
-   * To specify this field, you must have already [created a network attachment]
-   * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-   * This field is only used for resources using PSC-I.
-   * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The networkAttachment. - */ - @java.lang.Override - public java.lang.String getNetworkAttachment() { - java.lang.Object ref = networkAttachment_; - 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(); - networkAttachment_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The name of the Compute Engine
-   * [network
-   * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-   * attach to the resource within the region and user project.
-   * To specify this field, you must have already [created a network attachment]
-   * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-   * This field is only used for resources using PSC-I.
-   * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for networkAttachment. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkAttachmentBytes() { - java.lang.Object ref = networkAttachment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - networkAttachment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DNS_PEERING_CONFIGS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List dnsPeeringConfigs_; - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getDnsPeeringConfigsList() { - return dnsPeeringConfigs_; - } - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getDnsPeeringConfigsOrBuilderList() { - return dnsPeeringConfigs_; - } - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getDnsPeeringConfigsCount() { - return dnsPeeringConfigs_.size(); - } - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DnsPeeringConfig getDnsPeeringConfigs(int index) { - return dnsPeeringConfigs_.get(index); - } - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder getDnsPeeringConfigsOrBuilder( - int index) { - return dnsPeeringConfigs_.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.GeneratedMessage.isStringEmpty(networkAttachment_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, networkAttachment_); - } - for (int i = 0; i < dnsPeeringConfigs_.size(); i++) { - output.writeMessage(2, dnsPeeringConfigs_.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.GeneratedMessage.isStringEmpty(networkAttachment_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, networkAttachment_); - } - for (int i = 0; i < dnsPeeringConfigs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, dnsPeeringConfigs_.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.vertexai.api.PscInterfaceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.PscInterfaceConfig other = - (com.google.cloud.vertexai.api.PscInterfaceConfig) obj; - - if (!getNetworkAttachment().equals(other.getNetworkAttachment())) return false; - if (!getDnsPeeringConfigsList().equals(other.getDnsPeeringConfigsList())) 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_ATTACHMENT_FIELD_NUMBER; - hash = (53 * hash) + getNetworkAttachment().hashCode(); - if (getDnsPeeringConfigsCount() > 0) { - hash = (37 * hash) + DNS_PEERING_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getDnsPeeringConfigsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig 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.vertexai.api.PscInterfaceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig 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.vertexai.api.PscInterfaceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.PscInterfaceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for PSC-I.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.PscInterfaceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.PscInterfaceConfig) - com.google.cloud.vertexai.api.PscInterfaceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.PscInterfaceConfig.class, - com.google.cloud.vertexai.api.PscInterfaceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.PscInterfaceConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - networkAttachment_ = ""; - if (dnsPeeringConfigsBuilder_ == null) { - dnsPeeringConfigs_ = java.util.Collections.emptyList(); - } else { - dnsPeeringConfigs_ = null; - dnsPeeringConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ServiceNetworkingProto - .internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscInterfaceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.PscInterfaceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscInterfaceConfig build() { - com.google.cloud.vertexai.api.PscInterfaceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.PscInterfaceConfig buildPartial() { - com.google.cloud.vertexai.api.PscInterfaceConfig result = - new com.google.cloud.vertexai.api.PscInterfaceConfig(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.PscInterfaceConfig result) { - if (dnsPeeringConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - dnsPeeringConfigs_ = java.util.Collections.unmodifiableList(dnsPeeringConfigs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.dnsPeeringConfigs_ = dnsPeeringConfigs_; - } else { - result.dnsPeeringConfigs_ = dnsPeeringConfigsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.PscInterfaceConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.networkAttachment_ = networkAttachment_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.PscInterfaceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.PscInterfaceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.PscInterfaceConfig other) { - if (other == com.google.cloud.vertexai.api.PscInterfaceConfig.getDefaultInstance()) - return this; - if (!other.getNetworkAttachment().isEmpty()) { - networkAttachment_ = other.networkAttachment_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (dnsPeeringConfigsBuilder_ == null) { - if (!other.dnsPeeringConfigs_.isEmpty()) { - if (dnsPeeringConfigs_.isEmpty()) { - dnsPeeringConfigs_ = other.dnsPeeringConfigs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.addAll(other.dnsPeeringConfigs_); - } - onChanged(); - } - } else { - if (!other.dnsPeeringConfigs_.isEmpty()) { - if (dnsPeeringConfigsBuilder_.isEmpty()) { - dnsPeeringConfigsBuilder_.dispose(); - dnsPeeringConfigsBuilder_ = null; - dnsPeeringConfigs_ = other.dnsPeeringConfigs_; - bitField0_ = (bitField0_ & ~0x00000002); - dnsPeeringConfigsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDnsPeeringConfigsFieldBuilder() - : null; - } else { - dnsPeeringConfigsBuilder_.addAllMessages(other.dnsPeeringConfigs_); - } - } - } - 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: - { - networkAttachment_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.DnsPeeringConfig m = - input.readMessage( - com.google.cloud.vertexai.api.DnsPeeringConfig.parser(), extensionRegistry); - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.add(m); - } else { - dnsPeeringConfigsBuilder_.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 networkAttachment_ = ""; - - /** - * - * - *
-     * Optional. The name of the Compute Engine
-     * [network
-     * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-     * attach to the resource within the region and user project.
-     * To specify this field, you must have already [created a network attachment]
-     * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-     * This field is only used for resources using PSC-I.
-     * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The networkAttachment. - */ - public java.lang.String getNetworkAttachment() { - java.lang.Object ref = networkAttachment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - networkAttachment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Compute Engine
-     * [network
-     * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-     * attach to the resource within the region and user project.
-     * To specify this field, you must have already [created a network attachment]
-     * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-     * This field is only used for resources using PSC-I.
-     * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for networkAttachment. - */ - public com.google.protobuf.ByteString getNetworkAttachmentBytes() { - java.lang.Object ref = networkAttachment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - networkAttachment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The name of the Compute Engine
-     * [network
-     * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-     * attach to the resource within the region and user project.
-     * To specify this field, you must have already [created a network attachment]
-     * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-     * This field is only used for resources using PSC-I.
-     * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The networkAttachment to set. - * @return This builder for chaining. - */ - public Builder setNetworkAttachment(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - networkAttachment_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Compute Engine
-     * [network
-     * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-     * attach to the resource within the region and user project.
-     * To specify this field, you must have already [created a network attachment]
-     * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-     * This field is only used for resources using PSC-I.
-     * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearNetworkAttachment() { - networkAttachment_ = getDefaultInstance().getNetworkAttachment(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the Compute Engine
-     * [network
-     * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-     * attach to the resource within the region and user project.
-     * To specify this field, you must have already [created a network attachment]
-     * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-     * This field is only used for resources using PSC-I.
-     * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for networkAttachment to set. - * @return This builder for chaining. - */ - public Builder setNetworkAttachmentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - networkAttachment_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List dnsPeeringConfigs_ = - java.util.Collections.emptyList(); - - private void ensureDnsPeeringConfigsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - dnsPeeringConfigs_ = - new java.util.ArrayList( - dnsPeeringConfigs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DnsPeeringConfig, - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder, - com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder> - dnsPeeringConfigsBuilder_; - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getDnsPeeringConfigsList() { - if (dnsPeeringConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dnsPeeringConfigs_); - } else { - return dnsPeeringConfigsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getDnsPeeringConfigsCount() { - if (dnsPeeringConfigsBuilder_ == null) { - return dnsPeeringConfigs_.size(); - } else { - return dnsPeeringConfigsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.DnsPeeringConfig getDnsPeeringConfigs(int index) { - if (dnsPeeringConfigsBuilder_ == null) { - return dnsPeeringConfigs_.get(index); - } else { - return dnsPeeringConfigsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDnsPeeringConfigs( - int index, com.google.cloud.vertexai.api.DnsPeeringConfig value) { - if (dnsPeeringConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.set(index, value); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDnsPeeringConfigs( - int index, com.google.cloud.vertexai.api.DnsPeeringConfig.Builder builderForValue) { - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addDnsPeeringConfigs(com.google.cloud.vertexai.api.DnsPeeringConfig value) { - if (dnsPeeringConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.add(value); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addDnsPeeringConfigs( - int index, com.google.cloud.vertexai.api.DnsPeeringConfig value) { - if (dnsPeeringConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.add(index, value); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addDnsPeeringConfigs( - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder builderForValue) { - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.add(builderForValue.build()); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addDnsPeeringConfigs( - int index, com.google.cloud.vertexai.api.DnsPeeringConfig.Builder builderForValue) { - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllDnsPeeringConfigs( - java.lang.Iterable values) { - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dnsPeeringConfigs_); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearDnsPeeringConfigs() { - if (dnsPeeringConfigsBuilder_ == null) { - dnsPeeringConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeDnsPeeringConfigs(int index) { - if (dnsPeeringConfigsBuilder_ == null) { - ensureDnsPeeringConfigsIsMutable(); - dnsPeeringConfigs_.remove(index); - onChanged(); - } else { - dnsPeeringConfigsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.DnsPeeringConfig.Builder getDnsPeeringConfigsBuilder( - int index) { - return internalGetDnsPeeringConfigsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder getDnsPeeringConfigsOrBuilder( - int index) { - if (dnsPeeringConfigsBuilder_ == null) { - return dnsPeeringConfigs_.get(index); - } else { - return dnsPeeringConfigsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getDnsPeeringConfigsOrBuilderList() { - if (dnsPeeringConfigsBuilder_ != null) { - return dnsPeeringConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dnsPeeringConfigs_); - } - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.DnsPeeringConfig.Builder addDnsPeeringConfigsBuilder() { - return internalGetDnsPeeringConfigsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.DnsPeeringConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.DnsPeeringConfig.Builder addDnsPeeringConfigsBuilder( - int index) { - return internalGetDnsPeeringConfigsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.DnsPeeringConfig.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. DNS peering configurations. When specified, Vertex AI will
-     * attempt to configure DNS peering zones in the tenant project VPC
-     * to resolve the specified domains using the target network's Cloud DNS.
-     * The user must grant the dns.peer role to the Vertex AI Service Agent
-     * on the target project.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getDnsPeeringConfigsBuilderList() { - return internalGetDnsPeeringConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DnsPeeringConfig, - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder, - com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder> - internalGetDnsPeeringConfigsFieldBuilder() { - if (dnsPeeringConfigsBuilder_ == null) { - dnsPeeringConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.DnsPeeringConfig, - com.google.cloud.vertexai.api.DnsPeeringConfig.Builder, - com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder>( - dnsPeeringConfigs_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - dnsPeeringConfigs_ = null; - } - return dnsPeeringConfigsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.PscInterfaceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.PscInterfaceConfig) - private static final com.google.cloud.vertexai.api.PscInterfaceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.PscInterfaceConfig(); - } - - public static com.google.cloud.vertexai.api.PscInterfaceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PscInterfaceConfig 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.vertexai.api.PscInterfaceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfigOrBuilder.java deleted file mode 100644 index 9c086600434e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PscInterfaceConfigOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface PscInterfaceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.PscInterfaceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The name of the Compute Engine
-   * [network
-   * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-   * attach to the resource within the region and user project.
-   * To specify this field, you must have already [created a network attachment]
-   * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-   * This field is only used for resources using PSC-I.
-   * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The networkAttachment. - */ - java.lang.String getNetworkAttachment(); - - /** - * - * - *
-   * Optional. The name of the Compute Engine
-   * [network
-   * attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
-   * attach to the resource within the region and user project.
-   * To specify this field, you must have already [created a network attachment]
-   * (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments).
-   * This field is only used for resources using PSC-I.
-   * 
- * - * - * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for networkAttachment. - */ - com.google.protobuf.ByteString getNetworkAttachmentBytes(); - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getDnsPeeringConfigsList(); - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.DnsPeeringConfig getDnsPeeringConfigs(int index); - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getDnsPeeringConfigsCount(); - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getDnsPeeringConfigsOrBuilderList(); - - /** - * - * - *
-   * Optional. DNS peering configurations. When specified, Vertex AI will
-   * attempt to configure DNS peering zones in the tenant project VPC
-   * to resolve the specified domains using the target network's Cloud DNS.
-   * The user must grant the dns.peer role to the Vertex AI Service Agent
-   * on the target project.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.DnsPeeringConfig dns_peering_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.DnsPeeringConfigOrBuilder getDnsPeeringConfigsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunk.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunk.java deleted file mode 100644 index c8b8cf923d38..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunk.java +++ /dev/null @@ -1,1500 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A RagChunk includes the content of a chunk of a RagFile, and associated
- * metadata.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagChunk} - */ -@com.google.protobuf.Generated -public final class RagChunk extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagChunk) - RagChunkOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagChunk"); - } - - // Use RagChunk.newBuilder() to construct. - private RagChunk(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagChunk() { - text_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagChunk.class, - com.google.cloud.vertexai.api.RagChunk.Builder.class); - } - - public interface PageSpanOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagChunk.PageSpan) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Page where chunk starts in the document. Inclusive. 1-indexed.
-     * 
- * - * int32 first_page = 1; - * - * @return The firstPage. - */ - int getFirstPage(); - - /** - * - * - *
-     * Page where chunk ends in the document. Inclusive. 1-indexed.
-     * 
- * - * int32 last_page = 2; - * - * @return The lastPage. - */ - int getLastPage(); - } - - /** - * - * - *
-   * Represents where the chunk starts and ends in the document.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagChunk.PageSpan} - */ - public static final class PageSpan extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagChunk.PageSpan) - PageSpanOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PageSpan"); - } - - // Use PageSpan.newBuilder() to construct. - private PageSpan(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private PageSpan() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagChunk.PageSpan.class, - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder.class); - } - - public static final int FIRST_PAGE_FIELD_NUMBER = 1; - private int firstPage_ = 0; - - /** - * - * - *
-     * Page where chunk starts in the document. Inclusive. 1-indexed.
-     * 
- * - * int32 first_page = 1; - * - * @return The firstPage. - */ - @java.lang.Override - public int getFirstPage() { - return firstPage_; - } - - public static final int LAST_PAGE_FIELD_NUMBER = 2; - private int lastPage_ = 0; - - /** - * - * - *
-     * Page where chunk ends in the document. Inclusive. 1-indexed.
-     * 
- * - * int32 last_page = 2; - * - * @return The lastPage. - */ - @java.lang.Override - public int getLastPage() { - return lastPage_; - } - - 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 (firstPage_ != 0) { - output.writeInt32(1, firstPage_); - } - if (lastPage_ != 0) { - output.writeInt32(2, lastPage_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (firstPage_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, firstPage_); - } - if (lastPage_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, lastPage_); - } - 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.vertexai.api.RagChunk.PageSpan)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagChunk.PageSpan other = - (com.google.cloud.vertexai.api.RagChunk.PageSpan) obj; - - if (getFirstPage() != other.getFirstPage()) return false; - if (getLastPage() != other.getLastPage()) 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) + FIRST_PAGE_FIELD_NUMBER; - hash = (53 * hash) + getFirstPage(); - hash = (37 * hash) + LAST_PAGE_FIELD_NUMBER; - hash = (53 * hash) + getLastPage(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan 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.vertexai.api.RagChunk.PageSpan parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan 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.vertexai.api.RagChunk.PageSpan parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagChunk.PageSpan 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Represents where the chunk starts and ends in the document.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagChunk.PageSpan} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagChunk.PageSpan) - com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagChunk.PageSpan.class, - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagChunk.PageSpan.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - firstPage_ = 0; - lastPage_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk.PageSpan getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk.PageSpan build() { - com.google.cloud.vertexai.api.RagChunk.PageSpan result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk.PageSpan buildPartial() { - com.google.cloud.vertexai.api.RagChunk.PageSpan result = - new com.google.cloud.vertexai.api.RagChunk.PageSpan(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagChunk.PageSpan result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.firstPage_ = firstPage_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lastPage_ = lastPage_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagChunk.PageSpan) { - return mergeFrom((com.google.cloud.vertexai.api.RagChunk.PageSpan) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagChunk.PageSpan other) { - if (other == com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance()) - return this; - if (other.getFirstPage() != 0) { - setFirstPage(other.getFirstPage()); - } - if (other.getLastPage() != 0) { - setLastPage(other.getLastPage()); - } - 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: - { - firstPage_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - lastPage_ = 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 firstPage_; - - /** - * - * - *
-       * Page where chunk starts in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 first_page = 1; - * - * @return The firstPage. - */ - @java.lang.Override - public int getFirstPage() { - return firstPage_; - } - - /** - * - * - *
-       * Page where chunk starts in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 first_page = 1; - * - * @param value The firstPage to set. - * @return This builder for chaining. - */ - public Builder setFirstPage(int value) { - - firstPage_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Page where chunk starts in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 first_page = 1; - * - * @return This builder for chaining. - */ - public Builder clearFirstPage() { - bitField0_ = (bitField0_ & ~0x00000001); - firstPage_ = 0; - onChanged(); - return this; - } - - private int lastPage_; - - /** - * - * - *
-       * Page where chunk ends in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 last_page = 2; - * - * @return The lastPage. - */ - @java.lang.Override - public int getLastPage() { - return lastPage_; - } - - /** - * - * - *
-       * Page where chunk ends in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 last_page = 2; - * - * @param value The lastPage to set. - * @return This builder for chaining. - */ - public Builder setLastPage(int value) { - - lastPage_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Page where chunk ends in the document. Inclusive. 1-indexed.
-       * 
- * - * int32 last_page = 2; - * - * @return This builder for chaining. - */ - public Builder clearLastPage() { - bitField0_ = (bitField0_ & ~0x00000002); - lastPage_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagChunk.PageSpan) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagChunk.PageSpan) - private static final com.google.cloud.vertexai.api.RagChunk.PageSpan DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagChunk.PageSpan(); - } - - public static com.google.cloud.vertexai.api.RagChunk.PageSpan getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PageSpan 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.vertexai.api.RagChunk.PageSpan getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int TEXT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - - /** - * - * - *
-   * The content of the chunk.
-   * 
- * - * string text = 1; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - - /** - * - * - *
-   * The content of the chunk.
-   * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SPAN_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.RagChunk.PageSpan pageSpan_; - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return Whether the pageSpan field is set. - */ - @java.lang.Override - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return The pageSpan. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk.PageSpan getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance() - : pageSpan_; - } - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance() - : pageSpan_; - } - - 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.GeneratedMessage.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getPageSpan()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageSpan()); - } - 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.vertexai.api.RagChunk)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagChunk other = (com.google.cloud.vertexai.api.RagChunk) obj; - - if (!getText().equals(other.getText())) return false; - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) 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) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk 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.vertexai.api.RagChunk parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk 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.vertexai.api.RagChunk parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagChunk parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagChunk 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A RagChunk includes the content of a chunk of a RagFile, and associated
-   * metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagChunk} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagChunk) - com.google.cloud.vertexai.api.RagChunkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagChunk.class, - com.google.cloud.vertexai.api.RagChunk.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagChunk.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetPageSpanFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - text_ = ""; - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagChunk_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagChunk.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk build() { - com.google.cloud.vertexai.api.RagChunk result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagChunk buildPartial() { - com.google.cloud.vertexai.api.RagChunk result = - new com.google.cloud.vertexai.api.RagChunk(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagChunk result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.text_ = text_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagChunk) { - return mergeFrom((com.google.cloud.vertexai.api.RagChunk) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagChunk other) { - if (other == com.google.cloud.vertexai.api.RagChunk.getDefaultInstance()) return this; - if (!other.getText().isEmpty()) { - text_ = other.text_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); - } - 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: - { - text_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetPageSpanFieldBuilder().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 text_ = ""; - - /** - * - * - *
-     * The content of the chunk.
-     * 
- * - * string text = 1; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * The content of the chunk.
-     * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * The content of the chunk.
-     * 
- * - * string text = 1; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - text_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The content of the chunk.
-     * 
- * - * string text = 1; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * The content of the chunk.
-     * 
- * - * string text = 1; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - text_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.RagChunk.PageSpan pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk.PageSpan, - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder, - com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder> - pageSpanBuilder_; - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return Whether the pageSpan field is set. - */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return The pageSpan. - */ - public com.google.cloud.vertexai.api.RagChunk.PageSpan getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance() - : pageSpan_; - } else { - return pageSpanBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public Builder setPageSpan(com.google.cloud.vertexai.api.RagChunk.PageSpan value) { - if (pageSpanBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pageSpan_ = value; - } else { - pageSpanBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public Builder setPageSpan( - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); - } else { - pageSpanBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public Builder mergePageSpan(com.google.cloud.vertexai.api.RagChunk.PageSpan value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && pageSpan_ != null - && pageSpan_ != com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; - } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder getPageSpanBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - public com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); - } else { - return pageSpan_ == null - ? com.google.cloud.vertexai.api.RagChunk.PageSpan.getDefaultInstance() - : pageSpan_; - } - } - - /** - * - * - *
-     * If populated, represents where the chunk starts and ends in the document.
-     * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk.PageSpan, - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder, - com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagChunk.PageSpan, - com.google.cloud.vertexai.api.RagChunk.PageSpan.Builder, - com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder>( - getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; - } - return pageSpanBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagChunk) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagChunk) - private static final com.google.cloud.vertexai.api.RagChunk DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagChunk(); - } - - public static com.google.cloud.vertexai.api.RagChunk getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagChunk 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.vertexai.api.RagChunk getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunkOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunkOrBuilder.java deleted file mode 100644 index 7abeee3af13c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagChunkOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagChunkOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagChunk) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The content of the chunk.
-   * 
- * - * string text = 1; - * - * @return The text. - */ - java.lang.String getText(); - - /** - * - * - *
-   * The content of the chunk.
-   * 
- * - * string text = 1; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return Whether the pageSpan field is set. - */ - boolean hasPageSpan(); - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - * - * @return The pageSpan. - */ - com.google.cloud.vertexai.api.RagChunk.PageSpan getPageSpan(); - - /** - * - * - *
-   * If populated, represents where the chunk starts and ends in the document.
-   * 
- * - * optional .google.cloud.vertexai.v1.RagChunk.PageSpan page_span = 2; - */ - com.google.cloud.vertexai.api.RagChunk.PageSpanOrBuilder getPageSpanOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpus.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpus.java deleted file mode 100644 index e78449f8fde2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpus.java +++ /dev/null @@ -1,2998 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A RagCorpus is a RagFile container and a project can have multiple
- * RagCorpora.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagCorpus} - */ -@com.google.protobuf.Generated -public final class RagCorpus extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagCorpus) - RagCorpusOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagCorpus"); - } - - // Use RagCorpus.newBuilder() to construct. - private RagCorpus(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagCorpus() { - name_ = ""; - displayName_ = ""; - description_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagCorpus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagCorpus.class, - com.google.cloud.vertexai.api.RagCorpus.Builder.class); - } - - private int bitField0_; - private int backendConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object backendConfig_; - - public enum BackendConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VECTOR_DB_CONFIG(9), - VERTEX_AI_SEARCH_CONFIG(10), - BACKENDCONFIG_NOT_SET(0); - private final int value; - - private BackendConfigCase(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 BackendConfigCase valueOf(int value) { - return forNumber(value); - } - - public static BackendConfigCase forNumber(int value) { - switch (value) { - case 9: - return VECTOR_DB_CONFIG; - case 10: - return VERTEX_AI_SEARCH_CONFIG; - case 0: - return BACKENDCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public BackendConfigCase getBackendConfigCase() { - return BackendConfigCase.forNumber(backendConfigCase_); - } - - public static final int VECTOR_DB_CONFIG_FIELD_NUMBER = 9; - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vectorDbConfig field is set. - */ - @java.lang.Override - public boolean hasVectorDbConfig() { - return backendConfigCase_ == 9; - } - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vectorDbConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig getVectorDbConfig() { - if (backendConfigCase_ == 9) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder getVectorDbConfigOrBuilder() { - if (backendConfigCase_ == 9) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - - public static final int VERTEX_AI_SEARCH_CONFIG_FIELD_NUMBER = 10; - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vertexAiSearchConfig field is set. - */ - @java.lang.Override - public boolean hasVertexAiSearchConfig() { - return backendConfigCase_ == 10; - } - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vertexAiSearchConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfig getVertexAiSearchConfig() { - if (backendConfigCase_ == 10) { - return (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder - getVertexAiSearchConfigOrBuilder() { - if (backendConfigCase_ == 10) { - return (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Output only. The resource name of the RagCorpus.
-   * 
- * - * 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. The resource name of the RagCorpus.
-   * 
- * - * 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 DISPLAY_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - - /** - * - * - *
-   * Required. The display name of the RagCorpus.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The display name of the RagCorpus.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 DESCRIPTION_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - - /** - * - * - *
-   * Optional. The description of the RagCorpus.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The description of the RagCorpus.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.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. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.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 UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int CORPUS_STATUS_FIELD_NUMBER = 8; - private com.google.cloud.vertexai.api.CorpusStatus corpusStatus_; - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the corpusStatus field is set. - */ - @java.lang.Override - public boolean hasCorpusStatus() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The corpusStatus. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatus getCorpusStatus() { - return corpusStatus_ == null - ? com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance() - : corpusStatus_; - } - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.CorpusStatusOrBuilder getCorpusStatusOrBuilder() { - return corpusStatus_ == null - ? com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance() - : corpusStatus_; - } - - public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 12; - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionSpec field is set. - */ - @java.lang.Override - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionSpec. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getUpdateTime()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(8, getCorpusStatus()); - } - if (backendConfigCase_ == 9) { - output.writeMessage(9, (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_); - } - if (backendConfigCase_ == 10) { - output.writeMessage(10, (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(12, getEncryptionSpec()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCorpusStatus()); - } - if (backendConfigCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_); - } - if (backendConfigCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getEncryptionSpec()); - } - 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.vertexai.api.RagCorpus)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagCorpus other = (com.google.cloud.vertexai.api.RagCorpus) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - 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 (hasCorpusStatus() != other.hasCorpusStatus()) return false; - if (hasCorpusStatus()) { - if (!getCorpusStatus().equals(other.getCorpusStatus())) return false; - } - if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; - if (hasEncryptionSpec()) { - if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; - } - if (!getBackendConfigCase().equals(other.getBackendConfigCase())) return false; - switch (backendConfigCase_) { - case 9: - if (!getVectorDbConfig().equals(other.getVectorDbConfig())) return false; - break; - case 10: - if (!getVertexAiSearchConfig().equals(other.getVertexAiSearchConfig())) 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) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().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 (hasCorpusStatus()) { - hash = (37 * hash) + CORPUS_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getCorpusStatus().hashCode(); - } - if (hasEncryptionSpec()) { - hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionSpec().hashCode(); - } - switch (backendConfigCase_) { - case 9: - hash = (37 * hash) + VECTOR_DB_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getVectorDbConfig().hashCode(); - break; - case 10: - hash = (37 * hash) + VERTEX_AI_SEARCH_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getVertexAiSearchConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagCorpus 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.vertexai.api.RagCorpus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagCorpus 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.vertexai.api.RagCorpus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagCorpus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagCorpus 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A RagCorpus is a RagFile container and a project can have multiple
-   * RagCorpora.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagCorpus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagCorpus) - com.google.cloud.vertexai.api.RagCorpusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagCorpus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagCorpus.class, - com.google.cloud.vertexai.api.RagCorpus.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagCorpus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - internalGetCorpusStatusFieldBuilder(); - internalGetEncryptionSpecFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (vectorDbConfigBuilder_ != null) { - vectorDbConfigBuilder_.clear(); - } - if (vertexAiSearchConfigBuilder_ != null) { - vertexAiSearchConfigBuilder_.clear(); - } - name_ = ""; - displayName_ = ""; - description_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - corpusStatus_ = null; - if (corpusStatusBuilder_ != null) { - corpusStatusBuilder_.dispose(); - corpusStatusBuilder_ = null; - } - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - backendConfigCase_ = 0; - backendConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagCorpus getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagCorpus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagCorpus build() { - com.google.cloud.vertexai.api.RagCorpus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagCorpus buildPartial() { - com.google.cloud.vertexai.api.RagCorpus result = - new com.google.cloud.vertexai.api.RagCorpus(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagCorpus result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.corpusStatus_ = - corpusStatusBuilder_ == null ? corpusStatus_ : corpusStatusBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.encryptionSpec_ = - encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagCorpus result) { - result.backendConfigCase_ = backendConfigCase_; - result.backendConfig_ = this.backendConfig_; - if (backendConfigCase_ == 9 && vectorDbConfigBuilder_ != null) { - result.backendConfig_ = vectorDbConfigBuilder_.build(); - } - if (backendConfigCase_ == 10 && vertexAiSearchConfigBuilder_ != null) { - result.backendConfig_ = vertexAiSearchConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagCorpus) { - return mergeFrom((com.google.cloud.vertexai.api.RagCorpus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagCorpus other) { - if (other == com.google.cloud.vertexai.api.RagCorpus.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasCorpusStatus()) { - mergeCorpusStatus(other.getCorpusStatus()); - } - if (other.hasEncryptionSpec()) { - mergeEncryptionSpec(other.getEncryptionSpec()); - } - switch (other.getBackendConfigCase()) { - case VECTOR_DB_CONFIG: - { - mergeVectorDbConfig(other.getVectorDbConfig()); - break; - } - case VERTEX_AI_SEARCH_CONFIG: - { - mergeVertexAiSearchConfig(other.getVertexAiSearchConfig()); - break; - } - case BACKENDCONFIG_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: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 18 - case 26: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 42 - case 66: - { - input.readMessage( - internalGetCorpusStatusFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetVectorDbConfigFieldBuilder().getBuilder(), extensionRegistry); - backendConfigCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage( - internalGetVertexAiSearchConfigFieldBuilder().getBuilder(), extensionRegistry); - backendConfigCase_ = 10; - break; - } // case 82 - case 98: - { - input.readMessage( - internalGetEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 98 - 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 backendConfigCase_ = 0; - private java.lang.Object backendConfig_; - - public BackendConfigCase getBackendConfigCase() { - return BackendConfigCase.forNumber(backendConfigCase_); - } - - public Builder clearBackendConfig() { - backendConfigCase_ = 0; - backendConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig, - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder> - vectorDbConfigBuilder_; - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vectorDbConfig field is set. - */ - @java.lang.Override - public boolean hasVectorDbConfig() { - return backendConfigCase_ == 9; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vectorDbConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig getVectorDbConfig() { - if (vectorDbConfigBuilder_ == null) { - if (backendConfigCase_ == 9) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } else { - if (backendConfigCase_ == 9) { - return vectorDbConfigBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setVectorDbConfig(com.google.cloud.vertexai.api.RagVectorDbConfig value) { - if (vectorDbConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backendConfig_ = value; - onChanged(); - } else { - vectorDbConfigBuilder_.setMessage(value); - } - backendConfigCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setVectorDbConfig( - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder builderForValue) { - if (vectorDbConfigBuilder_ == null) { - backendConfig_ = builderForValue.build(); - onChanged(); - } else { - vectorDbConfigBuilder_.setMessage(builderForValue.build()); - } - backendConfigCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeVectorDbConfig(com.google.cloud.vertexai.api.RagVectorDbConfig value) { - if (vectorDbConfigBuilder_ == null) { - if (backendConfigCase_ == 9 - && backendConfig_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance()) { - backendConfig_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - backendConfig_ = value; - } - onChanged(); - } else { - if (backendConfigCase_ == 9) { - vectorDbConfigBuilder_.mergeFrom(value); - } else { - vectorDbConfigBuilder_.setMessage(value); - } - } - backendConfigCase_ = 9; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearVectorDbConfig() { - if (vectorDbConfigBuilder_ == null) { - if (backendConfigCase_ == 9) { - backendConfigCase_ = 0; - backendConfig_ = null; - onChanged(); - } - } else { - if (backendConfigCase_ == 9) { - backendConfigCase_ = 0; - backendConfig_ = null; - } - vectorDbConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.Builder getVectorDbConfigBuilder() { - return internalGetVectorDbConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder getVectorDbConfigOrBuilder() { - if ((backendConfigCase_ == 9) && (vectorDbConfigBuilder_ != null)) { - return vectorDbConfigBuilder_.getMessageOrBuilder(); - } else { - if (backendConfigCase_ == 9) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vector DBs.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig, - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder> - internalGetVectorDbConfigFieldBuilder() { - if (vectorDbConfigBuilder_ == null) { - if (!(backendConfigCase_ == 9)) { - backendConfig_ = com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - vectorDbConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig, - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig) backendConfig_, - getParentForChildren(), - isClean()); - backendConfig_ = null; - } - backendConfigCase_ = 9; - onChanged(); - return vectorDbConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAiSearchConfig, - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder, - com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder> - vertexAiSearchConfigBuilder_; - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vertexAiSearchConfig field is set. - */ - @java.lang.Override - public boolean hasVertexAiSearchConfig() { - return backendConfigCase_ == 10; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vertexAiSearchConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfig getVertexAiSearchConfig() { - if (vertexAiSearchConfigBuilder_ == null) { - if (backendConfigCase_ == 10) { - return (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } else { - if (backendConfigCase_ == 10) { - return vertexAiSearchConfigBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setVertexAiSearchConfig( - com.google.cloud.vertexai.api.VertexAiSearchConfig value) { - if (vertexAiSearchConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backendConfig_ = value; - onChanged(); - } else { - vertexAiSearchConfigBuilder_.setMessage(value); - } - backendConfigCase_ = 10; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setVertexAiSearchConfig( - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder builderForValue) { - if (vertexAiSearchConfigBuilder_ == null) { - backendConfig_ = builderForValue.build(); - onChanged(); - } else { - vertexAiSearchConfigBuilder_.setMessage(builderForValue.build()); - } - backendConfigCase_ = 10; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeVertexAiSearchConfig( - com.google.cloud.vertexai.api.VertexAiSearchConfig value) { - if (vertexAiSearchConfigBuilder_ == null) { - if (backendConfigCase_ == 10 - && backendConfig_ - != com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance()) { - backendConfig_ = - com.google.cloud.vertexai.api.VertexAiSearchConfig.newBuilder( - (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - backendConfig_ = value; - } - onChanged(); - } else { - if (backendConfigCase_ == 10) { - vertexAiSearchConfigBuilder_.mergeFrom(value); - } else { - vertexAiSearchConfigBuilder_.setMessage(value); - } - } - backendConfigCase_ = 10; - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearVertexAiSearchConfig() { - if (vertexAiSearchConfigBuilder_ == null) { - if (backendConfigCase_ == 10) { - backendConfigCase_ = 0; - backendConfig_ = null; - onChanged(); - } - } else { - if (backendConfigCase_ == 10) { - backendConfigCase_ = 0; - backendConfig_ = null; - } - vertexAiSearchConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder - getVertexAiSearchConfigBuilder() { - return internalGetVertexAiSearchConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder - getVertexAiSearchConfigOrBuilder() { - if ((backendConfigCase_ == 10) && (vertexAiSearchConfigBuilder_ != null)) { - return vertexAiSearchConfigBuilder_.getMessageOrBuilder(); - } else { - if (backendConfigCase_ == 10) { - return (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_; - } - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The config for the Vertex AI Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAiSearchConfig, - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder, - com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder> - internalGetVertexAiSearchConfigFieldBuilder() { - if (vertexAiSearchConfigBuilder_ == null) { - if (!(backendConfigCase_ == 10)) { - backendConfig_ = com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - vertexAiSearchConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAiSearchConfig, - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder, - com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder>( - (com.google.cloud.vertexai.api.VertexAiSearchConfig) backendConfig_, - getParentForChildren(), - isClean()); - backendConfig_ = null; - } - backendConfigCase_ = 10; - onChanged(); - return vertexAiSearchConfigBuilder_; - } - - private java.lang.Object name_ = ""; - - /** - * - * - *
-     * Output only. The resource name of the RagCorpus.
-     * 
- * - * 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. The resource name of the RagCorpus.
-     * 
- * - * 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. The resource name of the RagCorpus.
-     * 
- * - * 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_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the RagCorpus.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the RagCorpus.
-     * 
- * - * 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_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - - /** - * - * - *
-     * Required. The display name of the RagCorpus.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the RagCorpus.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the RagCorpus.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - - /** - * - * - *
-     * Required. The display name of the RagCorpus.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The display name of the RagCorpus.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 java.lang.Object description_ = ""; - - /** - * - * - *
-     * Optional. The description of the RagCorpus.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the RagCorpus.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the RagCorpus.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the RagCorpus.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the RagCorpus.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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. Timestamp when this RagCorpus was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - - /** - * - * - *
-     * Output only. Timestamp when this RagCorpus was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.cloud.vertexai.api.CorpusStatus corpusStatus_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CorpusStatus, - com.google.cloud.vertexai.api.CorpusStatus.Builder, - com.google.cloud.vertexai.api.CorpusStatusOrBuilder> - corpusStatusBuilder_; - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the corpusStatus field is set. - */ - public boolean hasCorpusStatus() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The corpusStatus. - */ - public com.google.cloud.vertexai.api.CorpusStatus getCorpusStatus() { - if (corpusStatusBuilder_ == null) { - return corpusStatus_ == null - ? com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance() - : corpusStatus_; - } else { - return corpusStatusBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCorpusStatus(com.google.cloud.vertexai.api.CorpusStatus value) { - if (corpusStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - corpusStatus_ = value; - } else { - corpusStatusBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCorpusStatus( - com.google.cloud.vertexai.api.CorpusStatus.Builder builderForValue) { - if (corpusStatusBuilder_ == null) { - corpusStatus_ = builderForValue.build(); - } else { - corpusStatusBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCorpusStatus(com.google.cloud.vertexai.api.CorpusStatus value) { - if (corpusStatusBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && corpusStatus_ != null - && corpusStatus_ != com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance()) { - getCorpusStatusBuilder().mergeFrom(value); - } else { - corpusStatus_ = value; - } - } else { - corpusStatusBuilder_.mergeFrom(value); - } - if (corpusStatus_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCorpusStatus() { - bitField0_ = (bitField0_ & ~0x00000080); - corpusStatus_ = null; - if (corpusStatusBuilder_ != null) { - corpusStatusBuilder_.dispose(); - corpusStatusBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CorpusStatus.Builder getCorpusStatusBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return internalGetCorpusStatusFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.CorpusStatusOrBuilder getCorpusStatusOrBuilder() { - if (corpusStatusBuilder_ != null) { - return corpusStatusBuilder_.getMessageOrBuilder(); - } else { - return corpusStatus_ == null - ? com.google.cloud.vertexai.api.CorpusStatus.getDefaultInstance() - : corpusStatus_; - } - } - - /** - * - * - *
-     * Output only. RagCorpus state.
-     * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CorpusStatus, - com.google.cloud.vertexai.api.CorpusStatus.Builder, - com.google.cloud.vertexai.api.CorpusStatusOrBuilder> - internalGetCorpusStatusFieldBuilder() { - if (corpusStatusBuilder_ == null) { - corpusStatusBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.CorpusStatus, - com.google.cloud.vertexai.api.CorpusStatus.Builder, - com.google.cloud.vertexai.api.CorpusStatusOrBuilder>( - getCorpusStatus(), getParentForChildren(), isClean()); - corpusStatus_ = null; - } - return corpusStatusBuilder_; - } - - private com.google.cloud.vertexai.api.EncryptionSpec encryptionSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - encryptionSpecBuilder_; - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionSpec field is set. - */ - public boolean hasEncryptionSpec() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionSpec. - */ - public com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec() { - if (encryptionSpecBuilder_ == null) { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } else { - return encryptionSpecBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionSpec_ = value; - } else { - encryptionSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionSpec( - com.google.cloud.vertexai.api.EncryptionSpec.Builder builderForValue) { - if (encryptionSpecBuilder_ == null) { - encryptionSpec_ = builderForValue.build(); - } else { - encryptionSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec value) { - if (encryptionSpecBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && encryptionSpec_ != null - && encryptionSpec_ - != com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance()) { - getEncryptionSpecBuilder().mergeFrom(value); - } else { - encryptionSpec_ = value; - } - } else { - encryptionSpecBuilder_.mergeFrom(value); - } - if (encryptionSpec_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEncryptionSpec() { - bitField0_ = (bitField0_ & ~0x00000100); - encryptionSpec_ = null; - if (encryptionSpecBuilder_ != null) { - encryptionSpecBuilder_.dispose(); - encryptionSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.EncryptionSpec.Builder getEncryptionSpecBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetEncryptionSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { - if (encryptionSpecBuilder_ != null) { - return encryptionSpecBuilder_.getMessageOrBuilder(); - } else { - return encryptionSpec_ == null - ? com.google.cloud.vertexai.api.EncryptionSpec.getDefaultInstance() - : encryptionSpec_; - } - } - - /** - * - * - *
-     * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-     * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-     * field can only be set at corpus creation time, and cannot be updated or
-     * deleted.
-     * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder> - internalGetEncryptionSpecFieldBuilder() { - if (encryptionSpecBuilder_ == null) { - encryptionSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EncryptionSpec, - com.google.cloud.vertexai.api.EncryptionSpec.Builder, - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder>( - getEncryptionSpec(), getParentForChildren(), isClean()); - encryptionSpec_ = null; - } - return encryptionSpecBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagCorpus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagCorpus) - private static final com.google.cloud.vertexai.api.RagCorpus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagCorpus(); - } - - public static com.google.cloud.vertexai.api.RagCorpus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagCorpus 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.vertexai.api.RagCorpus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpusOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpusOrBuilder.java deleted file mode 100644 index 40b05c92a9fa..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagCorpusOrBuilder.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagCorpusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagCorpus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vectorDbConfig field is set. - */ - boolean hasVectorDbConfig(); - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vectorDbConfig. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig getVectorDbConfig(); - - /** - * - * - *
-   * Optional. Immutable. The config for the Vector DBs.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder getVectorDbConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the vertexAiSearchConfig field is set. - */ - boolean hasVertexAiSearchConfig(); - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The vertexAiSearchConfig. - */ - com.google.cloud.vertexai.api.VertexAiSearchConfig getVertexAiSearchConfig(); - - /** - * - * - *
-   * Optional. Immutable. The config for the Vertex AI Search.
-   * 
- * - * - * .google.cloud.vertexai.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder getVertexAiSearchConfigOrBuilder(); - - /** - * - * - *
-   * Output only. The resource name of the RagCorpus.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Output only. The resource name of the RagCorpus.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The display name of the RagCorpus.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Required. The display name of the RagCorpus.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Optional. The description of the RagCorpus.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - - /** - * - * - *
-   * Optional. The description of the RagCorpus.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagCorpus was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the corpusStatus field is set. - */ - boolean hasCorpusStatus(); - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The corpusStatus. - */ - com.google.cloud.vertexai.api.CorpusStatus getCorpusStatus(); - - /** - * - * - *
-   * Output only. RagCorpus state.
-   * 
- * - * - * .google.cloud.vertexai.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.CorpusStatusOrBuilder getCorpusStatusOrBuilder(); - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionSpec field is set. - */ - boolean hasEncryptionSpec(); - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionSpec. - */ - com.google.cloud.vertexai.api.EncryptionSpec getEncryptionSpec(); - - /** - * - * - *
-   * Optional. Immutable. The CMEK key name used to encrypt at-rest data related
-   * to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
-   * field can only be set at corpus creation time, and cannot be updated or
-   * deleted.
-   * 
- * - * - * .google.cloud.vertexai.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); - - com.google.cloud.vertexai.api.RagCorpus.BackendConfigCase getBackendConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfig.java deleted file mode 100644 index 5636d2c6523d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfig.java +++ /dev/null @@ -1,2079 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for the embedding model to use for RAG.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagEmbeddingModelConfig} - */ -@com.google.protobuf.Generated -public final class RagEmbeddingModelConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagEmbeddingModelConfig) - RagEmbeddingModelConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagEmbeddingModelConfig"); - } - - // Use RagEmbeddingModelConfig.newBuilder() to construct. - private RagEmbeddingModelConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagEmbeddingModelConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.class, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder.class); - } - - public interface VertexPredictionEndpointOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The endpoint resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-     * or
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-     * Required. The endpoint resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-     * or
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-     * Output only. The resource name of the model that is deployed on the
-     * endpoint. Present only when the endpoint is not a publisher model.
-     * Pattern:
-     * `projects/{project}/locations/{location}/models/{model}`
-     * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - java.lang.String getModel(); - - /** - * - * - *
-     * Output only. The resource name of the model that is deployed on the
-     * endpoint. Present only when the endpoint is not a publisher model.
-     * Pattern:
-     * `projects/{project}/locations/{location}/models/{model}`
-     * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - com.google.protobuf.ByteString getModelBytes(); - - /** - * - * - *
-     * Output only. Version ID of the model that is deployed on the endpoint.
-     * Present only when the endpoint is not a publisher model.
-     * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - java.lang.String getModelVersionId(); - - /** - * - * - *
-     * Output only. Version ID of the model that is deployed on the endpoint.
-     * Present only when the endpoint is not a publisher model.
-     * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - com.google.protobuf.ByteString getModelVersionIdBytes(); - } - - /** - * - * - *
-   * Config representing a model hosted on Vertex Prediction Endpoint.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint} - */ - public static final class VertexPredictionEndpoint extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint) - VertexPredictionEndpointOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexPredictionEndpoint"); - } - - // Use VertexPredictionEndpoint.newBuilder() to construct. - private VertexPredictionEndpoint(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VertexPredictionEndpoint() { - endpoint_ = ""; - model_ = ""; - modelVersionId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.class, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.Builder - .class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-     * Required. The endpoint resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-     * or
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The endpoint resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-     * or
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object model_ = ""; - - /** - * - * - *
-     * Output only. The resource name of the model that is deployed on the
-     * endpoint. Present only when the endpoint is not a publisher model.
-     * Pattern:
-     * `projects/{project}/locations/{location}/models/{model}`
-     * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - 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(); - model_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. The resource name of the model that is deployed on the
-     * endpoint. Present only when the endpoint is not a publisher model.
-     * Pattern:
-     * `projects/{project}/locations/{location}/models/{model}`
-     * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_VERSION_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-     * Output only. Version ID of the model that is deployed on the endpoint.
-     * Present only when the endpoint is not a publisher model.
-     * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - @java.lang.Override - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - 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(); - modelVersionId_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. Version ID of the model that is deployed on the endpoint.
-     * Present only when the endpoint is not a publisher model.
-     * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, modelVersionId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, model_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersionId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, modelVersionId_); - } - 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.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint other = - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getModel().equals(other.getModel())) return false; - if (!getModelVersionId().equals(other.getModelVersionId())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; - hash = (53 * hash) + getModelVersionId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - 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.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - 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.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Config representing a model hosted on Vertex Prediction Endpoint.
-     * 
- * - * Protobuf type {@code - * google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint) - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .class, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - model_ = ""; - modelVersionId_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - build() { - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - buildPartial() { - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint result = - new com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.model_ = model_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.modelVersionId_ = modelVersionId_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint other) { - if (other - == com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance()) return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getModelVersionId().isEmpty()) { - modelVersionId_ = other.modelVersionId_; - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - model_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - modelVersionId_ = 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 endpoint_ = ""; - - /** - * - * - *
-       * Required. The endpoint resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-       * or
-       * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-       * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The endpoint resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-       * or
-       * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-       * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The endpoint resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-       * or
-       * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-       * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The endpoint resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-       * or
-       * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-       * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The endpoint resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
-       * or
-       * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-       * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - - /** - * - * - *
-       * Output only. The resource name of the model that is deployed on the
-       * endpoint. Present only when the endpoint is not a publisher model.
-       * Pattern:
-       * `projects/{project}/locations/{location}/models/{model}`
-       * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. The resource name of the model that is deployed on the
-       * endpoint. Present only when the endpoint is not a publisher model.
-       * Pattern:
-       * `projects/{project}/locations/{location}/models/{model}`
-       * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for model. - */ - public com.google.protobuf.ByteString getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. The resource name of the model that is deployed on the
-       * endpoint. Present only when the endpoint is not a publisher model.
-       * Pattern:
-       * `projects/{project}/locations/{location}/models/{model}`
-       * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - model_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The resource name of the model that is deployed on the
-       * endpoint. Present only when the endpoint is not a publisher model.
-       * Pattern:
-       * `projects/{project}/locations/{location}/models/{model}`
-       * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearModel() { - model_ = getDefaultInstance().getModel(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The resource name of the model that is deployed on the
-       * endpoint. Present only when the endpoint is not a publisher model.
-       * Pattern:
-       * `projects/{project}/locations/{location}/models/{model}`
-       * 
- * - * - * string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - model_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object modelVersionId_ = ""; - - /** - * - * - *
-       * Output only. Version ID of the model that is deployed on the endpoint.
-       * Present only when the endpoint is not a publisher model.
-       * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The modelVersionId. - */ - public java.lang.String getModelVersionId() { - java.lang.Object ref = modelVersionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelVersionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. Version ID of the model that is deployed on the endpoint.
-       * Present only when the endpoint is not a publisher model.
-       * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for modelVersionId. - */ - public com.google.protobuf.ByteString getModelVersionIdBytes() { - java.lang.Object ref = modelVersionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. Version ID of the model that is deployed on the endpoint.
-       * Present only when the endpoint is not a publisher model.
-       * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelVersionId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Version ID of the model that is deployed on the endpoint.
-       * Present only when the endpoint is not a publisher model.
-       * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearModelVersionId() { - modelVersionId_ = getDefaultInstance().getModelVersionId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. Version ID of the model that is deployed on the endpoint.
-       * Present only when the endpoint is not a publisher model.
-       * 
- * - * string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for modelVersionId to set. - * @return This builder for chaining. - */ - public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelVersionId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint) - private static final com.google.cloud.vertexai.api.RagEmbeddingModelConfig - .VertexPredictionEndpoint - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint(); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VertexPredictionEndpoint 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.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int modelConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object modelConfig_; - - public enum ModelConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VERTEX_PREDICTION_ENDPOINT(1), - MODELCONFIG_NOT_SET(0); - private final int value; - - private ModelConfigCase(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 ModelConfigCase valueOf(int value) { - return forNumber(value); - } - - public static ModelConfigCase forNumber(int value) { - switch (value) { - case 1: - return VERTEX_PREDICTION_ENDPOINT; - case 0: - return MODELCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ModelConfigCase getModelConfigCase() { - return ModelConfigCase.forNumber(modelConfigCase_); - } - - public static final int VERTEX_PREDICTION_ENDPOINT_FIELD_NUMBER = 1; - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return Whether the vertexPredictionEndpoint field is set. - */ - @java.lang.Override - public boolean hasVertexPredictionEndpoint() { - return modelConfigCase_ == 1; - } - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return The vertexPredictionEndpoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getVertexPredictionEndpoint() { - if (modelConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_; - } - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder - getVertexPredictionEndpointOrBuilder() { - if (modelConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_; - } - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .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 (modelConfigCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (modelConfigCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_); - } - 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.vertexai.api.RagEmbeddingModelConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagEmbeddingModelConfig other = - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig) obj; - - if (!getModelConfigCase().equals(other.getModelConfigCase())) return false; - switch (modelConfigCase_) { - case 1: - if (!getVertexPredictionEndpoint().equals(other.getVertexPredictionEndpoint())) - 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 (modelConfigCase_) { - case 1: - hash = (37 * hash) + VERTEX_PREDICTION_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getVertexPredictionEndpoint().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig 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.vertexai.api.RagEmbeddingModelConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig 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.vertexai.api.RagEmbeddingModelConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagEmbeddingModelConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for the embedding model to use for RAG.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagEmbeddingModelConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagEmbeddingModelConfig) - com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.class, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagEmbeddingModelConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (vertexPredictionEndpointBuilder_ != null) { - vertexPredictionEndpointBuilder_.clear(); - } - modelConfigCase_ = 0; - modelConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig build() { - com.google.cloud.vertexai.api.RagEmbeddingModelConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig buildPartial() { - com.google.cloud.vertexai.api.RagEmbeddingModelConfig result = - new com.google.cloud.vertexai.api.RagEmbeddingModelConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagEmbeddingModelConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagEmbeddingModelConfig result) { - result.modelConfigCase_ = modelConfigCase_; - result.modelConfig_ = this.modelConfig_; - if (modelConfigCase_ == 1 && vertexPredictionEndpointBuilder_ != null) { - result.modelConfig_ = vertexPredictionEndpointBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagEmbeddingModelConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagEmbeddingModelConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagEmbeddingModelConfig other) { - if (other == com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance()) - return this; - switch (other.getModelConfigCase()) { - case VERTEX_PREDICTION_ENDPOINT: - { - mergeVertexPredictionEndpoint(other.getVertexPredictionEndpoint()); - break; - } - case MODELCONFIG_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( - internalGetVertexPredictionEndpointFieldBuilder().getBuilder(), - extensionRegistry); - modelConfigCase_ = 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 modelConfigCase_ = 0; - private java.lang.Object modelConfig_; - - public ModelConfigCase getModelConfigCase() { - return ModelConfigCase.forNumber(modelConfigCase_); - } - - public Builder clearModelConfig() { - modelConfigCase_ = 0; - modelConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder> - vertexPredictionEndpointBuilder_; - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return Whether the vertexPredictionEndpoint field is set. - */ - @java.lang.Override - public boolean hasVertexPredictionEndpoint() { - return modelConfigCase_ == 1; - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return The vertexPredictionEndpoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getVertexPredictionEndpoint() { - if (vertexPredictionEndpointBuilder_ == null) { - if (modelConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_; - } - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } else { - if (modelConfigCase_ == 1) { - return vertexPredictionEndpointBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - public Builder setVertexPredictionEndpoint( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint value) { - if (vertexPredictionEndpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelConfig_ = value; - onChanged(); - } else { - vertexPredictionEndpointBuilder_.setMessage(value); - } - modelConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - public Builder setVertexPredictionEndpoint( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.Builder - builderForValue) { - if (vertexPredictionEndpointBuilder_ == null) { - modelConfig_ = builderForValue.build(); - onChanged(); - } else { - vertexPredictionEndpointBuilder_.setMessage(builderForValue.build()); - } - modelConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - public Builder mergeVertexPredictionEndpoint( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint value) { - if (vertexPredictionEndpointBuilder_ == null) { - if (modelConfigCase_ == 1 - && modelConfig_ - != com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance()) { - modelConfig_ = - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .newBuilder( - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig - .VertexPredictionEndpoint) - modelConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - modelConfig_ = value; - } - onChanged(); - } else { - if (modelConfigCase_ == 1) { - vertexPredictionEndpointBuilder_.mergeFrom(value); - } else { - vertexPredictionEndpointBuilder_.setMessage(value); - } - } - modelConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - public Builder clearVertexPredictionEndpoint() { - if (vertexPredictionEndpointBuilder_ == null) { - if (modelConfigCase_ == 1) { - modelConfigCase_ = 0; - modelConfig_ = null; - onChanged(); - } - } else { - if (modelConfigCase_ == 1) { - modelConfigCase_ = 0; - modelConfig_ = null; - } - vertexPredictionEndpointBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.Builder - getVertexPredictionEndpointBuilder() { - return internalGetVertexPredictionEndpointFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder - getVertexPredictionEndpointOrBuilder() { - if ((modelConfigCase_ == 1) && (vertexPredictionEndpointBuilder_ != null)) { - return vertexPredictionEndpointBuilder_.getMessageOrBuilder(); - } else { - if (modelConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_; - } - return com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Vertex AI Prediction Endpoint that either refers to a publisher model
-     * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-     * Endpoints hosting non-1P fine-tuned text embedding models are
-     * currently not supported.
-     * This is used for dense vector search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint.Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder> - internalGetVertexPredictionEndpointFieldBuilder() { - if (vertexPredictionEndpointBuilder_ == null) { - if (!(modelConfigCase_ == 1)) { - modelConfig_ = - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .getDefaultInstance(); - } - vertexPredictionEndpointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - .Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig - .VertexPredictionEndpointOrBuilder>( - (com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint) - modelConfig_, - getParentForChildren(), - isClean()); - modelConfig_ = null; - } - modelConfigCase_ = 1; - onChanged(); - return vertexPredictionEndpointBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagEmbeddingModelConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagEmbeddingModelConfig) - private static final com.google.cloud.vertexai.api.RagEmbeddingModelConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagEmbeddingModelConfig(); - } - - public static com.google.cloud.vertexai.api.RagEmbeddingModelConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagEmbeddingModelConfig 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.vertexai.api.RagEmbeddingModelConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfigOrBuilder.java deleted file mode 100644 index e164675a97e4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEmbeddingModelConfigOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagEmbeddingModelConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagEmbeddingModelConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return Whether the vertexPredictionEndpoint field is set. - */ - boolean hasVertexPredictionEndpoint(); - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - * - * @return The vertexPredictionEndpoint. - */ - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpoint - getVertexPredictionEndpoint(); - - /** - * - * - *
-   * The Vertex AI Prediction Endpoint that either refers to a publisher model
-   * or an endpoint that is hosting a 1P fine-tuned text embedding model.
-   * Endpoints hosting non-1P fine-tuned text embedding models are
-   * currently not supported.
-   * This is used for dense vector search.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; - * - */ - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.VertexPredictionEndpointOrBuilder - getVertexPredictionEndpointOrBuilder(); - - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.ModelConfigCase getModelConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfig.java deleted file mode 100644 index b1c82b79f013..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfig.java +++ /dev/null @@ -1,908 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for RagEngine.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagEngineConfig} - */ -@com.google.protobuf.Generated -public final class RagEngineConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagEngineConfig) - RagEngineConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagEngineConfig"); - } - - // Use RagEngineConfig.newBuilder() to construct. - private RagEngineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagEngineConfig() { - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEngineConfig.class, - com.google.cloud.vertexai.api.RagEngineConfig.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Identifier. The name of the RagEngineConfig.
-   * Format:
-   * `projects/{project}/locations/{location}/ragEngineConfig`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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; - } - } - - /** - * - * - *
-   * Identifier. The name of the RagEngineConfig.
-   * Format:
-   * `projects/{project}/locations/{location}/ragEngineConfig`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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 RAG_MANAGED_DB_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.RagManagedDbConfig ragManagedDbConfig_; - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return Whether the ragManagedDbConfig field is set. - */ - @java.lang.Override - public boolean hasRagManagedDbConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return The ragManagedDbConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig getRagManagedDbConfig() { - return ragManagedDbConfig_ == null - ? com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance() - : ragManagedDbConfig_; - } - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder - getRagManagedDbConfigOrBuilder() { - return ragManagedDbConfig_ == null - ? com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance() - : ragManagedDbConfig_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getRagManagedDbConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRagManagedDbConfig()); - } - 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.vertexai.api.RagEngineConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagEngineConfig other = - (com.google.cloud.vertexai.api.RagEngineConfig) obj; - - if (!getName().equals(other.getName())) return false; - if (hasRagManagedDbConfig() != other.hasRagManagedDbConfig()) return false; - if (hasRagManagedDbConfig()) { - if (!getRagManagedDbConfig().equals(other.getRagManagedDbConfig())) 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 (hasRagManagedDbConfig()) { - hash = (37 * hash) + RAG_MANAGED_DB_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagManagedDbConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig 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.vertexai.api.RagEngineConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig 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.vertexai.api.RagEngineConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagEngineConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for RagEngine.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagEngineConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagEngineConfig) - com.google.cloud.vertexai.api.RagEngineConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagEngineConfig.class, - com.google.cloud.vertexai.api.RagEngineConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagEngineConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagManagedDbConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - ragManagedDbConfig_ = null; - if (ragManagedDbConfigBuilder_ != null) { - ragManagedDbConfigBuilder_.dispose(); - ragManagedDbConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEngineConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagEngineConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEngineConfig build() { - com.google.cloud.vertexai.api.RagEngineConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagEngineConfig buildPartial() { - com.google.cloud.vertexai.api.RagEngineConfig result = - new com.google.cloud.vertexai.api.RagEngineConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagEngineConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.ragManagedDbConfig_ = - ragManagedDbConfigBuilder_ == null - ? ragManagedDbConfig_ - : ragManagedDbConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagEngineConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagEngineConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagEngineConfig other) { - if (other == com.google.cloud.vertexai.api.RagEngineConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasRagManagedDbConfig()) { - mergeRagManagedDbConfig(other.getRagManagedDbConfig()); - } - 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( - internalGetRagManagedDbConfigFieldBuilder().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 name_ = ""; - - /** - * - * - *
-     * Identifier. The name of the RagEngineConfig.
-     * Format:
-     * `projects/{project}/locations/{location}/ragEngineConfig`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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; - } - } - - /** - * - * - *
-     * Identifier. The name of the RagEngineConfig.
-     * Format:
-     * `projects/{project}/locations/{location}/ragEngineConfig`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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; - } - } - - /** - * - * - *
-     * Identifier. The name of the RagEngineConfig.
-     * Format:
-     * `projects/{project}/locations/{location}/ragEngineConfig`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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; - } - - /** - * - * - *
-     * Identifier. The name of the RagEngineConfig.
-     * Format:
-     * `projects/{project}/locations/{location}/ragEngineConfig`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Identifier. The name of the RagEngineConfig.
-     * Format:
-     * `projects/{project}/locations/{location}/ragEngineConfig`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @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.vertexai.api.RagManagedDbConfig ragManagedDbConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig, - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder> - ragManagedDbConfigBuilder_; - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return Whether the ragManagedDbConfig field is set. - */ - public boolean hasRagManagedDbConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return The ragManagedDbConfig. - */ - public com.google.cloud.vertexai.api.RagManagedDbConfig getRagManagedDbConfig() { - if (ragManagedDbConfigBuilder_ == null) { - return ragManagedDbConfig_ == null - ? com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance() - : ragManagedDbConfig_; - } else { - return ragManagedDbConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public Builder setRagManagedDbConfig(com.google.cloud.vertexai.api.RagManagedDbConfig value) { - if (ragManagedDbConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragManagedDbConfig_ = value; - } else { - ragManagedDbConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public Builder setRagManagedDbConfig( - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder builderForValue) { - if (ragManagedDbConfigBuilder_ == null) { - ragManagedDbConfig_ = builderForValue.build(); - } else { - ragManagedDbConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public Builder mergeRagManagedDbConfig(com.google.cloud.vertexai.api.RagManagedDbConfig value) { - if (ragManagedDbConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && ragManagedDbConfig_ != null - && ragManagedDbConfig_ - != com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance()) { - getRagManagedDbConfigBuilder().mergeFrom(value); - } else { - ragManagedDbConfig_ = value; - } - } else { - ragManagedDbConfigBuilder_.mergeFrom(value); - } - if (ragManagedDbConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public Builder clearRagManagedDbConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - ragManagedDbConfig_ = null; - if (ragManagedDbConfigBuilder_ != null) { - ragManagedDbConfigBuilder_.dispose(); - ragManagedDbConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public com.google.cloud.vertexai.api.RagManagedDbConfig.Builder getRagManagedDbConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetRagManagedDbConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - public com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder - getRagManagedDbConfigOrBuilder() { - if (ragManagedDbConfigBuilder_ != null) { - return ragManagedDbConfigBuilder_.getMessageOrBuilder(); - } else { - return ragManagedDbConfig_ == null - ? com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance() - : ragManagedDbConfig_; - } - } - - /** - * - * - *
-     * The config of the RagManagedDb used by RagEngine.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig, - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder> - internalGetRagManagedDbConfigFieldBuilder() { - if (ragManagedDbConfigBuilder_ == null) { - ragManagedDbConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig, - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder>( - getRagManagedDbConfig(), getParentForChildren(), isClean()); - ragManagedDbConfig_ = null; - } - return ragManagedDbConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagEngineConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagEngineConfig) - private static final com.google.cloud.vertexai.api.RagEngineConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagEngineConfig(); - } - - public static com.google.cloud.vertexai.api.RagEngineConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagEngineConfig 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.vertexai.api.RagEngineConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfigOrBuilder.java deleted file mode 100644 index 3760d983b34d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagEngineConfigOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagEngineConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagEngineConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Identifier. The name of the RagEngineConfig.
-   * Format:
-   * `projects/{project}/locations/{location}/ragEngineConfig`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Identifier. The name of the RagEngineConfig.
-   * Format:
-   * `projects/{project}/locations/{location}/ragEngineConfig`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return Whether the ragManagedDbConfig field is set. - */ - boolean hasRagManagedDbConfig(); - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - * - * @return The ragManagedDbConfig. - */ - com.google.cloud.vertexai.api.RagManagedDbConfig getRagManagedDbConfig(); - - /** - * - * - *
-   * The config of the RagManagedDb used by RagEngine.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig rag_managed_db_config = 2; - */ - com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder getRagManagedDbConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFile.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFile.java deleted file mode 100644 index de1eb8146298..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFile.java +++ /dev/null @@ -1,3939 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A RagFile contains user data for chunking, embedding and indexing.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFile} - */ -@com.google.protobuf.Generated -public final class RagFile extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFile) - RagFileOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagFile"); - } - - // Use RagFile.newBuilder() to construct. - private RagFile(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagFile() { - name_ = ""; - displayName_ = ""; - description_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFile.class, - com.google.cloud.vertexai.api.RagFile.Builder.class); - } - - private int bitField0_; - private int ragFileSourceCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object ragFileSource_; - - public enum RagFileSourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_SOURCE(8), - GOOGLE_DRIVE_SOURCE(9), - DIRECT_UPLOAD_SOURCE(10), - SLACK_SOURCE(11), - JIRA_SOURCE(12), - SHARE_POINT_SOURCES(14), - RAGFILESOURCE_NOT_SET(0); - private final int value; - - private RagFileSourceCase(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 RagFileSourceCase valueOf(int value) { - return forNumber(value); - } - - public static RagFileSourceCase forNumber(int value) { - switch (value) { - case 8: - return GCS_SOURCE; - case 9: - return GOOGLE_DRIVE_SOURCE; - case 10: - return DIRECT_UPLOAD_SOURCE; - case 11: - return SLACK_SOURCE; - case 12: - return JIRA_SOURCE; - case 14: - return SHARE_POINT_SOURCES; - case 0: - return RAGFILESOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public RagFileSourceCase getRagFileSourceCase() { - return RagFileSourceCase.forNumber(ragFileSourceCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 8; - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return ragFileSourceCase_ == 8; - } - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (ragFileSourceCase_ == 8) { - return (com.google.cloud.vertexai.api.GcsSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (ragFileSourceCase_ == 8) { - return (com.google.cloud.vertexai.api.GcsSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - - public static final int GOOGLE_DRIVE_SOURCE_FIELD_NUMBER = 9; - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleDriveSource field is set. - */ - @java.lang.Override - public boolean hasGoogleDriveSource() { - return ragFileSourceCase_ == 9; - } - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleDriveSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource() { - if (ragFileSourceCase_ == 9) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder() { - if (ragFileSourceCase_ == 9) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - - public static final int DIRECT_UPLOAD_SOURCE_FIELD_NUMBER = 10; - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the directUploadSource field is set. - */ - @java.lang.Override - public boolean hasDirectUploadSource() { - return ragFileSourceCase_ == 10; - } - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The directUploadSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSource getDirectUploadSource() { - if (ragFileSourceCase_ == 10) { - return (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder - getDirectUploadSourceOrBuilder() { - if (ragFileSourceCase_ == 10) { - return (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - - public static final int SLACK_SOURCE_FIELD_NUMBER = 11; - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return Whether the slackSource field is set. - */ - @java.lang.Override - public boolean hasSlackSource() { - return ragFileSourceCase_ == 11; - } - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return The slackSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource getSlackSource() { - if (ragFileSourceCase_ == 11) { - return (com.google.cloud.vertexai.api.SlackSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder() { - if (ragFileSourceCase_ == 11) { - return (com.google.cloud.vertexai.api.SlackSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - - public static final int JIRA_SOURCE_FIELD_NUMBER = 12; - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return Whether the jiraSource field is set. - */ - @java.lang.Override - public boolean hasJiraSource() { - return ragFileSourceCase_ == 12; - } - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return The jiraSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource getJiraSource() { - if (ragFileSourceCase_ == 12) { - return (com.google.cloud.vertexai.api.JiraSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder() { - if (ragFileSourceCase_ == 12) { - return (com.google.cloud.vertexai.api.JiraSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - - public static final int SHARE_POINT_SOURCES_FIELD_NUMBER = 14; - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return Whether the sharePointSources field is set. - */ - @java.lang.Override - public boolean hasSharePointSources() { - return ragFileSourceCase_ == 14; - } - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return The sharePointSources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources getSharePointSources() { - if (ragFileSourceCase_ == 14) { - return (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSourcesOrBuilder getSharePointSourcesOrBuilder() { - if (ragFileSourceCase_ == 14) { - return (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * - * - *
-   * Output only. The resource name of the RagFile.
-   * 
- * - * 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. The resource name of the RagFile.
-   * 
- * - * 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 DISPLAY_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; - - /** - * - * - *
-   * Required. The display name of the RagFile.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-   * Required. The display name of the RagFile.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 DESCRIPTION_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - - /** - * - * - *
-   * Optional. The description of the RagFile.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The description of the RagFile.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.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 UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp updateTime_; - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int FILE_STATUS_FIELD_NUMBER = 13; - private com.google.cloud.vertexai.api.FileStatus fileStatus_; - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the fileStatus field is set. - */ - @java.lang.Override - public boolean hasFileStatus() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The fileStatus. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatus getFileStatus() { - return fileStatus_ == null - ? com.google.cloud.vertexai.api.FileStatus.getDefaultInstance() - : fileStatus_; - } - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FileStatusOrBuilder getFileStatusOrBuilder() { - return fileStatus_ == null - ? com.google.cloud.vertexai.api.FileStatus.getDefaultInstance() - : fileStatus_; - } - - 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.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getUpdateTime()); - } - if (ragFileSourceCase_ == 8) { - output.writeMessage(8, (com.google.cloud.vertexai.api.GcsSource) ragFileSource_); - } - if (ragFileSourceCase_ == 9) { - output.writeMessage(9, (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_); - } - if (ragFileSourceCase_ == 10) { - output.writeMessage(10, (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_); - } - if (ragFileSourceCase_ == 11) { - output.writeMessage(11, (com.google.cloud.vertexai.api.SlackSource) ragFileSource_); - } - if (ragFileSourceCase_ == 12) { - output.writeMessage(12, (com.google.cloud.vertexai.api.JiraSource) ragFileSource_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(13, getFileStatus()); - } - if (ragFileSourceCase_ == 14) { - output.writeMessage(14, (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); - } - if (ragFileSourceCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.vertexai.api.GcsSource) ragFileSource_); - } - if (ragFileSourceCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_); - } - if (ragFileSourceCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_); - } - if (ragFileSourceCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, (com.google.cloud.vertexai.api.SlackSource) ragFileSource_); - } - if (ragFileSourceCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.vertexai.api.JiraSource) ragFileSource_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getFileStatus()); - } - if (ragFileSourceCase_ == 14) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 14, (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_); - } - 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.vertexai.api.RagFile)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFile other = (com.google.cloud.vertexai.api.RagFile) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - 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 (hasFileStatus() != other.hasFileStatus()) return false; - if (hasFileStatus()) { - if (!getFileStatus().equals(other.getFileStatus())) return false; - } - if (!getRagFileSourceCase().equals(other.getRagFileSourceCase())) return false; - switch (ragFileSourceCase_) { - case 8: - if (!getGcsSource().equals(other.getGcsSource())) return false; - break; - case 9: - if (!getGoogleDriveSource().equals(other.getGoogleDriveSource())) return false; - break; - case 10: - if (!getDirectUploadSource().equals(other.getDirectUploadSource())) return false; - break; - case 11: - if (!getSlackSource().equals(other.getSlackSource())) return false; - break; - case 12: - if (!getJiraSource().equals(other.getJiraSource())) return false; - break; - case 14: - if (!getSharePointSources().equals(other.getSharePointSources())) 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) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().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 (hasFileStatus()) { - hash = (37 * hash) + FILE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getFileStatus().hashCode(); - } - switch (ragFileSourceCase_) { - case 8: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 9: - hash = (37 * hash) + GOOGLE_DRIVE_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGoogleDriveSource().hashCode(); - break; - case 10: - hash = (37 * hash) + DIRECT_UPLOAD_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getDirectUploadSource().hashCode(); - break; - case 11: - hash = (37 * hash) + SLACK_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSlackSource().hashCode(); - break; - case 12: - hash = (37 * hash) + JIRA_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getJiraSource().hashCode(); - break; - case 14: - hash = (37 * hash) + SHARE_POINT_SOURCES_FIELD_NUMBER; - hash = (53 * hash) + getSharePointSources().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFile 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.vertexai.api.RagFile parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFile 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.vertexai.api.RagFile parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFile parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFile parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFile parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFile 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A RagFile contains user data for chunking, embedding and indexing.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFile} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFile) - com.google.cloud.vertexai.api.RagFileOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFile_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFile.class, - com.google.cloud.vertexai.api.RagFile.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagFile.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - internalGetFileStatusFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (gcsSourceBuilder_ != null) { - gcsSourceBuilder_.clear(); - } - if (googleDriveSourceBuilder_ != null) { - googleDriveSourceBuilder_.clear(); - } - if (directUploadSourceBuilder_ != null) { - directUploadSourceBuilder_.clear(); - } - if (slackSourceBuilder_ != null) { - slackSourceBuilder_.clear(); - } - if (jiraSourceBuilder_ != null) { - jiraSourceBuilder_.clear(); - } - if (sharePointSourcesBuilder_ != null) { - sharePointSourcesBuilder_.clear(); - } - name_ = ""; - displayName_ = ""; - description_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - fileStatus_ = null; - if (fileStatusBuilder_ != null) { - fileStatusBuilder_.dispose(); - fileStatusBuilder_ = null; - } - ragFileSourceCase_ = 0; - ragFileSource_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFile_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFile getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFile.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFile build() { - com.google.cloud.vertexai.api.RagFile result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFile buildPartial() { - com.google.cloud.vertexai.api.RagFile result = - new com.google.cloud.vertexai.api.RagFile(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagFile result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000040) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.description_ = description_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000200) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.fileStatus_ = fileStatusBuilder_ == null ? fileStatus_ : fileStatusBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagFile result) { - result.ragFileSourceCase_ = ragFileSourceCase_; - result.ragFileSource_ = this.ragFileSource_; - if (ragFileSourceCase_ == 8 && gcsSourceBuilder_ != null) { - result.ragFileSource_ = gcsSourceBuilder_.build(); - } - if (ragFileSourceCase_ == 9 && googleDriveSourceBuilder_ != null) { - result.ragFileSource_ = googleDriveSourceBuilder_.build(); - } - if (ragFileSourceCase_ == 10 && directUploadSourceBuilder_ != null) { - result.ragFileSource_ = directUploadSourceBuilder_.build(); - } - if (ragFileSourceCase_ == 11 && slackSourceBuilder_ != null) { - result.ragFileSource_ = slackSourceBuilder_.build(); - } - if (ragFileSourceCase_ == 12 && jiraSourceBuilder_ != null) { - result.ragFileSource_ = jiraSourceBuilder_.build(); - } - if (ragFileSourceCase_ == 14 && sharePointSourcesBuilder_ != null) { - result.ragFileSource_ = sharePointSourcesBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFile) { - return mergeFrom((com.google.cloud.vertexai.api.RagFile) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagFile other) { - if (other == com.google.cloud.vertexai.api.RagFile.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000100; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasFileStatus()) { - mergeFileStatus(other.getFileStatus()); - } - switch (other.getRagFileSourceCase()) { - case GCS_SOURCE: - { - mergeGcsSource(other.getGcsSource()); - break; - } - case GOOGLE_DRIVE_SOURCE: - { - mergeGoogleDriveSource(other.getGoogleDriveSource()); - break; - } - case DIRECT_UPLOAD_SOURCE: - { - mergeDirectUploadSource(other.getDirectUploadSource()); - break; - } - case SLACK_SOURCE: - { - mergeSlackSource(other.getSlackSource()); - break; - } - case JIRA_SOURCE: - { - mergeJiraSource(other.getJiraSource()); - break; - } - case SHARE_POINT_SOURCES: - { - mergeSharePointSources(other.getSharePointSources()); - break; - } - case RAGFILESOURCE_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_ |= 0x00000040; - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 18 - case 26: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - break; - } // case 26 - case 50: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetGcsSourceFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetGoogleDriveSourceFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage( - internalGetDirectUploadSourceFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage( - internalGetSlackSourceFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 11; - break; - } // case 90 - case 98: - { - input.readMessage( - internalGetJiraSourceFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 12; - break; - } // case 98 - case 106: - { - input.readMessage( - internalGetFileStatusFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 106 - case 114: - { - input.readMessage( - internalGetSharePointSourcesFieldBuilder().getBuilder(), extensionRegistry); - ragFileSourceCase_ = 14; - break; - } // case 114 - 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 ragFileSourceCase_ = 0; - private java.lang.Object ragFileSource_; - - public RagFileSourceCase getRagFileSourceCase() { - return RagFileSourceCase.forNumber(ragFileSourceCase_); - } - - public Builder clearRagFileSource() { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - gcsSourceBuilder_; - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return ragFileSourceCase_ == 8; - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (ragFileSourceCase_ == 8) { - return (com.google.cloud.vertexai.api.GcsSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 8) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - ragFileSourceCase_ = 8; - return this; - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGcsSource(com.google.cloud.vertexai.api.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 8; - return this; - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (ragFileSourceCase_ == 8 - && ragFileSource_ != com.google.cloud.vertexai.api.GcsSource.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.GcsSource.newBuilder( - (com.google.cloud.vertexai.api.GcsSource) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 8) { - gcsSourceBuilder_.mergeFrom(value); - } else { - gcsSourceBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 8; - return this; - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (ragFileSourceCase_ == 8) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 8) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GcsSource.Builder getGcsSourceBuilder() { - return internalGetGcsSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((ragFileSourceCase_ == 8) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 8) { - return (com.google.cloud.vertexai.api.GcsSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. Google Cloud Storage location of the RagFile.
-     * It does not support wildcards in the Cloud Storage uri for now.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder> - internalGetGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(ragFileSourceCase_ == 8)) { - ragFileSource_ = com.google.cloud.vertexai.api.GcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsSource, - com.google.cloud.vertexai.api.GcsSource.Builder, - com.google.cloud.vertexai.api.GcsSourceOrBuilder>( - (com.google.cloud.vertexai.api.GcsSource) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 8; - onChanged(); - return gcsSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder> - googleDriveSourceBuilder_; - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleDriveSource field is set. - */ - @java.lang.Override - public boolean hasGoogleDriveSource() { - return ragFileSourceCase_ == 9; - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleDriveSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource() { - if (googleDriveSourceBuilder_ == null) { - if (ragFileSourceCase_ == 9) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 9) { - return googleDriveSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGoogleDriveSource(com.google.cloud.vertexai.api.GoogleDriveSource value) { - if (googleDriveSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - googleDriveSourceBuilder_.setMessage(value); - } - ragFileSourceCase_ = 9; - return this; - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGoogleDriveSource( - com.google.cloud.vertexai.api.GoogleDriveSource.Builder builderForValue) { - if (googleDriveSourceBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - googleDriveSourceBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 9; - return this; - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeGoogleDriveSource(com.google.cloud.vertexai.api.GoogleDriveSource value) { - if (googleDriveSourceBuilder_ == null) { - if (ragFileSourceCase_ == 9 - && ragFileSource_ - != com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.GoogleDriveSource.newBuilder( - (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 9) { - googleDriveSourceBuilder_.mergeFrom(value); - } else { - googleDriveSourceBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 9; - return this; - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearGoogleDriveSource() { - if (googleDriveSourceBuilder_ == null) { - if (ragFileSourceCase_ == 9) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 9) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - googleDriveSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.GoogleDriveSource.Builder getGoogleDriveSourceBuilder() { - return internalGetGoogleDriveSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder - getGoogleDriveSourceOrBuilder() { - if ((ragFileSourceCase_ == 9) && (googleDriveSourceBuilder_ != null)) { - return googleDriveSourceBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 9) { - return (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. Google Drive location. Supports importing individual files
-     * as well as Google Drive folders.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder> - internalGetGoogleDriveSourceFieldBuilder() { - if (googleDriveSourceBuilder_ == null) { - if (!(ragFileSourceCase_ == 9)) { - ragFileSource_ = com.google.cloud.vertexai.api.GoogleDriveSource.getDefaultInstance(); - } - googleDriveSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleDriveSource, - com.google.cloud.vertexai.api.GoogleDriveSource.Builder, - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder>( - (com.google.cloud.vertexai.api.GoogleDriveSource) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 9; - onChanged(); - return googleDriveSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DirectUploadSource, - com.google.cloud.vertexai.api.DirectUploadSource.Builder, - com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder> - directUploadSourceBuilder_; - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the directUploadSource field is set. - */ - @java.lang.Override - public boolean hasDirectUploadSource() { - return ragFileSourceCase_ == 10; - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The directUploadSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSource getDirectUploadSource() { - if (directUploadSourceBuilder_ == null) { - if (ragFileSourceCase_ == 10) { - return (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 10) { - return directUploadSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDirectUploadSource(com.google.cloud.vertexai.api.DirectUploadSource value) { - if (directUploadSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - directUploadSourceBuilder_.setMessage(value); - } - ragFileSourceCase_ = 10; - return this; - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDirectUploadSource( - com.google.cloud.vertexai.api.DirectUploadSource.Builder builderForValue) { - if (directUploadSourceBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - directUploadSourceBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 10; - return this; - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDirectUploadSource(com.google.cloud.vertexai.api.DirectUploadSource value) { - if (directUploadSourceBuilder_ == null) { - if (ragFileSourceCase_ == 10 - && ragFileSource_ - != com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.DirectUploadSource.newBuilder( - (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 10) { - directUploadSourceBuilder_.mergeFrom(value); - } else { - directUploadSourceBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 10; - return this; - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDirectUploadSource() { - if (directUploadSourceBuilder_ == null) { - if (ragFileSourceCase_ == 10) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 10) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - directUploadSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.DirectUploadSource.Builder getDirectUploadSourceBuilder() { - return internalGetDirectUploadSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder - getDirectUploadSourceOrBuilder() { - if ((ragFileSourceCase_ == 10) && (directUploadSourceBuilder_ != null)) { - return directUploadSourceBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 10) { - return (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Output only. The RagFile is encapsulated and uploaded in the
-     * UploadRagFile request.
-     * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DirectUploadSource, - com.google.cloud.vertexai.api.DirectUploadSource.Builder, - com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder> - internalGetDirectUploadSourceFieldBuilder() { - if (directUploadSourceBuilder_ == null) { - if (!(ragFileSourceCase_ == 10)) { - ragFileSource_ = com.google.cloud.vertexai.api.DirectUploadSource.getDefaultInstance(); - } - directUploadSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.DirectUploadSource, - com.google.cloud.vertexai.api.DirectUploadSource.Builder, - com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder>( - (com.google.cloud.vertexai.api.DirectUploadSource) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 10; - onChanged(); - return directUploadSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder> - slackSourceBuilder_; - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return Whether the slackSource field is set. - */ - @java.lang.Override - public boolean hasSlackSource() { - return ragFileSourceCase_ == 11; - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return The slackSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource getSlackSource() { - if (slackSourceBuilder_ == null) { - if (ragFileSourceCase_ == 11) { - return (com.google.cloud.vertexai.api.SlackSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 11) { - return slackSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - public Builder setSlackSource(com.google.cloud.vertexai.api.SlackSource value) { - if (slackSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - slackSourceBuilder_.setMessage(value); - } - ragFileSourceCase_ = 11; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - public Builder setSlackSource( - com.google.cloud.vertexai.api.SlackSource.Builder builderForValue) { - if (slackSourceBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - slackSourceBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 11; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - public Builder mergeSlackSource(com.google.cloud.vertexai.api.SlackSource value) { - if (slackSourceBuilder_ == null) { - if (ragFileSourceCase_ == 11 - && ragFileSource_ != com.google.cloud.vertexai.api.SlackSource.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.SlackSource.newBuilder( - (com.google.cloud.vertexai.api.SlackSource) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 11) { - slackSourceBuilder_.mergeFrom(value); - } else { - slackSourceBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 11; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - public Builder clearSlackSource() { - if (slackSourceBuilder_ == null) { - if (ragFileSourceCase_ == 11) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 11) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - slackSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - public com.google.cloud.vertexai.api.SlackSource.Builder getSlackSourceBuilder() { - return internalGetSlackSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder() { - if ((ragFileSourceCase_ == 11) && (slackSourceBuilder_ != null)) { - return slackSourceBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 11) { - return (com.google.cloud.vertexai.api.SlackSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a Slack channel.
-     * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder> - internalGetSlackSourceFieldBuilder() { - if (slackSourceBuilder_ == null) { - if (!(ragFileSourceCase_ == 11)) { - ragFileSource_ = com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - slackSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SlackSource, - com.google.cloud.vertexai.api.SlackSource.Builder, - com.google.cloud.vertexai.api.SlackSourceOrBuilder>( - (com.google.cloud.vertexai.api.SlackSource) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 11; - onChanged(); - return slackSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder> - jiraSourceBuilder_; - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return Whether the jiraSource field is set. - */ - @java.lang.Override - public boolean hasJiraSource() { - return ragFileSourceCase_ == 12; - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return The jiraSource. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSource getJiraSource() { - if (jiraSourceBuilder_ == null) { - if (ragFileSourceCase_ == 12) { - return (com.google.cloud.vertexai.api.JiraSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 12) { - return jiraSourceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - public Builder setJiraSource(com.google.cloud.vertexai.api.JiraSource value) { - if (jiraSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - jiraSourceBuilder_.setMessage(value); - } - ragFileSourceCase_ = 12; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - public Builder setJiraSource(com.google.cloud.vertexai.api.JiraSource.Builder builderForValue) { - if (jiraSourceBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - jiraSourceBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 12; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - public Builder mergeJiraSource(com.google.cloud.vertexai.api.JiraSource value) { - if (jiraSourceBuilder_ == null) { - if (ragFileSourceCase_ == 12 - && ragFileSource_ != com.google.cloud.vertexai.api.JiraSource.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.JiraSource.newBuilder( - (com.google.cloud.vertexai.api.JiraSource) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 12) { - jiraSourceBuilder_.mergeFrom(value); - } else { - jiraSourceBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 12; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - public Builder clearJiraSource() { - if (jiraSourceBuilder_ == null) { - if (ragFileSourceCase_ == 12) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 12) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - jiraSourceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - public com.google.cloud.vertexai.api.JiraSource.Builder getJiraSourceBuilder() { - return internalGetJiraSourceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder() { - if ((ragFileSourceCase_ == 12) && (jiraSourceBuilder_ != null)) { - return jiraSourceBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 12) { - return (com.google.cloud.vertexai.api.JiraSource) ragFileSource_; - } - return com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a Jira query.
-     * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder> - internalGetJiraSourceFieldBuilder() { - if (jiraSourceBuilder_ == null) { - if (!(ragFileSourceCase_ == 12)) { - ragFileSource_ = com.google.cloud.vertexai.api.JiraSource.getDefaultInstance(); - } - jiraSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.JiraSource, - com.google.cloud.vertexai.api.JiraSource.Builder, - com.google.cloud.vertexai.api.JiraSourceOrBuilder>( - (com.google.cloud.vertexai.api.JiraSource) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 12; - onChanged(); - return jiraSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder> - sharePointSourcesBuilder_; - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return Whether the sharePointSources field is set. - */ - @java.lang.Override - public boolean hasSharePointSources() { - return ragFileSourceCase_ == 14; - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return The sharePointSources. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources getSharePointSources() { - if (sharePointSourcesBuilder_ == null) { - if (ragFileSourceCase_ == 14) { - return (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } else { - if (ragFileSourceCase_ == 14) { - return sharePointSourcesBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - public Builder setSharePointSources(com.google.cloud.vertexai.api.SharePointSources value) { - if (sharePointSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileSource_ = value; - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(value); - } - ragFileSourceCase_ = 14; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - public Builder setSharePointSources( - com.google.cloud.vertexai.api.SharePointSources.Builder builderForValue) { - if (sharePointSourcesBuilder_ == null) { - ragFileSource_ = builderForValue.build(); - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(builderForValue.build()); - } - ragFileSourceCase_ = 14; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - public Builder mergeSharePointSources(com.google.cloud.vertexai.api.SharePointSources value) { - if (sharePointSourcesBuilder_ == null) { - if (ragFileSourceCase_ == 14 - && ragFileSource_ - != com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance()) { - ragFileSource_ = - com.google.cloud.vertexai.api.SharePointSources.newBuilder( - (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_) - .mergeFrom(value) - .buildPartial(); - } else { - ragFileSource_ = value; - } - onChanged(); - } else { - if (ragFileSourceCase_ == 14) { - sharePointSourcesBuilder_.mergeFrom(value); - } else { - sharePointSourcesBuilder_.setMessage(value); - } - } - ragFileSourceCase_ = 14; - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - public Builder clearSharePointSources() { - if (sharePointSourcesBuilder_ == null) { - if (ragFileSourceCase_ == 14) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - onChanged(); - } - } else { - if (ragFileSourceCase_ == 14) { - ragFileSourceCase_ = 0; - ragFileSource_ = null; - } - sharePointSourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - public com.google.cloud.vertexai.api.SharePointSources.Builder getSharePointSourcesBuilder() { - return internalGetSharePointSourcesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSourcesOrBuilder - getSharePointSourcesOrBuilder() { - if ((ragFileSourceCase_ == 14) && (sharePointSourcesBuilder_ != null)) { - return sharePointSourcesBuilder_.getMessageOrBuilder(); - } else { - if (ragFileSourceCase_ == 14) { - return (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_; - } - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The RagFile is imported from a SharePoint source.
-     * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder> - internalGetSharePointSourcesFieldBuilder() { - if (sharePointSourcesBuilder_ == null) { - if (!(ragFileSourceCase_ == 14)) { - ragFileSource_ = com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - sharePointSourcesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources, - com.google.cloud.vertexai.api.SharePointSources.Builder, - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder>( - (com.google.cloud.vertexai.api.SharePointSources) ragFileSource_, - getParentForChildren(), - isClean()); - ragFileSource_ = null; - } - ragFileSourceCase_ = 14; - onChanged(); - return sharePointSourcesBuilder_; - } - - private java.lang.Object name_ = ""; - - /** - * - * - *
-     * Output only. The resource name of the RagFile.
-     * 
- * - * 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. The resource name of the RagFile.
-     * 
- * - * 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. The resource name of the RagFile.
-     * 
- * - * 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_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the RagFile.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The resource name of the RagFile.
-     * 
- * - * 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_ |= 0x00000040; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - - /** - * - * - *
-     * Required. The display name of the RagFile.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the RagFile.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - - /** - * - * - *
-     * Required. The display name of the RagFile.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The display name of the RagFile.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The display name of the RagFile.
-     * The name can be up to 128 characters long and can consist of any UTF-8
-     * characters.
-     * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - - /** - * - * - *
-     * Optional. The description of the RagFile.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the RagFile.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the RagFile.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the RagFile.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the RagFile.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000200) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000200; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000200); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp when this RagFile was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000400) != 0); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000400); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - - /** - * - * - *
-     * Output only. Timestamp when this RagFile was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.cloud.vertexai.api.FileStatus fileStatus_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileStatus, - com.google.cloud.vertexai.api.FileStatus.Builder, - com.google.cloud.vertexai.api.FileStatusOrBuilder> - fileStatusBuilder_; - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the fileStatus field is set. - */ - public boolean hasFileStatus() { - return ((bitField0_ & 0x00000800) != 0); - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The fileStatus. - */ - public com.google.cloud.vertexai.api.FileStatus getFileStatus() { - if (fileStatusBuilder_ == null) { - return fileStatus_ == null - ? com.google.cloud.vertexai.api.FileStatus.getDefaultInstance() - : fileStatus_; - } else { - return fileStatusBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setFileStatus(com.google.cloud.vertexai.api.FileStatus value) { - if (fileStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fileStatus_ = value; - } else { - fileStatusBuilder_.setMessage(value); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setFileStatus(com.google.cloud.vertexai.api.FileStatus.Builder builderForValue) { - if (fileStatusBuilder_ == null) { - fileStatus_ = builderForValue.build(); - } else { - fileStatusBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeFileStatus(com.google.cloud.vertexai.api.FileStatus value) { - if (fileStatusBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) - && fileStatus_ != null - && fileStatus_ != com.google.cloud.vertexai.api.FileStatus.getDefaultInstance()) { - getFileStatusBuilder().mergeFrom(value); - } else { - fileStatus_ = value; - } - } else { - fileStatusBuilder_.mergeFrom(value); - } - if (fileStatus_ != null) { - bitField0_ |= 0x00000800; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearFileStatus() { - bitField0_ = (bitField0_ & ~0x00000800); - fileStatus_ = null; - if (fileStatusBuilder_ != null) { - fileStatusBuilder_.dispose(); - fileStatusBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.FileStatus.Builder getFileStatusBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return internalGetFileStatusFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.FileStatusOrBuilder getFileStatusOrBuilder() { - if (fileStatusBuilder_ != null) { - return fileStatusBuilder_.getMessageOrBuilder(); - } else { - return fileStatus_ == null - ? com.google.cloud.vertexai.api.FileStatus.getDefaultInstance() - : fileStatus_; - } - } - - /** - * - * - *
-     * Output only. State of the RagFile.
-     * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileStatus, - com.google.cloud.vertexai.api.FileStatus.Builder, - com.google.cloud.vertexai.api.FileStatusOrBuilder> - internalGetFileStatusFieldBuilder() { - if (fileStatusBuilder_ == null) { - fileStatusBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FileStatus, - com.google.cloud.vertexai.api.FileStatus.Builder, - com.google.cloud.vertexai.api.FileStatusOrBuilder>( - getFileStatus(), getParentForChildren(), isClean()); - fileStatus_ = null; - } - return fileStatusBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFile) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFile) - private static final com.google.cloud.vertexai.api.RagFile DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFile(); - } - - public static com.google.cloud.vertexai.api.RagFile getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagFile 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.vertexai.api.RagFile getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfig.java deleted file mode 100644 index ec06f0790e64..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfig.java +++ /dev/null @@ -1,1477 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specifies the size and overlap of chunks for RagFiles.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileChunkingConfig} - */ -@com.google.protobuf.Generated -public final class RagFileChunkingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileChunkingConfig) - RagFileChunkingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagFileChunkingConfig"); - } - - // Use RagFileChunkingConfig.newBuilder() to construct. - private RagFileChunkingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagFileChunkingConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileChunkingConfig.class, - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder.class); - } - - public interface FixedLengthChunkingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The size of the chunks.
-     * 
- * - * int32 chunk_size = 1; - * - * @return The chunkSize. - */ - int getChunkSize(); - - /** - * - * - *
-     * The overlap between chunks.
-     * 
- * - * int32 chunk_overlap = 2; - * - * @return The chunkOverlap. - */ - int getChunkOverlap(); - } - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking} - */ - public static final class FixedLengthChunking extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking) - FixedLengthChunkingOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FixedLengthChunking"); - } - - // Use FixedLengthChunking.newBuilder() to construct. - private FixedLengthChunking(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private FixedLengthChunking() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.class, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder - .class); - } - - public static final int CHUNK_SIZE_FIELD_NUMBER = 1; - private int chunkSize_ = 0; - - /** - * - * - *
-     * The size of the chunks.
-     * 
- * - * int32 chunk_size = 1; - * - * @return The chunkSize. - */ - @java.lang.Override - public int getChunkSize() { - return chunkSize_; - } - - public static final int CHUNK_OVERLAP_FIELD_NUMBER = 2; - private int chunkOverlap_ = 0; - - /** - * - * - *
-     * The overlap between chunks.
-     * 
- * - * int32 chunk_overlap = 2; - * - * @return The chunkOverlap. - */ - @java.lang.Override - public int getChunkOverlap() { - return chunkOverlap_; - } - - 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 (chunkSize_ != 0) { - output.writeInt32(1, chunkSize_); - } - if (chunkOverlap_ != 0) { - output.writeInt32(2, chunkOverlap_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (chunkSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, chunkSize_); - } - if (chunkOverlap_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, chunkOverlap_); - } - 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.vertexai.api.RagFileChunkingConfig.FixedLengthChunking)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking other = - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) obj; - - if (getChunkSize() != other.getChunkSize()) return false; - if (getChunkOverlap() != other.getChunkOverlap()) 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) + CHUNK_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getChunkSize(); - hash = (37 * hash) + CHUNK_OVERLAP_FIELD_NUMBER; - hash = (53 * hash) + getChunkOverlap(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking 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.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking 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.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileChunkingConfig.FixedLengthChunking 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking) - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.class, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - chunkSize_ = 0; - chunkOverlap_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking build() { - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - buildPartial() { - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking result = - new com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.chunkSize_ = chunkSize_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.chunkOverlap_ = chunkOverlap_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking other) { - if (other - == com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance()) return this; - if (other.getChunkSize() != 0) { - setChunkSize(other.getChunkSize()); - } - if (other.getChunkOverlap() != 0) { - setChunkOverlap(other.getChunkOverlap()); - } - 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: - { - chunkSize_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - chunkOverlap_ = 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 chunkSize_; - - /** - * - * - *
-       * The size of the chunks.
-       * 
- * - * int32 chunk_size = 1; - * - * @return The chunkSize. - */ - @java.lang.Override - public int getChunkSize() { - return chunkSize_; - } - - /** - * - * - *
-       * The size of the chunks.
-       * 
- * - * int32 chunk_size = 1; - * - * @param value The chunkSize to set. - * @return This builder for chaining. - */ - public Builder setChunkSize(int value) { - - chunkSize_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The size of the chunks.
-       * 
- * - * int32 chunk_size = 1; - * - * @return This builder for chaining. - */ - public Builder clearChunkSize() { - bitField0_ = (bitField0_ & ~0x00000001); - chunkSize_ = 0; - onChanged(); - return this; - } - - private int chunkOverlap_; - - /** - * - * - *
-       * The overlap between chunks.
-       * 
- * - * int32 chunk_overlap = 2; - * - * @return The chunkOverlap. - */ - @java.lang.Override - public int getChunkOverlap() { - return chunkOverlap_; - } - - /** - * - * - *
-       * The overlap between chunks.
-       * 
- * - * int32 chunk_overlap = 2; - * - * @param value The chunkOverlap to set. - * @return This builder for chaining. - */ - public Builder setChunkOverlap(int value) { - - chunkOverlap_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The overlap between chunks.
-       * 
- * - * int32 chunk_overlap = 2; - * - * @return This builder for chaining. - */ - public Builder clearChunkOverlap() { - bitField0_ = (bitField0_ & ~0x00000002); - chunkOverlap_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking) - private static final com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking(); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FixedLengthChunking 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.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int chunkingConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object chunkingConfig_; - - public enum ChunkingConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FIXED_LENGTH_CHUNKING(3), - CHUNKINGCONFIG_NOT_SET(0); - private final int value; - - private ChunkingConfigCase(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 ChunkingConfigCase valueOf(int value) { - return forNumber(value); - } - - public static ChunkingConfigCase forNumber(int value) { - switch (value) { - case 3: - return FIXED_LENGTH_CHUNKING; - case 0: - return CHUNKINGCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ChunkingConfigCase getChunkingConfigCase() { - return ChunkingConfigCase.forNumber(chunkingConfigCase_); - } - - public static final int FIXED_LENGTH_CHUNKING_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return Whether the fixedLengthChunking field is set. - */ - @java.lang.Override - public boolean hasFixedLengthChunking() { - return chunkingConfigCase_ == 3; - } - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return The fixedLengthChunking. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - getFixedLengthChunking() { - if (chunkingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_; - } - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder - getFixedLengthChunkingOrBuilder() { - if (chunkingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_; - } - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .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 (chunkingConfigCase_ == 3) { - output.writeMessage( - 3, - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (chunkingConfigCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_); - } - 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.vertexai.api.RagFileChunkingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileChunkingConfig other = - (com.google.cloud.vertexai.api.RagFileChunkingConfig) obj; - - if (!getChunkingConfigCase().equals(other.getChunkingConfigCase())) return false; - switch (chunkingConfigCase_) { - case 3: - if (!getFixedLengthChunking().equals(other.getFixedLengthChunking())) 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 (chunkingConfigCase_) { - case 3: - hash = (37 * hash) + FIXED_LENGTH_CHUNKING_FIELD_NUMBER; - hash = (53 * hash) + getFixedLengthChunking().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig 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.vertexai.api.RagFileChunkingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig 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.vertexai.api.RagFileChunkingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileChunkingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specifies the size and overlap of chunks for RagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileChunkingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileChunkingConfig) - com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileChunkingConfig.class, - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagFileChunkingConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (fixedLengthChunkingBuilder_ != null) { - fixedLengthChunkingBuilder_.clear(); - } - chunkingConfigCase_ = 0; - chunkingConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig build() { - com.google.cloud.vertexai.api.RagFileChunkingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig buildPartial() { - com.google.cloud.vertexai.api.RagFileChunkingConfig result = - new com.google.cloud.vertexai.api.RagFileChunkingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagFileChunkingConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagFileChunkingConfig result) { - result.chunkingConfigCase_ = chunkingConfigCase_; - result.chunkingConfig_ = this.chunkingConfig_; - if (chunkingConfigCase_ == 3 && fixedLengthChunkingBuilder_ != null) { - result.chunkingConfig_ = fixedLengthChunkingBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFileChunkingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagFileChunkingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagFileChunkingConfig other) { - if (other == com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance()) - return this; - switch (other.getChunkingConfigCase()) { - case FIXED_LENGTH_CHUNKING: - { - mergeFixedLengthChunking(other.getFixedLengthChunking()); - break; - } - case CHUNKINGCONFIG_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 26: - { - input.readMessage( - internalGetFixedLengthChunkingFieldBuilder().getBuilder(), extensionRegistry); - chunkingConfigCase_ = 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 chunkingConfigCase_ = 0; - private java.lang.Object chunkingConfig_; - - public ChunkingConfigCase getChunkingConfigCase() { - return ChunkingConfigCase.forNumber(chunkingConfigCase_); - } - - public Builder clearChunkingConfig() { - chunkingConfigCase_ = 0; - chunkingConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder> - fixedLengthChunkingBuilder_; - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return Whether the fixedLengthChunking field is set. - */ - @java.lang.Override - public boolean hasFixedLengthChunking() { - return chunkingConfigCase_ == 3; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return The fixedLengthChunking. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - getFixedLengthChunking() { - if (fixedLengthChunkingBuilder_ == null) { - if (chunkingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_; - } - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } else { - if (chunkingConfigCase_ == 3) { - return fixedLengthChunkingBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - public Builder setFixedLengthChunking( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking value) { - if (fixedLengthChunkingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkingConfig_ = value; - onChanged(); - } else { - fixedLengthChunkingBuilder_.setMessage(value); - } - chunkingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - public Builder setFixedLengthChunking( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder - builderForValue) { - if (fixedLengthChunkingBuilder_ == null) { - chunkingConfig_ = builderForValue.build(); - onChanged(); - } else { - fixedLengthChunkingBuilder_.setMessage(builderForValue.build()); - } - chunkingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - public Builder mergeFixedLengthChunking( - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking value) { - if (fixedLengthChunkingBuilder_ == null) { - if (chunkingConfigCase_ == 3 - && chunkingConfig_ - != com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance()) { - chunkingConfig_ = - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.newBuilder( - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - chunkingConfig_ = value; - } - onChanged(); - } else { - if (chunkingConfigCase_ == 3) { - fixedLengthChunkingBuilder_.mergeFrom(value); - } else { - fixedLengthChunkingBuilder_.setMessage(value); - } - } - chunkingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - public Builder clearFixedLengthChunking() { - if (fixedLengthChunkingBuilder_ == null) { - if (chunkingConfigCase_ == 3) { - chunkingConfigCase_ = 0; - chunkingConfig_ = null; - onChanged(); - } - } else { - if (chunkingConfigCase_ == 3) { - chunkingConfigCase_ = 0; - chunkingConfig_ = null; - } - fixedLengthChunkingBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder - getFixedLengthChunkingBuilder() { - return internalGetFixedLengthChunkingFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder - getFixedLengthChunkingOrBuilder() { - if ((chunkingConfigCase_ == 3) && (fixedLengthChunkingBuilder_ != null)) { - return fixedLengthChunkingBuilder_.getMessageOrBuilder(); - } else { - if (chunkingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_; - } - return com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * Specifies the fixed length chunking config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder> - internalGetFixedLengthChunkingFieldBuilder() { - if (fixedLengthChunkingBuilder_ == null) { - if (!(chunkingConfigCase_ == 3)) { - chunkingConfig_ = - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking - .getDefaultInstance(); - } - fixedLengthChunkingBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder>( - (com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking) - chunkingConfig_, - getParentForChildren(), - isClean()); - chunkingConfig_ = null; - } - chunkingConfigCase_ = 3; - onChanged(); - return fixedLengthChunkingBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileChunkingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileChunkingConfig) - private static final com.google.cloud.vertexai.api.RagFileChunkingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFileChunkingConfig(); - } - - public static com.google.cloud.vertexai.api.RagFileChunkingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagFileChunkingConfig 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.vertexai.api.RagFileChunkingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfigOrBuilder.java deleted file mode 100644 index c718f204c27f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileChunkingConfigOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagFileChunkingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileChunkingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return Whether the fixedLengthChunking field is set. - */ - boolean hasFixedLengthChunking(); - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - * - * @return The fixedLengthChunking. - */ - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunking getFixedLengthChunking(); - - /** - * - * - *
-   * Specifies the fixed length chunking config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; - * - */ - com.google.cloud.vertexai.api.RagFileChunkingConfig.FixedLengthChunkingOrBuilder - getFixedLengthChunkingOrBuilder(); - - com.google.cloud.vertexai.api.RagFileChunkingConfig.ChunkingConfigCase getChunkingConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileOrBuilder.java deleted file mode 100644 index 9915cf9d02cb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileOrBuilder.java +++ /dev/null @@ -1,484 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagFileOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFile) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The gcsSource. - */ - com.google.cloud.vertexai.api.GcsSource getGcsSource(); - - /** - * - * - *
-   * Output only. Google Cloud Storage location of the RagFile.
-   * It does not support wildcards in the Cloud Storage uri for now.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the googleDriveSource field is set. - */ - boolean hasGoogleDriveSource(); - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The googleDriveSource. - */ - com.google.cloud.vertexai.api.GoogleDriveSource getGoogleDriveSource(); - - /** - * - * - *
-   * Output only. Google Drive location. Supports importing individual files
-   * as well as Google Drive folders.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.GoogleDriveSourceOrBuilder getGoogleDriveSourceOrBuilder(); - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the directUploadSource field is set. - */ - boolean hasDirectUploadSource(); - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The directUploadSource. - */ - com.google.cloud.vertexai.api.DirectUploadSource getDirectUploadSource(); - - /** - * - * - *
-   * Output only. The RagFile is encapsulated and uploaded in the
-   * UploadRagFile request.
-   * 
- * - * - * .google.cloud.vertexai.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.DirectUploadSourceOrBuilder getDirectUploadSourceOrBuilder(); - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return Whether the slackSource field is set. - */ - boolean hasSlackSource(); - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - * - * @return The slackSource. - */ - com.google.cloud.vertexai.api.SlackSource getSlackSource(); - - /** - * - * - *
-   * The RagFile is imported from a Slack channel.
-   * 
- * - * .google.cloud.vertexai.v1.SlackSource slack_source = 11; - */ - com.google.cloud.vertexai.api.SlackSourceOrBuilder getSlackSourceOrBuilder(); - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return Whether the jiraSource field is set. - */ - boolean hasJiraSource(); - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - * - * @return The jiraSource. - */ - com.google.cloud.vertexai.api.JiraSource getJiraSource(); - - /** - * - * - *
-   * The RagFile is imported from a Jira query.
-   * 
- * - * .google.cloud.vertexai.v1.JiraSource jira_source = 12; - */ - com.google.cloud.vertexai.api.JiraSourceOrBuilder getJiraSourceOrBuilder(); - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return Whether the sharePointSources field is set. - */ - boolean hasSharePointSources(); - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - * - * @return The sharePointSources. - */ - com.google.cloud.vertexai.api.SharePointSources getSharePointSources(); - - /** - * - * - *
-   * The RagFile is imported from a SharePoint source.
-   * 
- * - * .google.cloud.vertexai.v1.SharePointSources share_point_sources = 14; - */ - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder getSharePointSourcesOrBuilder(); - - /** - * - * - *
-   * Output only. The resource name of the RagFile.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - - /** - * - * - *
-   * Output only. The resource name of the RagFile.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The display name of the RagFile.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - - /** - * - * - *
-   * Required. The display name of the RagFile.
-   * The name can be up to 128 characters long and can consist of any UTF-8
-   * characters.
-   * 
- * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Optional. The description of the RagFile.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - - /** - * - * - *
-   * Optional. The description of the RagFile.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - - /** - * - * - *
-   * Output only. Timestamp when this RagFile was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the fileStatus field is set. - */ - boolean hasFileStatus(); - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The fileStatus. - */ - com.google.cloud.vertexai.api.FileStatus getFileStatus(); - - /** - * - * - *
-   * Output only. State of the RagFile.
-   * 
- * - * - * .google.cloud.vertexai.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.FileStatusOrBuilder getFileStatusOrBuilder(); - - com.google.cloud.vertexai.api.RagFile.RagFileSourceCase getRagFileSourceCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfig.java deleted file mode 100644 index a11b648d55f2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfig.java +++ /dev/null @@ -1,2901 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specifies the parsing config for RagFiles.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig} - */ -@com.google.protobuf.Generated -public final class RagFileParsingConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileParsingConfig) - RagFileParsingConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagFileParsingConfig"); - } - - // Use RagFileParsingConfig.newBuilder() to construct. - private RagFileParsingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagFileParsingConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder.class); - } - - public interface LayoutParserOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The full resource name of a Document AI processor or processor version.
-     * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-     * `additional_config.parse_as_scanned_pdf` field must be false.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-     * 
- * - * string processor_name = 1; - * - * @return The processorName. - */ - java.lang.String getProcessorName(); - - /** - * - * - *
-     * The full resource name of a Document AI processor or processor version.
-     * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-     * `additional_config.parse_as_scanned_pdf` field must be false.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-     * 
- * - * string processor_name = 1; - * - * @return The bytes for processorName. - */ - com.google.protobuf.ByteString getProcessorNameBytes(); - - /** - * - * - *
-     * The maximum number of requests the job is allowed to make to the Document
-     * AI processor per minute. Consult
-     * https://cloud.google.com/document-ai/quotas and the Quota page for your
-     * project to set an appropriate value here. If unspecified, a default value
-     * of 120 QPM would be used.
-     * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - int getMaxParsingRequestsPerMin(); - } - - /** - * - * - *
-   * Document AI Layout Parser config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser} - */ - public static final class LayoutParser extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser) - LayoutParserOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LayoutParser"); - } - - // Use LayoutParser.newBuilder() to construct. - private LayoutParser(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private LayoutParser() { - processorName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder.class); - } - - public static final int PROCESSOR_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object processorName_ = ""; - - /** - * - * - *
-     * The full resource name of a Document AI processor or processor version.
-     * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-     * `additional_config.parse_as_scanned_pdf` field must be false.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-     * 
- * - * string processor_name = 1; - * - * @return The processorName. - */ - @java.lang.Override - public java.lang.String getProcessorName() { - java.lang.Object ref = processorName_; - 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(); - processorName_ = s; - return s; - } - } - - /** - * - * - *
-     * The full resource name of a Document AI processor or processor version.
-     * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-     * `additional_config.parse_as_scanned_pdf` field must be false.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-     * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-     * 
- * - * string processor_name = 1; - * - * @return The bytes for processorName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProcessorNameBytes() { - java.lang.Object ref = processorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - processorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAX_PARSING_REQUESTS_PER_MIN_FIELD_NUMBER = 2; - private int maxParsingRequestsPerMin_ = 0; - - /** - * - * - *
-     * The maximum number of requests the job is allowed to make to the Document
-     * AI processor per minute. Consult
-     * https://cloud.google.com/document-ai/quotas and the Quota page for your
-     * project to set an appropriate value here. If unspecified, a default value
-     * of 120 QPM would be used.
-     * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - @java.lang.Override - public int getMaxParsingRequestsPerMin() { - return maxParsingRequestsPerMin_; - } - - 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.GeneratedMessage.isStringEmpty(processorName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, processorName_); - } - if (maxParsingRequestsPerMin_ != 0) { - output.writeInt32(2, maxParsingRequestsPerMin_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(processorName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, processorName_); - } - if (maxParsingRequestsPerMin_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxParsingRequestsPerMin_); - } - 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.vertexai.api.RagFileParsingConfig.LayoutParser)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser other = - (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) obj; - - if (!getProcessorName().equals(other.getProcessorName())) return false; - if (getMaxParsingRequestsPerMin() != other.getMaxParsingRequestsPerMin()) 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) + PROCESSOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getProcessorName().hashCode(); - hash = (37 * hash) + MAX_PARSING_REQUESTS_PER_MIN_FIELD_NUMBER; - hash = (53 * hash) + getMaxParsingRequestsPerMin(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser 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.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser 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.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileParsingConfig.LayoutParser 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Document AI Layout Parser config.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser) - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - processorName_ = ""; - maxParsingRequestsPerMin_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser build() { - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser buildPartial() { - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser result = - new com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.processorName_ = processorName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxParsingRequestsPerMin_ = maxParsingRequestsPerMin_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) { - return mergeFrom((com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser other) { - if (other - == com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance()) - return this; - if (!other.getProcessorName().isEmpty()) { - processorName_ = other.processorName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getMaxParsingRequestsPerMin() != 0) { - setMaxParsingRequestsPerMin(other.getMaxParsingRequestsPerMin()); - } - 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: - { - processorName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - maxParsingRequestsPerMin_ = 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 processorName_ = ""; - - /** - * - * - *
-       * The full resource name of a Document AI processor or processor version.
-       * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-       * `additional_config.parse_as_scanned_pdf` field must be false.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-       * 
- * - * string processor_name = 1; - * - * @return The processorName. - */ - public java.lang.String getProcessorName() { - java.lang.Object ref = processorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - processorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The full resource name of a Document AI processor or processor version.
-       * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-       * `additional_config.parse_as_scanned_pdf` field must be false.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-       * 
- * - * string processor_name = 1; - * - * @return The bytes for processorName. - */ - public com.google.protobuf.ByteString getProcessorNameBytes() { - java.lang.Object ref = processorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - processorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The full resource name of a Document AI processor or processor version.
-       * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-       * `additional_config.parse_as_scanned_pdf` field must be false.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-       * 
- * - * string processor_name = 1; - * - * @param value The processorName to set. - * @return This builder for chaining. - */ - public Builder setProcessorName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - processorName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The full resource name of a Document AI processor or processor version.
-       * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-       * `additional_config.parse_as_scanned_pdf` field must be false.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-       * 
- * - * string processor_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearProcessorName() { - processorName_ = getDefaultInstance().getProcessorName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * The full resource name of a Document AI processor or processor version.
-       * The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
-       * `additional_config.parse_as_scanned_pdf` field must be false.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}`
-       * * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
-       * 
- * - * string processor_name = 1; - * - * @param value The bytes for processorName to set. - * @return This builder for chaining. - */ - public Builder setProcessorNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - processorName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int maxParsingRequestsPerMin_; - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the Document
-       * AI processor per minute. Consult
-       * https://cloud.google.com/document-ai/quotas and the Quota page for your
-       * project to set an appropriate value here. If unspecified, a default value
-       * of 120 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - @java.lang.Override - public int getMaxParsingRequestsPerMin() { - return maxParsingRequestsPerMin_; - } - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the Document
-       * AI processor per minute. Consult
-       * https://cloud.google.com/document-ai/quotas and the Quota page for your
-       * project to set an appropriate value here. If unspecified, a default value
-       * of 120 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @param value The maxParsingRequestsPerMin to set. - * @return This builder for chaining. - */ - public Builder setMaxParsingRequestsPerMin(int value) { - - maxParsingRequestsPerMin_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the Document
-       * AI processor per minute. Consult
-       * https://cloud.google.com/document-ai/quotas and the Quota page for your
-       * project to set an appropriate value here. If unspecified, a default value
-       * of 120 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return This builder for chaining. - */ - public Builder clearMaxParsingRequestsPerMin() { - bitField0_ = (bitField0_ & ~0x00000002); - maxParsingRequestsPerMin_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser) - private static final com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser(); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LayoutParser 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.vertexai.api.RagFileParsingConfig.LayoutParser - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface LlmParserOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The name of a LLM model used for parsing.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-     * 
- * - * string model_name = 1; - * - * @return The modelName. - */ - java.lang.String getModelName(); - - /** - * - * - *
-     * The name of a LLM model used for parsing.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-     * 
- * - * string model_name = 1; - * - * @return The bytes for modelName. - */ - com.google.protobuf.ByteString getModelNameBytes(); - - /** - * - * - *
-     * The maximum number of requests the job is allowed to make to the
-     * LLM model per minute. Consult
-     * https://cloud.google.com/vertex-ai/generative-ai/docs/quotas
-     * and your document size to set an appropriate value here. If unspecified,
-     * a default value of 5000 QPM would be used.
-     * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - int getMaxParsingRequestsPerMin(); - - /** - * - * - *
-     * The prompt to use for parsing. If not specified, a default prompt will
-     * be used.
-     * 
- * - * string custom_parsing_prompt = 3; - * - * @return The customParsingPrompt. - */ - java.lang.String getCustomParsingPrompt(); - - /** - * - * - *
-     * The prompt to use for parsing. If not specified, a default prompt will
-     * be used.
-     * 
- * - * string custom_parsing_prompt = 3; - * - * @return The bytes for customParsingPrompt. - */ - com.google.protobuf.ByteString getCustomParsingPromptBytes(); - } - - /** - * - * - *
-   * Specifies the advanced parsing for RagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser} - */ - public static final class LlmParser extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser) - LlmParserOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LlmParser"); - } - - // Use LlmParser.newBuilder() to construct. - private LlmParser(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private LlmParser() { - modelName_ = ""; - customParsingPrompt_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder.class); - } - - public static final int MODEL_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelName_ = ""; - - /** - * - * - *
-     * The name of a LLM model used for parsing.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-     * 
- * - * string model_name = 1; - * - * @return The modelName. - */ - @java.lang.Override - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - 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(); - modelName_ = s; - return s; - } - } - - /** - * - * - *
-     * The name of a LLM model used for parsing.
-     * Format:
-     * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-     * 
- * - * string model_name = 1; - * - * @return The bytes for modelName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAX_PARSING_REQUESTS_PER_MIN_FIELD_NUMBER = 2; - private int maxParsingRequestsPerMin_ = 0; - - /** - * - * - *
-     * The maximum number of requests the job is allowed to make to the
-     * LLM model per minute. Consult
-     * https://cloud.google.com/vertex-ai/generative-ai/docs/quotas
-     * and your document size to set an appropriate value here. If unspecified,
-     * a default value of 5000 QPM would be used.
-     * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - @java.lang.Override - public int getMaxParsingRequestsPerMin() { - return maxParsingRequestsPerMin_; - } - - public static final int CUSTOM_PARSING_PROMPT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object customParsingPrompt_ = ""; - - /** - * - * - *
-     * The prompt to use for parsing. If not specified, a default prompt will
-     * be used.
-     * 
- * - * string custom_parsing_prompt = 3; - * - * @return The customParsingPrompt. - */ - @java.lang.Override - public java.lang.String getCustomParsingPrompt() { - java.lang.Object ref = customParsingPrompt_; - 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(); - customParsingPrompt_ = s; - return s; - } - } - - /** - * - * - *
-     * The prompt to use for parsing. If not specified, a default prompt will
-     * be used.
-     * 
- * - * string custom_parsing_prompt = 3; - * - * @return The bytes for customParsingPrompt. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCustomParsingPromptBytes() { - java.lang.Object ref = customParsingPrompt_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - customParsingPrompt_ = 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.GeneratedMessage.isStringEmpty(modelName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, modelName_); - } - if (maxParsingRequestsPerMin_ != 0) { - output.writeInt32(2, maxParsingRequestsPerMin_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customParsingPrompt_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, customParsingPrompt_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modelName_); - } - if (maxParsingRequestsPerMin_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxParsingRequestsPerMin_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customParsingPrompt_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, customParsingPrompt_); - } - 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.vertexai.api.RagFileParsingConfig.LlmParser)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser other = - (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) obj; - - if (!getModelName().equals(other.getModelName())) return false; - if (getMaxParsingRequestsPerMin() != other.getMaxParsingRequestsPerMin()) return false; - if (!getCustomParsingPrompt().equals(other.getCustomParsingPrompt())) 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) + MODEL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getModelName().hashCode(); - hash = (37 * hash) + MAX_PARSING_REQUESTS_PER_MIN_FIELD_NUMBER; - hash = (53 * hash) + getMaxParsingRequestsPerMin(); - hash = (37 * hash) + CUSTOM_PARSING_PROMPT_FIELD_NUMBER; - hash = (53 * hash) + getCustomParsingPrompt().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser 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.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser 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.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileParsingConfig.LlmParser 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Specifies the advanced parsing for RagFiles.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser) - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelName_ = ""; - maxParsingRequestsPerMin_ = 0; - customParsingPrompt_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser build() { - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser buildPartial() { - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser result = - new com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelName_ = modelName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxParsingRequestsPerMin_ = maxParsingRequestsPerMin_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.customParsingPrompt_ = customParsingPrompt_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) { - return mergeFrom((com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser other) { - if (other - == com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance()) - return this; - if (!other.getModelName().isEmpty()) { - modelName_ = other.modelName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getMaxParsingRequestsPerMin() != 0) { - setMaxParsingRequestsPerMin(other.getMaxParsingRequestsPerMin()); - } - if (!other.getCustomParsingPrompt().isEmpty()) { - customParsingPrompt_ = other.customParsingPrompt_; - 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: - { - modelName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - maxParsingRequestsPerMin_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - customParsingPrompt_ = 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 modelName_ = ""; - - /** - * - * - *
-       * The name of a LLM model used for parsing.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-       * 
- * - * string model_name = 1; - * - * @return The modelName. - */ - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The name of a LLM model used for parsing.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-       * 
- * - * string model_name = 1; - * - * @return The bytes for modelName. - */ - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The name of a LLM model used for parsing.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-       * 
- * - * string model_name = 1; - * - * @param value The modelName to set. - * @return This builder for chaining. - */ - public Builder setModelName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of a LLM model used for parsing.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-       * 
- * - * string model_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearModelName() { - modelName_ = getDefaultInstance().getModelName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of a LLM model used for parsing.
-       * Format:
-       * * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
-       * 
- * - * string model_name = 1; - * - * @param value The bytes for modelName to set. - * @return This builder for chaining. - */ - public Builder setModelNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int maxParsingRequestsPerMin_; - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the
-       * LLM model per minute. Consult
-       * https://cloud.google.com/vertex-ai/generative-ai/docs/quotas
-       * and your document size to set an appropriate value here. If unspecified,
-       * a default value of 5000 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return The maxParsingRequestsPerMin. - */ - @java.lang.Override - public int getMaxParsingRequestsPerMin() { - return maxParsingRequestsPerMin_; - } - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the
-       * LLM model per minute. Consult
-       * https://cloud.google.com/vertex-ai/generative-ai/docs/quotas
-       * and your document size to set an appropriate value here. If unspecified,
-       * a default value of 5000 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @param value The maxParsingRequestsPerMin to set. - * @return This builder for chaining. - */ - public Builder setMaxParsingRequestsPerMin(int value) { - - maxParsingRequestsPerMin_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The maximum number of requests the job is allowed to make to the
-       * LLM model per minute. Consult
-       * https://cloud.google.com/vertex-ai/generative-ai/docs/quotas
-       * and your document size to set an appropriate value here. If unspecified,
-       * a default value of 5000 QPM would be used.
-       * 
- * - * int32 max_parsing_requests_per_min = 2; - * - * @return This builder for chaining. - */ - public Builder clearMaxParsingRequestsPerMin() { - bitField0_ = (bitField0_ & ~0x00000002); - maxParsingRequestsPerMin_ = 0; - onChanged(); - return this; - } - - private java.lang.Object customParsingPrompt_ = ""; - - /** - * - * - *
-       * The prompt to use for parsing. If not specified, a default prompt will
-       * be used.
-       * 
- * - * string custom_parsing_prompt = 3; - * - * @return The customParsingPrompt. - */ - public java.lang.String getCustomParsingPrompt() { - java.lang.Object ref = customParsingPrompt_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customParsingPrompt_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The prompt to use for parsing. If not specified, a default prompt will
-       * be used.
-       * 
- * - * string custom_parsing_prompt = 3; - * - * @return The bytes for customParsingPrompt. - */ - public com.google.protobuf.ByteString getCustomParsingPromptBytes() { - java.lang.Object ref = customParsingPrompt_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - customParsingPrompt_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The prompt to use for parsing. If not specified, a default prompt will
-       * be used.
-       * 
- * - * string custom_parsing_prompt = 3; - * - * @param value The customParsingPrompt to set. - * @return This builder for chaining. - */ - public Builder setCustomParsingPrompt(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - customParsingPrompt_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * The prompt to use for parsing. If not specified, a default prompt will
-       * be used.
-       * 
- * - * string custom_parsing_prompt = 3; - * - * @return This builder for chaining. - */ - public Builder clearCustomParsingPrompt() { - customParsingPrompt_ = getDefaultInstance().getCustomParsingPrompt(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * The prompt to use for parsing. If not specified, a default prompt will
-       * be used.
-       * 
- * - * string custom_parsing_prompt = 3; - * - * @param value The bytes for customParsingPrompt to set. - * @return This builder for chaining. - */ - public Builder setCustomParsingPromptBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - customParsingPrompt_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser) - private static final com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser(); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LlmParser 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.vertexai.api.RagFileParsingConfig.LlmParser - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int parserCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object parser_; - - public enum ParserCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LAYOUT_PARSER(4), - LLM_PARSER(5), - PARSER_NOT_SET(0); - private final int value; - - private ParserCase(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 ParserCase valueOf(int value) { - return forNumber(value); - } - - public static ParserCase forNumber(int value) { - switch (value) { - case 4: - return LAYOUT_PARSER; - case 5: - return LLM_PARSER; - case 0: - return PARSER_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ParserCase getParserCase() { - return ParserCase.forNumber(parserCase_); - } - - public static final int LAYOUT_PARSER_FIELD_NUMBER = 4; - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return Whether the layoutParser field is set. - */ - @java.lang.Override - public boolean hasLayoutParser() { - return parserCase_ == 4; - } - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return The layoutParser. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser getLayoutParser() { - if (parserCase_ == 4) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder - getLayoutParserOrBuilder() { - if (parserCase_ == 4) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - - public static final int LLM_PARSER_FIELD_NUMBER = 5; - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return Whether the llmParser field is set. - */ - @java.lang.Override - public boolean hasLlmParser() { - return parserCase_ == 5; - } - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return The llmParser. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser getLlmParser() { - if (parserCase_ == 5) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder - getLlmParserOrBuilder() { - if (parserCase_ == 5) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.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 (parserCase_ == 4) { - output.writeMessage( - 4, (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_); - } - if (parserCase_ == 5) { - output.writeMessage( - 5, (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (parserCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_); - } - if (parserCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_); - } - 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.vertexai.api.RagFileParsingConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileParsingConfig other = - (com.google.cloud.vertexai.api.RagFileParsingConfig) obj; - - if (!getParserCase().equals(other.getParserCase())) return false; - switch (parserCase_) { - case 4: - if (!getLayoutParser().equals(other.getLayoutParser())) return false; - break; - case 5: - if (!getLlmParser().equals(other.getLlmParser())) 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 (parserCase_) { - case 4: - hash = (37 * hash) + LAYOUT_PARSER_FIELD_NUMBER; - hash = (53 * hash) + getLayoutParser().hashCode(); - break; - case 5: - hash = (37 * hash) + LLM_PARSER_FIELD_NUMBER; - hash = (53 * hash) + getLlmParser().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig 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.vertexai.api.RagFileParsingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig 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.vertexai.api.RagFileParsingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileParsingConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specifies the parsing config for RagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileParsingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileParsingConfig) - com.google.cloud.vertexai.api.RagFileParsingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileParsingConfig.class, - com.google.cloud.vertexai.api.RagFileParsingConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagFileParsingConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (layoutParserBuilder_ != null) { - layoutParserBuilder_.clear(); - } - if (llmParserBuilder_ != null) { - llmParserBuilder_.clear(); - } - parserCase_ = 0; - parser_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig build() { - com.google.cloud.vertexai.api.RagFileParsingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig buildPartial() { - com.google.cloud.vertexai.api.RagFileParsingConfig result = - new com.google.cloud.vertexai.api.RagFileParsingConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagFileParsingConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagFileParsingConfig result) { - result.parserCase_ = parserCase_; - result.parser_ = this.parser_; - if (parserCase_ == 4 && layoutParserBuilder_ != null) { - result.parser_ = layoutParserBuilder_.build(); - } - if (parserCase_ == 5 && llmParserBuilder_ != null) { - result.parser_ = llmParserBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFileParsingConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagFileParsingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagFileParsingConfig other) { - if (other == com.google.cloud.vertexai.api.RagFileParsingConfig.getDefaultInstance()) - return this; - switch (other.getParserCase()) { - case LAYOUT_PARSER: - { - mergeLayoutParser(other.getLayoutParser()); - break; - } - case LLM_PARSER: - { - mergeLlmParser(other.getLlmParser()); - break; - } - case PARSER_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 34: - { - input.readMessage( - internalGetLayoutParserFieldBuilder().getBuilder(), extensionRegistry); - parserCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetLlmParserFieldBuilder().getBuilder(), extensionRegistry); - parserCase_ = 5; - 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 parserCase_ = 0; - private java.lang.Object parser_; - - public ParserCase getParserCase() { - return ParserCase.forNumber(parserCase_); - } - - public Builder clearParser() { - parserCase_ = 0; - parser_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder> - layoutParserBuilder_; - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return Whether the layoutParser field is set. - */ - @java.lang.Override - public boolean hasLayoutParser() { - return parserCase_ == 4; - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return The layoutParser. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser getLayoutParser() { - if (layoutParserBuilder_ == null) { - if (parserCase_ == 4) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } else { - if (parserCase_ == 4) { - return layoutParserBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - public Builder setLayoutParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser value) { - if (layoutParserBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parser_ = value; - onChanged(); - } else { - layoutParserBuilder_.setMessage(value); - } - parserCase_ = 4; - return this; - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - public Builder setLayoutParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder builderForValue) { - if (layoutParserBuilder_ == null) { - parser_ = builderForValue.build(); - onChanged(); - } else { - layoutParserBuilder_.setMessage(builderForValue.build()); - } - parserCase_ = 4; - return this; - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - public Builder mergeLayoutParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser value) { - if (layoutParserBuilder_ == null) { - if (parserCase_ == 4 - && parser_ - != com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser - .getDefaultInstance()) { - parser_ = - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.newBuilder( - (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_) - .mergeFrom(value) - .buildPartial(); - } else { - parser_ = value; - } - onChanged(); - } else { - if (parserCase_ == 4) { - layoutParserBuilder_.mergeFrom(value); - } else { - layoutParserBuilder_.setMessage(value); - } - } - parserCase_ = 4; - return this; - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - public Builder clearLayoutParser() { - if (layoutParserBuilder_ == null) { - if (parserCase_ == 4) { - parserCase_ = 0; - parser_ = null; - onChanged(); - } - } else { - if (parserCase_ == 4) { - parserCase_ = 0; - parser_ = null; - } - layoutParserBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder - getLayoutParserBuilder() { - return internalGetLayoutParserFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder - getLayoutParserOrBuilder() { - if ((parserCase_ == 4) && (layoutParserBuilder_ != null)) { - return layoutParserBuilder_.getMessageOrBuilder(); - } else { - if (parserCase_ == 4) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The Layout Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder> - internalGetLayoutParserFieldBuilder() { - if (layoutParserBuilder_ == null) { - if (!(parserCase_ == 4)) { - parser_ = - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.getDefaultInstance(); - } - layoutParserBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder>( - (com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser) parser_, - getParentForChildren(), - isClean()); - parser_ = null; - } - parserCase_ = 4; - onChanged(); - return layoutParserBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder> - llmParserBuilder_; - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return Whether the llmParser field is set. - */ - @java.lang.Override - public boolean hasLlmParser() { - return parserCase_ == 5; - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return The llmParser. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser getLlmParser() { - if (llmParserBuilder_ == null) { - if (parserCase_ == 5) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } else { - if (parserCase_ == 5) { - return llmParserBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - public Builder setLlmParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser value) { - if (llmParserBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parser_ = value; - onChanged(); - } else { - llmParserBuilder_.setMessage(value); - } - parserCase_ = 5; - return this; - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - public Builder setLlmParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder builderForValue) { - if (llmParserBuilder_ == null) { - parser_ = builderForValue.build(); - onChanged(); - } else { - llmParserBuilder_.setMessage(builderForValue.build()); - } - parserCase_ = 5; - return this; - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - public Builder mergeLlmParser( - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser value) { - if (llmParserBuilder_ == null) { - if (parserCase_ == 5 - && parser_ - != com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser - .getDefaultInstance()) { - parser_ = - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.newBuilder( - (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_) - .mergeFrom(value) - .buildPartial(); - } else { - parser_ = value; - } - onChanged(); - } else { - if (parserCase_ == 5) { - llmParserBuilder_.mergeFrom(value); - } else { - llmParserBuilder_.setMessage(value); - } - } - parserCase_ = 5; - return this; - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - public Builder clearLlmParser() { - if (llmParserBuilder_ == null) { - if (parserCase_ == 5) { - parserCase_ = 0; - parser_ = null; - onChanged(); - } - } else { - if (parserCase_ == 5) { - parserCase_ = 0; - parser_ = null; - } - llmParserBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder - getLlmParserBuilder() { - return internalGetLlmParserFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder - getLlmParserOrBuilder() { - if ((parserCase_ == 5) && (llmParserBuilder_ != null)) { - return llmParserBuilder_.getMessageOrBuilder(); - } else { - if (parserCase_ == 5) { - return (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_; - } - return com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The LLM Parser to use for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder> - internalGetLlmParserFieldBuilder() { - if (llmParserBuilder_ == null) { - if (!(parserCase_ == 5)) { - parser_ = - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.getDefaultInstance(); - } - llmParserBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser.Builder, - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder>( - (com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser) parser_, - getParentForChildren(), - isClean()); - parser_ = null; - } - parserCase_ = 5; - onChanged(); - return llmParserBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileParsingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileParsingConfig) - private static final com.google.cloud.vertexai.api.RagFileParsingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFileParsingConfig(); - } - - public static com.google.cloud.vertexai.api.RagFileParsingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagFileParsingConfig 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.vertexai.api.RagFileParsingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfigOrBuilder.java deleted file mode 100644 index b1c5aed85527..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileParsingConfigOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagFileParsingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileParsingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return Whether the layoutParser field is set. - */ - boolean hasLayoutParser(); - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - * - * @return The layoutParser. - */ - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParser getLayoutParser(); - - /** - * - * - *
-   * The Layout Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LayoutParser layout_parser = 4; - */ - com.google.cloud.vertexai.api.RagFileParsingConfig.LayoutParserOrBuilder - getLayoutParserOrBuilder(); - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return Whether the llmParser field is set. - */ - boolean hasLlmParser(); - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - * - * @return The llmParser. - */ - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParser getLlmParser(); - - /** - * - * - *
-   * The LLM Parser to use for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileParsingConfig.LlmParser llm_parser = 5; - */ - com.google.cloud.vertexai.api.RagFileParsingConfig.LlmParserOrBuilder getLlmParserOrBuilder(); - - com.google.cloud.vertexai.api.RagFileParsingConfig.ParserCase getParserCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfig.java deleted file mode 100644 index 4f9bb2a9f4f8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfig.java +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specifies the transformation config for RagFiles.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileTransformationConfig} - */ -@com.google.protobuf.Generated -public final class RagFileTransformationConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagFileTransformationConfig) - RagFileTransformationConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagFileTransformationConfig"); - } - - // Use RagFileTransformationConfig.newBuilder() to construct. - private RagFileTransformationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagFileTransformationConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileTransformationConfig.class, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder.class); - } - - private int bitField0_; - public static final int RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.RagFileChunkingConfig ragFileChunkingConfig_; - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return Whether the ragFileChunkingConfig field is set. - */ - @java.lang.Override - public boolean hasRagFileChunkingConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return The ragFileChunkingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfig getRagFileChunkingConfig() { - return ragFileChunkingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance() - : ragFileChunkingConfig_; - } - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder - getRagFileChunkingConfigOrBuilder() { - return ragFileChunkingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance() - : ragFileChunkingConfig_; - } - - 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.writeMessage(1, getRagFileChunkingConfig()); - } - 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.computeMessageSize(1, getRagFileChunkingConfig()); - } - 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.vertexai.api.RagFileTransformationConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagFileTransformationConfig other = - (com.google.cloud.vertexai.api.RagFileTransformationConfig) obj; - - if (hasRagFileChunkingConfig() != other.hasRagFileChunkingConfig()) return false; - if (hasRagFileChunkingConfig()) { - if (!getRagFileChunkingConfig().equals(other.getRagFileChunkingConfig())) 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 (hasRagFileChunkingConfig()) { - hash = (37 * hash) + RAG_FILE_CHUNKING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagFileChunkingConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig 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.vertexai.api.RagFileTransformationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig 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.vertexai.api.RagFileTransformationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagFileTransformationConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagFileTransformationConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagFileTransformationConfig) - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagFileTransformationConfig.class, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagFileTransformationConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagFileChunkingConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ragFileChunkingConfig_ = null; - if (ragFileChunkingConfigBuilder_ != null) { - ragFileChunkingConfigBuilder_.dispose(); - ragFileChunkingConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfig build() { - com.google.cloud.vertexai.api.RagFileTransformationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfig buildPartial() { - com.google.cloud.vertexai.api.RagFileTransformationConfig result = - new com.google.cloud.vertexai.api.RagFileTransformationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagFileTransformationConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ragFileChunkingConfig_ = - ragFileChunkingConfigBuilder_ == null - ? ragFileChunkingConfig_ - : ragFileChunkingConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagFileTransformationConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagFileTransformationConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagFileTransformationConfig other) { - if (other == com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance()) - return this; - if (other.hasRagFileChunkingConfig()) { - mergeRagFileChunkingConfig(other.getRagFileChunkingConfig()); - } - 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( - internalGetRagFileChunkingConfigFieldBuilder().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.vertexai.api.RagFileChunkingConfig ragFileChunkingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig, - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder> - ragFileChunkingConfigBuilder_; - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return Whether the ragFileChunkingConfig field is set. - */ - public boolean hasRagFileChunkingConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return The ragFileChunkingConfig. - */ - public com.google.cloud.vertexai.api.RagFileChunkingConfig getRagFileChunkingConfig() { - if (ragFileChunkingConfigBuilder_ == null) { - return ragFileChunkingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance() - : ragFileChunkingConfig_; - } else { - return ragFileChunkingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public Builder setRagFileChunkingConfig( - com.google.cloud.vertexai.api.RagFileChunkingConfig value) { - if (ragFileChunkingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileChunkingConfig_ = value; - } else { - ragFileChunkingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public Builder setRagFileChunkingConfig( - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder builderForValue) { - if (ragFileChunkingConfigBuilder_ == null) { - ragFileChunkingConfig_ = builderForValue.build(); - } else { - ragFileChunkingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public Builder mergeRagFileChunkingConfig( - com.google.cloud.vertexai.api.RagFileChunkingConfig value) { - if (ragFileChunkingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && ragFileChunkingConfig_ != null - && ragFileChunkingConfig_ - != com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance()) { - getRagFileChunkingConfigBuilder().mergeFrom(value); - } else { - ragFileChunkingConfig_ = value; - } - } else { - ragFileChunkingConfigBuilder_.mergeFrom(value); - } - if (ragFileChunkingConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public Builder clearRagFileChunkingConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - ragFileChunkingConfig_ = null; - if (ragFileChunkingConfigBuilder_ != null) { - ragFileChunkingConfigBuilder_.dispose(); - ragFileChunkingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder - getRagFileChunkingConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetRagFileChunkingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - public com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder - getRagFileChunkingConfigOrBuilder() { - if (ragFileChunkingConfigBuilder_ != null) { - return ragFileChunkingConfigBuilder_.getMessageOrBuilder(); - } else { - return ragFileChunkingConfig_ == null - ? com.google.cloud.vertexai.api.RagFileChunkingConfig.getDefaultInstance() - : ragFileChunkingConfig_; - } - } - - /** - * - * - *
-     * Specifies the chunking config for RagFiles.
-     * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig, - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder> - internalGetRagFileChunkingConfigFieldBuilder() { - if (ragFileChunkingConfigBuilder_ == null) { - ragFileChunkingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileChunkingConfig, - com.google.cloud.vertexai.api.RagFileChunkingConfig.Builder, - com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder>( - getRagFileChunkingConfig(), getParentForChildren(), isClean()); - ragFileChunkingConfig_ = null; - } - return ragFileChunkingConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagFileTransformationConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagFileTransformationConfig) - private static final com.google.cloud.vertexai.api.RagFileTransformationConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagFileTransformationConfig(); - } - - public static com.google.cloud.vertexai.api.RagFileTransformationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagFileTransformationConfig 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.vertexai.api.RagFileTransformationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfigOrBuilder.java deleted file mode 100644 index d1c1be1e3c17..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagFileTransformationConfigOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagFileTransformationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagFileTransformationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return Whether the ragFileChunkingConfig field is set. - */ - boolean hasRagFileChunkingConfig(); - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - * - * @return The ragFileChunkingConfig. - */ - com.google.cloud.vertexai.api.RagFileChunkingConfig getRagFileChunkingConfig(); - - /** - * - * - *
-   * Specifies the chunking config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileChunkingConfig rag_file_chunking_config = 1; - */ - com.google.cloud.vertexai.api.RagFileChunkingConfigOrBuilder getRagFileChunkingConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfig.java deleted file mode 100644 index 4b8b8eb50dac..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfig.java +++ /dev/null @@ -1,2597 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration message for RagManagedDb used by RagEngine.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig} - */ -@com.google.protobuf.Generated -public final class RagManagedDbConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagManagedDbConfig) - RagManagedDbConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagManagedDbConfig"); - } - - // Use RagManagedDbConfig.newBuilder() to construct. - private RagManagedDbConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagManagedDbConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder.class); - } - - public interface ScaledOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagManagedDbConfig.Scaled) - com.google.protobuf.MessageOrBuilder {} - - /** - * - * - *
-   * Scaled tier offers production grade performance along with
-   * autoscaling functionality. It is suitable for customers with large
-   * amounts of data or performance sensitive workloads.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Scaled} - */ - public static final class Scaled extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Scaled) - ScaledOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Scaled"); - } - - // Use Scaled.newBuilder() to construct. - private Scaled(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Scaled() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder.class); - } - - 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.cloud.vertexai.api.RagManagedDbConfig.Scaled)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled other = - (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) 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.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled 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.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled 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.vertexai.api.RagManagedDbConfig.Scaled parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagManagedDbConfig.Scaled 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Scaled tier offers production grade performance along with
-     * autoscaling functionality. It is suitable for customers with large
-     * amounts of data or performance sensitive workloads.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Scaled} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Scaled) - com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled build() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled buildPartial() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled result = - new com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) { - return mergeFrom((com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled other) { - if (other == com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Scaled) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Scaled) - private static final com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled(); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Scaled 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.vertexai.api.RagManagedDbConfig.Scaled getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface BasicOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagManagedDbConfig.Basic) - com.google.protobuf.MessageOrBuilder {} - - /** - * - * - *
-   * Basic tier is a cost-effective and low compute tier suitable for
-   * the following cases:
-   * * Experimenting with RagManagedDb.
-   * * Small data size.
-   * * Latency insensitive workload.
-   * * Only using RAG Engine with external vector DBs.
-   *
-   * NOTE: This is the default tier if not explicitly chosen.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Basic} - */ - public static final class Basic extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Basic) - BasicOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Basic"); - } - - // Use Basic.newBuilder() to construct. - private Basic(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Basic() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder.class); - } - - 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.cloud.vertexai.api.RagManagedDbConfig.Basic)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic other = - (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) 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.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic 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.vertexai.api.RagManagedDbConfig.Basic parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic 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.vertexai.api.RagManagedDbConfig.Basic parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagManagedDbConfig.Basic 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Basic tier is a cost-effective and low compute tier suitable for
-     * the following cases:
-     * * Experimenting with RagManagedDb.
-     * * Small data size.
-     * * Latency insensitive workload.
-     * * Only using RAG Engine with external vector DBs.
-     *
-     * NOTE: This is the default tier if not explicitly chosen.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Basic} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Basic) - com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic build() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic buildPartial() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic result = - new com.google.cloud.vertexai.api.RagManagedDbConfig.Basic(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) { - return mergeFrom((com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagManagedDbConfig.Basic other) { - if (other == com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Basic) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Basic) - private static final com.google.cloud.vertexai.api.RagManagedDbConfig.Basic DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagManagedDbConfig.Basic(); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Basic getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Basic 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.vertexai.api.RagManagedDbConfig.Basic getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UnprovisionedOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned) - com.google.protobuf.MessageOrBuilder {} - - /** - * - * - *
-   * Disables the RAG Engine service and deletes all your data held
-   * within this service. This will halt the billing of the service.
-   *
-   * NOTE: Once deleted the data cannot be recovered. To start using
-   * RAG Engine again, you will need to update the tier by calling the
-   * UpdateRagEngineConfig API.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned} - */ - public static final class Unprovisioned extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned) - UnprovisionedOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Unprovisioned"); - } - - // Use Unprovisioned.newBuilder() to construct. - private Unprovisioned(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Unprovisioned() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder.class); - } - - 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.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned other = - (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) 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.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned 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.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned 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.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagManagedDbConfig.Unprovisioned 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Disables the RAG Engine service and deletes all your data held
-     * within this service. This will halt the billing of the service.
-     *
-     * NOTE: Once deleted the data cannot be recovered. To start using
-     * RAG Engine again, you will need to update the tier by calling the
-     * UpdateRagEngineConfig API.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned) - com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned build() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned buildPartial() { - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned result = - new com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) { - return mergeFrom((com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned other) { - if (other - == com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned) - private static final com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned(); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Unprovisioned 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.vertexai.api.RagManagedDbConfig.Unprovisioned - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int tierCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object tier_; - - public enum TierCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SCALED(4), - BASIC(2), - UNPROVISIONED(3), - TIER_NOT_SET(0); - private final int value; - - private TierCase(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 TierCase valueOf(int value) { - return forNumber(value); - } - - public static TierCase forNumber(int value) { - switch (value) { - case 4: - return SCALED; - case 2: - return BASIC; - case 3: - return UNPROVISIONED; - case 0: - return TIER_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public TierCase getTierCase() { - return TierCase.forNumber(tierCase_); - } - - public static final int SCALED_FIELD_NUMBER = 4; - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return Whether the scaled field is set. - */ - @java.lang.Override - public boolean hasScaled() { - return tierCase_ == 4; - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return The scaled. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled getScaled() { - if (tierCase_ == 4) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder getScaledOrBuilder() { - if (tierCase_ == 4) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - - public static final int BASIC_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return Whether the basic field is set. - */ - @java.lang.Override - public boolean hasBasic() { - return tierCase_ == 2; - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return The basic. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic getBasic() { - if (tierCase_ == 2) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder getBasicOrBuilder() { - if (tierCase_ == 2) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - - public static final int UNPROVISIONED_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return Whether the unprovisioned field is set. - */ - @java.lang.Override - public boolean hasUnprovisioned() { - return tierCase_ == 3; - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return The unprovisioned. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned getUnprovisioned() { - if (tierCase_ == 3) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder - getUnprovisionedOrBuilder() { - if (tierCase_ == 3) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.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 (tierCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_); - } - if (tierCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_); - } - if (tierCase_ == 4) { - output.writeMessage(4, (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (tierCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_); - } - if (tierCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_); - } - if (tierCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_); - } - 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.vertexai.api.RagManagedDbConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagManagedDbConfig other = - (com.google.cloud.vertexai.api.RagManagedDbConfig) obj; - - if (!getTierCase().equals(other.getTierCase())) return false; - switch (tierCase_) { - case 4: - if (!getScaled().equals(other.getScaled())) return false; - break; - case 2: - if (!getBasic().equals(other.getBasic())) return false; - break; - case 3: - if (!getUnprovisioned().equals(other.getUnprovisioned())) 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 (tierCase_) { - case 4: - hash = (37 * hash) + SCALED_FIELD_NUMBER; - hash = (53 * hash) + getScaled().hashCode(); - break; - case 2: - hash = (37 * hash) + BASIC_FIELD_NUMBER; - hash = (53 * hash) + getBasic().hashCode(); - break; - case 3: - hash = (37 * hash) + UNPROVISIONED_FIELD_NUMBER; - hash = (53 * hash) + getUnprovisioned().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig 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.vertexai.api.RagManagedDbConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig 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.vertexai.api.RagManagedDbConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagManagedDbConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration message for RagManagedDb used by RagEngine.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagManagedDbConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagManagedDbConfig) - com.google.cloud.vertexai.api.RagManagedDbConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagManagedDbConfig.class, - com.google.cloud.vertexai.api.RagManagedDbConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagManagedDbConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (scaledBuilder_ != null) { - scaledBuilder_.clear(); - } - if (basicBuilder_ != null) { - basicBuilder_.clear(); - } - if (unprovisionedBuilder_ != null) { - unprovisionedBuilder_.clear(); - } - tierCase_ = 0; - tier_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig build() { - com.google.cloud.vertexai.api.RagManagedDbConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig buildPartial() { - com.google.cloud.vertexai.api.RagManagedDbConfig result = - new com.google.cloud.vertexai.api.RagManagedDbConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagManagedDbConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagManagedDbConfig result) { - result.tierCase_ = tierCase_; - result.tier_ = this.tier_; - if (tierCase_ == 4 && scaledBuilder_ != null) { - result.tier_ = scaledBuilder_.build(); - } - if (tierCase_ == 2 && basicBuilder_ != null) { - result.tier_ = basicBuilder_.build(); - } - if (tierCase_ == 3 && unprovisionedBuilder_ != null) { - result.tier_ = unprovisionedBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagManagedDbConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagManagedDbConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagManagedDbConfig other) { - if (other == com.google.cloud.vertexai.api.RagManagedDbConfig.getDefaultInstance()) - return this; - switch (other.getTierCase()) { - case SCALED: - { - mergeScaled(other.getScaled()); - break; - } - case BASIC: - { - mergeBasic(other.getBasic()); - break; - } - case UNPROVISIONED: - { - mergeUnprovisioned(other.getUnprovisioned()); - break; - } - case TIER_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 18: - { - input.readMessage(internalGetBasicFieldBuilder().getBuilder(), extensionRegistry); - tierCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetUnprovisionedFieldBuilder().getBuilder(), extensionRegistry); - tierCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(internalGetScaledFieldBuilder().getBuilder(), extensionRegistry); - tierCase_ = 4; - 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 tierCase_ = 0; - private java.lang.Object tier_; - - public TierCase getTierCase() { - return TierCase.forNumber(tierCase_); - } - - public Builder clearTier() { - tierCase_ = 0; - tier_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled, - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder> - scaledBuilder_; - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return Whether the scaled field is set. - */ - @java.lang.Override - public boolean hasScaled() { - return tierCase_ == 4; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return The scaled. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled getScaled() { - if (scaledBuilder_ == null) { - if (tierCase_ == 4) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } else { - if (tierCase_ == 4) { - return scaledBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - public Builder setScaled(com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled value) { - if (scaledBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tier_ = value; - onChanged(); - } else { - scaledBuilder_.setMessage(value); - } - tierCase_ = 4; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - public Builder setScaled( - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder builderForValue) { - if (scaledBuilder_ == null) { - tier_ = builderForValue.build(); - onChanged(); - } else { - scaledBuilder_.setMessage(builderForValue.build()); - } - tierCase_ = 4; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - public Builder mergeScaled(com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled value) { - if (scaledBuilder_ == null) { - if (tierCase_ == 4 - && tier_ - != com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance()) { - tier_ = - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.newBuilder( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_) - .mergeFrom(value) - .buildPartial(); - } else { - tier_ = value; - } - onChanged(); - } else { - if (tierCase_ == 4) { - scaledBuilder_.mergeFrom(value); - } else { - scaledBuilder_.setMessage(value); - } - } - tierCase_ = 4; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - public Builder clearScaled() { - if (scaledBuilder_ == null) { - if (tierCase_ == 4) { - tierCase_ = 0; - tier_ = null; - onChanged(); - } - } else { - if (tierCase_ == 4) { - tierCase_ = 0; - tier_ = null; - } - scaledBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - public com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder getScaledBuilder() { - return internalGetScaledFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder getScaledOrBuilder() { - if ((tierCase_ == 4) && (scaledBuilder_ != null)) { - return scaledBuilder_.getMessageOrBuilder(); - } else { - if (tierCase_ == 4) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Scaled tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled, - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder> - internalGetScaledFieldBuilder() { - if (scaledBuilder_ == null) { - if (!(tierCase_ == 4)) { - tier_ = com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.getDefaultInstance(); - } - scaledBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled, - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder>( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled) tier_, - getParentForChildren(), - isClean()); - tier_ = null; - } - tierCase_ = 4; - onChanged(); - return scaledBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic, - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder> - basicBuilder_; - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return Whether the basic field is set. - */ - @java.lang.Override - public boolean hasBasic() { - return tierCase_ == 2; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return The basic. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic getBasic() { - if (basicBuilder_ == null) { - if (tierCase_ == 2) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } else { - if (tierCase_ == 2) { - return basicBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - public Builder setBasic(com.google.cloud.vertexai.api.RagManagedDbConfig.Basic value) { - if (basicBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tier_ = value; - onChanged(); - } else { - basicBuilder_.setMessage(value); - } - tierCase_ = 2; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - public Builder setBasic( - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder builderForValue) { - if (basicBuilder_ == null) { - tier_ = builderForValue.build(); - onChanged(); - } else { - basicBuilder_.setMessage(builderForValue.build()); - } - tierCase_ = 2; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - public Builder mergeBasic(com.google.cloud.vertexai.api.RagManagedDbConfig.Basic value) { - if (basicBuilder_ == null) { - if (tierCase_ == 2 - && tier_ - != com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance()) { - tier_ = - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.newBuilder( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_) - .mergeFrom(value) - .buildPartial(); - } else { - tier_ = value; - } - onChanged(); - } else { - if (tierCase_ == 2) { - basicBuilder_.mergeFrom(value); - } else { - basicBuilder_.setMessage(value); - } - } - tierCase_ = 2; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - public Builder clearBasic() { - if (basicBuilder_ == null) { - if (tierCase_ == 2) { - tierCase_ = 0; - tier_ = null; - onChanged(); - } - } else { - if (tierCase_ == 2) { - tierCase_ = 0; - tier_ = null; - } - basicBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - public com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder getBasicBuilder() { - return internalGetBasicFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder getBasicOrBuilder() { - if ((tierCase_ == 2) && (basicBuilder_ != null)) { - return basicBuilder_.getMessageOrBuilder(); - } else { - if (tierCase_ == 2) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Basic tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic, - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder> - internalGetBasicFieldBuilder() { - if (basicBuilder_ == null) { - if (!(tierCase_ == 2)) { - tier_ = com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.getDefaultInstance(); - } - basicBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic, - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder>( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Basic) tier_, - getParentForChildren(), - isClean()); - tier_ = null; - } - tierCase_ = 2; - onChanged(); - return basicBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned, - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder> - unprovisionedBuilder_; - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return Whether the unprovisioned field is set. - */ - @java.lang.Override - public boolean hasUnprovisioned() { - return tierCase_ == 3; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return The unprovisioned. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned getUnprovisioned() { - if (unprovisionedBuilder_ == null) { - if (tierCase_ == 3) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } else { - if (tierCase_ == 3) { - return unprovisionedBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - public Builder setUnprovisioned( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned value) { - if (unprovisionedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tier_ = value; - onChanged(); - } else { - unprovisionedBuilder_.setMessage(value); - } - tierCase_ = 3; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - public Builder setUnprovisioned( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder builderForValue) { - if (unprovisionedBuilder_ == null) { - tier_ = builderForValue.build(); - onChanged(); - } else { - unprovisionedBuilder_.setMessage(builderForValue.build()); - } - tierCase_ = 3; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - public Builder mergeUnprovisioned( - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned value) { - if (unprovisionedBuilder_ == null) { - if (tierCase_ == 3 - && tier_ - != com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned - .getDefaultInstance()) { - tier_ = - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.newBuilder( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_) - .mergeFrom(value) - .buildPartial(); - } else { - tier_ = value; - } - onChanged(); - } else { - if (tierCase_ == 3) { - unprovisionedBuilder_.mergeFrom(value); - } else { - unprovisionedBuilder_.setMessage(value); - } - } - tierCase_ = 3; - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - public Builder clearUnprovisioned() { - if (unprovisionedBuilder_ == null) { - if (tierCase_ == 3) { - tierCase_ = 0; - tier_ = null; - onChanged(); - } - } else { - if (tierCase_ == 3) { - tierCase_ = 0; - tier_ = null; - } - unprovisionedBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - public com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder - getUnprovisionedBuilder() { - return internalGetUnprovisionedFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder - getUnprovisionedOrBuilder() { - if ((tierCase_ == 3) && (unprovisionedBuilder_ != null)) { - return unprovisionedBuilder_.getMessageOrBuilder(); - } else { - if (tierCase_ == 3) { - return (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_; - } - return com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Sets the RagManagedDb to the Unprovisioned tier.
-     * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned, - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder> - internalGetUnprovisionedFieldBuilder() { - if (unprovisionedBuilder_ == null) { - if (!(tierCase_ == 3)) { - tier_ = - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.getDefaultInstance(); - } - unprovisionedBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned, - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned.Builder, - com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder>( - (com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned) tier_, - getParentForChildren(), - isClean()); - tier_ = null; - } - tierCase_ = 3; - onChanged(); - return unprovisionedBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagManagedDbConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagManagedDbConfig) - private static final com.google.cloud.vertexai.api.RagManagedDbConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagManagedDbConfig(); - } - - public static com.google.cloud.vertexai.api.RagManagedDbConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagManagedDbConfig 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.vertexai.api.RagManagedDbConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfigOrBuilder.java deleted file mode 100644 index 783fcd547a33..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagManagedDbConfigOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagManagedDbConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagManagedDbConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return Whether the scaled field is set. - */ - boolean hasScaled(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - * - * @return The scaled. - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.Scaled getScaled(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Scaled tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Scaled scaled = 4; - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.ScaledOrBuilder getScaledOrBuilder(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return Whether the basic field is set. - */ - boolean hasBasic(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - * - * @return The basic. - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.Basic getBasic(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Basic tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Basic basic = 2; - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.BasicOrBuilder getBasicOrBuilder(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return Whether the unprovisioned field is set. - */ - boolean hasUnprovisioned(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - * - * @return The unprovisioned. - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.Unprovisioned getUnprovisioned(); - - /** - * - * - *
-   * Sets the RagManagedDb to the Unprovisioned tier.
-   * 
- * - * .google.cloud.vertexai.v1.RagManagedDbConfig.Unprovisioned unprovisioned = 3; - */ - com.google.cloud.vertexai.api.RagManagedDbConfig.UnprovisionedOrBuilder - getUnprovisionedOrBuilder(); - - com.google.cloud.vertexai.api.RagManagedDbConfig.TierCase getTierCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfig.java deleted file mode 100644 index 04a698e62fe0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfig.java +++ /dev/null @@ -1,4843 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Specifies the context retrieval config.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig} - */ -@com.google.protobuf.Generated -public final class RagRetrievalConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagRetrievalConfig) - RagRetrievalConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagRetrievalConfig"); - } - - // Use RagRetrievalConfig.newBuilder() to construct. - private RagRetrievalConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagRetrievalConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder.class); - } - - public interface FilterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagRetrievalConfig.Filter) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. Only returns contexts with vector distance smaller than the
-     * threshold.
-     * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the vectorDistanceThreshold field is set. - */ - boolean hasVectorDistanceThreshold(); - - /** - * - * - *
-     * Optional. Only returns contexts with vector distance smaller than the
-     * threshold.
-     * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The vectorDistanceThreshold. - */ - double getVectorDistanceThreshold(); - - /** - * - * - *
-     * Optional. Only returns contexts with vector similarity larger than the
-     * threshold.
-     * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the vectorSimilarityThreshold field is set. - */ - boolean hasVectorSimilarityThreshold(); - - /** - * - * - *
-     * Optional. Only returns contexts with vector similarity larger than the
-     * threshold.
-     * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The vectorSimilarityThreshold. - */ - double getVectorSimilarityThreshold(); - - /** - * - * - *
-     * Optional. String for metadata filtering.
-     * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metadataFilter. - */ - java.lang.String getMetadataFilter(); - - /** - * - * - *
-     * Optional. String for metadata filtering.
-     * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metadataFilter. - */ - com.google.protobuf.ByteString getMetadataFilterBytes(); - - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.VectorDbThresholdCase - getVectorDbThresholdCase(); - } - - /** - * - * - *
-   * Config for filters.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Filter} - */ - public static final class Filter extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Filter) - FilterOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Filter"); - } - - // Use Filter.newBuilder() to construct. - private Filter(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Filter() { - metadataFilter_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder.class); - } - - private int vectorDbThresholdCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object vectorDbThreshold_; - - public enum VectorDbThresholdCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VECTOR_DISTANCE_THRESHOLD(3), - VECTOR_SIMILARITY_THRESHOLD(4), - VECTORDBTHRESHOLD_NOT_SET(0); - private final int value; - - private VectorDbThresholdCase(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 VectorDbThresholdCase valueOf(int value) { - return forNumber(value); - } - - public static VectorDbThresholdCase forNumber(int value) { - switch (value) { - case 3: - return VECTOR_DISTANCE_THRESHOLD; - case 4: - return VECTOR_SIMILARITY_THRESHOLD; - case 0: - return VECTORDBTHRESHOLD_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VectorDbThresholdCase getVectorDbThresholdCase() { - return VectorDbThresholdCase.forNumber(vectorDbThresholdCase_); - } - - public static final int VECTOR_DISTANCE_THRESHOLD_FIELD_NUMBER = 3; - - /** - * - * - *
-     * Optional. Only returns contexts with vector distance smaller than the
-     * threshold.
-     * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the vectorDistanceThreshold field is set. - */ - @java.lang.Override - public boolean hasVectorDistanceThreshold() { - return vectorDbThresholdCase_ == 3; - } - - /** - * - * - *
-     * Optional. Only returns contexts with vector distance smaller than the
-     * threshold.
-     * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The vectorDistanceThreshold. - */ - @java.lang.Override - public double getVectorDistanceThreshold() { - if (vectorDbThresholdCase_ == 3) { - return (java.lang.Double) vectorDbThreshold_; - } - return 0D; - } - - public static final int VECTOR_SIMILARITY_THRESHOLD_FIELD_NUMBER = 4; - - /** - * - * - *
-     * Optional. Only returns contexts with vector similarity larger than the
-     * threshold.
-     * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the vectorSimilarityThreshold field is set. - */ - @java.lang.Override - public boolean hasVectorSimilarityThreshold() { - return vectorDbThresholdCase_ == 4; - } - - /** - * - * - *
-     * Optional. Only returns contexts with vector similarity larger than the
-     * threshold.
-     * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The vectorSimilarityThreshold. - */ - @java.lang.Override - public double getVectorSimilarityThreshold() { - if (vectorDbThresholdCase_ == 4) { - return (java.lang.Double) vectorDbThreshold_; - } - return 0D; - } - - public static final int METADATA_FILTER_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object metadataFilter_ = ""; - - /** - * - * - *
-     * Optional. String for metadata filtering.
-     * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metadataFilter. - */ - @java.lang.Override - public java.lang.String getMetadataFilter() { - java.lang.Object ref = metadataFilter_; - 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(); - metadataFilter_ = s; - return s; - } - } - - /** - * - * - *
-     * Optional. String for metadata filtering.
-     * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metadataFilter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetadataFilterBytes() { - java.lang.Object ref = metadataFilter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataFilter_ = 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.GeneratedMessage.isStringEmpty(metadataFilter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, metadataFilter_); - } - if (vectorDbThresholdCase_ == 3) { - output.writeDouble(3, (double) ((java.lang.Double) vectorDbThreshold_)); - } - if (vectorDbThresholdCase_ == 4) { - output.writeDouble(4, (double) ((java.lang.Double) vectorDbThreshold_)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataFilter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, metadataFilter_); - } - if (vectorDbThresholdCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 3, (double) ((java.lang.Double) vectorDbThreshold_)); - } - if (vectorDbThresholdCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 4, (double) ((java.lang.Double) vectorDbThreshold_)); - } - 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.vertexai.api.RagRetrievalConfig.Filter)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter other = - (com.google.cloud.vertexai.api.RagRetrievalConfig.Filter) obj; - - if (!getMetadataFilter().equals(other.getMetadataFilter())) return false; - if (!getVectorDbThresholdCase().equals(other.getVectorDbThresholdCase())) return false; - switch (vectorDbThresholdCase_) { - case 3: - if (java.lang.Double.doubleToLongBits(getVectorDistanceThreshold()) - != java.lang.Double.doubleToLongBits(other.getVectorDistanceThreshold())) - return false; - break; - case 4: - if (java.lang.Double.doubleToLongBits(getVectorSimilarityThreshold()) - != java.lang.Double.doubleToLongBits(other.getVectorSimilarityThreshold())) - 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) + METADATA_FILTER_FIELD_NUMBER; - hash = (53 * hash) + getMetadataFilter().hashCode(); - switch (vectorDbThresholdCase_) { - case 3: - hash = (37 * hash) + VECTOR_DISTANCE_THRESHOLD_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVectorDistanceThreshold())); - break; - case 4: - hash = (37 * hash) + VECTOR_SIMILARITY_THRESHOLD_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVectorSimilarityThreshold())); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter 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.vertexai.api.RagRetrievalConfig.Filter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter 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.vertexai.api.RagRetrievalConfig.Filter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagRetrievalConfig.Filter 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Config for filters.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Filter} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Filter) - com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metadataFilter_ = ""; - vectorDbThresholdCase_ = 0; - vectorDbThreshold_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter build() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter buildPartial() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter result = - new com.google.cloud.vertexai.api.RagRetrievalConfig.Filter(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagRetrievalConfig.Filter result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.metadataFilter_ = metadataFilter_; - } - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter result) { - result.vectorDbThresholdCase_ = vectorDbThresholdCase_; - result.vectorDbThreshold_ = this.vectorDbThreshold_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagRetrievalConfig.Filter) { - return mergeFrom((com.google.cloud.vertexai.api.RagRetrievalConfig.Filter) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagRetrievalConfig.Filter other) { - if (other == com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance()) - return this; - if (!other.getMetadataFilter().isEmpty()) { - metadataFilter_ = other.metadataFilter_; - bitField0_ |= 0x00000004; - onChanged(); - } - switch (other.getVectorDbThresholdCase()) { - case VECTOR_DISTANCE_THRESHOLD: - { - setVectorDistanceThreshold(other.getVectorDistanceThreshold()); - break; - } - case VECTOR_SIMILARITY_THRESHOLD: - { - setVectorSimilarityThreshold(other.getVectorSimilarityThreshold()); - break; - } - case VECTORDBTHRESHOLD_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 18: - { - metadataFilter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 18 - case 25: - { - vectorDbThreshold_ = input.readDouble(); - vectorDbThresholdCase_ = 3; - break; - } // case 25 - case 33: - { - vectorDbThreshold_ = input.readDouble(); - vectorDbThresholdCase_ = 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 vectorDbThresholdCase_ = 0; - private java.lang.Object vectorDbThreshold_; - - public VectorDbThresholdCase getVectorDbThresholdCase() { - return VectorDbThresholdCase.forNumber(vectorDbThresholdCase_); - } - - public Builder clearVectorDbThreshold() { - vectorDbThresholdCase_ = 0; - vectorDbThreshold_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-       * Optional. Only returns contexts with vector distance smaller than the
-       * threshold.
-       * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the vectorDistanceThreshold field is set. - */ - public boolean hasVectorDistanceThreshold() { - return vectorDbThresholdCase_ == 3; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector distance smaller than the
-       * threshold.
-       * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The vectorDistanceThreshold. - */ - public double getVectorDistanceThreshold() { - if (vectorDbThresholdCase_ == 3) { - return (java.lang.Double) vectorDbThreshold_; - } - return 0D; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector distance smaller than the
-       * threshold.
-       * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The vectorDistanceThreshold to set. - * @return This builder for chaining. - */ - public Builder setVectorDistanceThreshold(double value) { - - vectorDbThresholdCase_ = 3; - vectorDbThreshold_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector distance smaller than the
-       * threshold.
-       * 
- * - * double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearVectorDistanceThreshold() { - if (vectorDbThresholdCase_ == 3) { - vectorDbThresholdCase_ = 0; - vectorDbThreshold_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector similarity larger than the
-       * threshold.
-       * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the vectorSimilarityThreshold field is set. - */ - public boolean hasVectorSimilarityThreshold() { - return vectorDbThresholdCase_ == 4; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector similarity larger than the
-       * threshold.
-       * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The vectorSimilarityThreshold. - */ - public double getVectorSimilarityThreshold() { - if (vectorDbThresholdCase_ == 4) { - return (java.lang.Double) vectorDbThreshold_; - } - return 0D; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector similarity larger than the
-       * threshold.
-       * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The vectorSimilarityThreshold to set. - * @return This builder for chaining. - */ - public Builder setVectorSimilarityThreshold(double value) { - - vectorDbThresholdCase_ = 4; - vectorDbThreshold_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Only returns contexts with vector similarity larger than the
-       * threshold.
-       * 
- * - * double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearVectorSimilarityThreshold() { - if (vectorDbThresholdCase_ == 4) { - vectorDbThresholdCase_ = 0; - vectorDbThreshold_ = null; - onChanged(); - } - return this; - } - - private java.lang.Object metadataFilter_ = ""; - - /** - * - * - *
-       * Optional. String for metadata filtering.
-       * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metadataFilter. - */ - public java.lang.String getMetadataFilter() { - java.lang.Object ref = metadataFilter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metadataFilter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Optional. String for metadata filtering.
-       * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metadataFilter. - */ - public com.google.protobuf.ByteString getMetadataFilterBytes() { - java.lang.Object ref = metadataFilter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metadataFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Optional. String for metadata filtering.
-       * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The metadataFilter to set. - * @return This builder for chaining. - */ - public Builder setMetadataFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - metadataFilter_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. String for metadata filtering.
-       * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMetadataFilter() { - metadataFilter_ = getDefaultInstance().getMetadataFilter(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. String for metadata filtering.
-       * 
- * - * string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for metadataFilter to set. - * @return This builder for chaining. - */ - public Builder setMetadataFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - metadataFilter_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Filter) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Filter) - private static final com.google.cloud.vertexai.api.RagRetrievalConfig.Filter DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagRetrievalConfig.Filter(); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Filter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Filter 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.vertexai.api.RagRetrievalConfig.Filter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface RankingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the rankService field is set. - */ - boolean hasRankService(); - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The rankService. - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService getRankService(); - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder - getRankServiceOrBuilder(); - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the llmRanker field is set. - */ - boolean hasLlmRanker(); - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The llmRanker. - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker getLlmRanker(); - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder - getLlmRankerOrBuilder(); - - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankingConfigCase - getRankingConfigCase(); - } - - /** - * - * - *
-   * Config for ranking and reranking.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking} - */ - public static final class Ranking extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking) - RankingOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Ranking"); - } - - // Use Ranking.newBuilder() to construct. - private Ranking(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Ranking() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder.class); - } - - public interface RankServiceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - boolean hasModelName(); - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - java.lang.String getModelName(); - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - com.google.protobuf.ByteString getModelNameBytes(); - } - - /** - * - * - *
-     * Config for Rank Service.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService} - */ - public static final class RankService extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService) - RankServiceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RankService"); - } - - // Use RankService.newBuilder() to construct. - private RankService(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RankService() { - modelName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder.class); - } - - private int bitField0_; - public static final int MODEL_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelName_ = ""; - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - @java.lang.Override - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - @java.lang.Override - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - 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(); - modelName_ = s; - return s; - } - } - - /** - * - * - *
-       * Optional. The model name of the rank service.
-       * Format: `semantic-ranker-512@latest`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, modelName_); - } - 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.GeneratedMessage.computeStringSize(1, modelName_); - } - 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.vertexai.api.RagRetrievalConfig.Ranking.RankService)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService other = - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) obj; - - if (hasModelName() != other.hasModelName()) return false; - if (hasModelName()) { - if (!getModelName().equals(other.getModelName())) 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 (hasModelName()) { - hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getModelName().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService 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.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService 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.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagRetrievalConfig.Ranking.RankService 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Config for Rank Service.
-       * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService) - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService build() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService buildPartial() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService result = - new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelName_ = modelName_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService other) { - if (other - == com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance()) return this; - if (other.hasModelName()) { - modelName_ = other.modelName_; - 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: - { - modelName_ = 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 modelName_ = ""; - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The modelName to set. - * @return This builder for chaining. - */ - public Builder setModelName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearModelName() { - modelName_ = getDefaultInstance().getModelName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The model name of the rank service.
-         * Format: `semantic-ranker-512@latest`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for modelName to set. - * @return This builder for chaining. - */ - public Builder setModelNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService) - private static final com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService(); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RankService 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.vertexai.api.RagRetrievalConfig.Ranking.RankService - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface LlmRankerOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - boolean hasModelName(); - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - java.lang.String getModelName(); - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - com.google.protobuf.ByteString getModelNameBytes(); - } - - /** - * - * - *
-     * Config for LlmRanker.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker} - */ - public static final class LlmRanker extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker) - LlmRankerOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "LlmRanker"); - } - - // Use LlmRanker.newBuilder() to construct. - private LlmRanker(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private LlmRanker() { - modelName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder.class); - } - - private int bitField0_; - public static final int MODEL_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelName_ = ""; - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - @java.lang.Override - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - @java.lang.Override - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - 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(); - modelName_ = s; - return s; - } - } - - /** - * - * - *
-       * Optional. The model name used for ranking.
-       * Format: `gemini-1.5-pro`
-       * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = 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 (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, modelName_); - } - 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.GeneratedMessage.computeStringSize(1, modelName_); - } - 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.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker other = - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) obj; - - if (hasModelName() != other.hasModelName()) return false; - if (hasModelName()) { - if (!getModelName().equals(other.getModelName())) 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 (hasModelName()) { - hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getModelName().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker 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.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker 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.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Config for LlmRanker.
-       * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker) - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker build() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker buildPartial() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker result = - new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelName_ = modelName_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker other) { - if (other - == com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance()) return this; - if (other.hasModelName()) { - modelName_ = other.modelName_; - 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: - { - modelName_ = 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 modelName_ = ""; - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the modelName field is set. - */ - public boolean hasModelName() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The modelName. - */ - public java.lang.String getModelName() { - java.lang.Object ref = modelName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for modelName. - */ - public com.google.protobuf.ByteString getModelNameBytes() { - java.lang.Object ref = modelName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The modelName to set. - * @return This builder for chaining. - */ - public Builder setModelName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearModelName() { - modelName_ = getDefaultInstance().getModelName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The model name used for ranking.
-         * Format: `gemini-1.5-pro`
-         * 
- * - * optional string model_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for modelName to set. - * @return This builder for chaining. - */ - public Builder setModelNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker) - private static final com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker(); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LlmRanker 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.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int rankingConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object rankingConfig_; - - public enum RankingConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RANK_SERVICE(1), - LLM_RANKER(3), - RANKINGCONFIG_NOT_SET(0); - private final int value; - - private RankingConfigCase(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 RankingConfigCase valueOf(int value) { - return forNumber(value); - } - - public static RankingConfigCase forNumber(int value) { - switch (value) { - case 1: - return RANK_SERVICE; - case 3: - return LLM_RANKER; - case 0: - return RANKINGCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public RankingConfigCase getRankingConfigCase() { - return RankingConfigCase.forNumber(rankingConfigCase_); - } - - public static final int RANK_SERVICE_FIELD_NUMBER = 1; - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the rankService field is set. - */ - @java.lang.Override - public boolean hasRankService() { - return rankingConfigCase_ == 1; - } - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The rankService. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService getRankService() { - if (rankingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - - /** - * - * - *
-     * Optional. Config for Rank Service.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder - getRankServiceOrBuilder() { - if (rankingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - - public static final int LLM_RANKER_FIELD_NUMBER = 3; - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the llmRanker field is set. - */ - @java.lang.Override - public boolean hasLlmRanker() { - return rankingConfigCase_ == 3; - } - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The llmRanker. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker getLlmRanker() { - if (rankingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } - - /** - * - * - *
-     * Optional. Config for LlmRanker.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder - getLlmRankerOrBuilder() { - if (rankingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .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 (rankingConfigCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) rankingConfig_); - } - if (rankingConfigCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) rankingConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (rankingConfigCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_); - } - if (rankingConfigCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) - rankingConfig_); - } - 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.vertexai.api.RagRetrievalConfig.Ranking)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking other = - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking) obj; - - if (!getRankingConfigCase().equals(other.getRankingConfigCase())) return false; - switch (rankingConfigCase_) { - case 1: - if (!getRankService().equals(other.getRankService())) return false; - break; - case 3: - if (!getLlmRanker().equals(other.getLlmRanker())) 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 (rankingConfigCase_) { - case 1: - hash = (37 * hash) + RANK_SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getRankService().hashCode(); - break; - case 3: - hash = (37 * hash) + LLM_RANKER_FIELD_NUMBER; - hash = (53 * hash) + getLlmRanker().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking 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.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking 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.vertexai.api.RagRetrievalConfig.Ranking parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagRetrievalConfig.Ranking 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Config for ranking and reranking.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig.Ranking} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking) - com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (rankServiceBuilder_ != null) { - rankServiceBuilder_.clear(); - } - if (llmRankerBuilder_ != null) { - llmRankerBuilder_.clear(); - } - rankingConfigCase_ = 0; - rankingConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking build() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking buildPartial() { - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking result = - new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking result) { - result.rankingConfigCase_ = rankingConfigCase_; - result.rankingConfig_ = this.rankingConfig_; - if (rankingConfigCase_ == 1 && rankServiceBuilder_ != null) { - result.rankingConfig_ = rankServiceBuilder_.build(); - } - if (rankingConfigCase_ == 3 && llmRankerBuilder_ != null) { - result.rankingConfig_ = llmRankerBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking) { - return mergeFrom((com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking other) { - if (other == com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance()) - return this; - switch (other.getRankingConfigCase()) { - case RANK_SERVICE: - { - mergeRankService(other.getRankService()); - break; - } - case LLM_RANKER: - { - mergeLlmRanker(other.getLlmRanker()); - break; - } - case RANKINGCONFIG_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( - internalGetRankServiceFieldBuilder().getBuilder(), extensionRegistry); - rankingConfigCase_ = 1; - break; - } // case 10 - case 26: - { - input.readMessage( - internalGetLlmRankerFieldBuilder().getBuilder(), extensionRegistry); - rankingConfigCase_ = 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 rankingConfigCase_ = 0; - private java.lang.Object rankingConfig_; - - public RankingConfigCase getRankingConfigCase() { - return RankingConfigCase.forNumber(rankingConfigCase_); - } - - public Builder clearRankingConfig() { - rankingConfigCase_ = 0; - rankingConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder> - rankServiceBuilder_; - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the rankService field is set. - */ - @java.lang.Override - public boolean hasRankService() { - return rankingConfigCase_ == 1; - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The rankService. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService getRankService() { - if (rankServiceBuilder_ == null) { - if (rankingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } else { - if (rankingConfigCase_ == 1) { - return rankServiceBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRankService( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService value) { - if (rankServiceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rankingConfig_ = value; - onChanged(); - } else { - rankServiceBuilder_.setMessage(value); - } - rankingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRankService( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder - builderForValue) { - if (rankServiceBuilder_ == null) { - rankingConfig_ = builderForValue.build(); - onChanged(); - } else { - rankServiceBuilder_.setMessage(builderForValue.build()); - } - rankingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRankService( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService value) { - if (rankServiceBuilder_ == null) { - if (rankingConfigCase_ == 1 - && rankingConfig_ - != com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance()) { - rankingConfig_ = - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.newBuilder( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - rankingConfig_ = value; - } - onChanged(); - } else { - if (rankingConfigCase_ == 1) { - rankServiceBuilder_.mergeFrom(value); - } else { - rankServiceBuilder_.setMessage(value); - } - } - rankingConfigCase_ = 1; - return this; - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRankService() { - if (rankServiceBuilder_ == null) { - if (rankingConfigCase_ == 1) { - rankingConfigCase_ = 0; - rankingConfig_ = null; - onChanged(); - } - } else { - if (rankingConfigCase_ == 1) { - rankingConfigCase_ = 0; - rankingConfig_ = null; - } - rankServiceBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder - getRankServiceBuilder() { - return internalGetRankServiceFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder - getRankServiceOrBuilder() { - if ((rankingConfigCase_ == 1) && (rankServiceBuilder_ != null)) { - return rankServiceBuilder_.getMessageOrBuilder(); - } else { - if (rankingConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Optional. Config for Rank Service.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.RankService rank_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder> - internalGetRankServiceFieldBuilder() { - if (rankServiceBuilder_ == null) { - if (!(rankingConfigCase_ == 1)) { - rankingConfig_ = - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService - .getDefaultInstance(); - } - rankServiceBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankServiceOrBuilder>( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.RankService) - rankingConfig_, - getParentForChildren(), - isClean()); - rankingConfig_ = null; - } - rankingConfigCase_ = 1; - onChanged(); - return rankServiceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder> - llmRankerBuilder_; - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the llmRanker field is set. - */ - @java.lang.Override - public boolean hasLlmRanker() { - return rankingConfigCase_ == 3; - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The llmRanker. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker getLlmRanker() { - if (llmRankerBuilder_ == null) { - if (rankingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } else { - if (rankingConfigCase_ == 3) { - return llmRankerBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLlmRanker( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker value) { - if (llmRankerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rankingConfig_ = value; - onChanged(); - } else { - llmRankerBuilder_.setMessage(value); - } - rankingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLlmRanker( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder - builderForValue) { - if (llmRankerBuilder_ == null) { - rankingConfig_ = builderForValue.build(); - onChanged(); - } else { - llmRankerBuilder_.setMessage(builderForValue.build()); - } - rankingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLlmRanker( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker value) { - if (llmRankerBuilder_ == null) { - if (rankingConfigCase_ == 3 - && rankingConfig_ - != com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance()) { - rankingConfig_ = - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.newBuilder( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) - rankingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - rankingConfig_ = value; - } - onChanged(); - } else { - if (rankingConfigCase_ == 3) { - llmRankerBuilder_.mergeFrom(value); - } else { - llmRankerBuilder_.setMessage(value); - } - } - rankingConfigCase_ = 3; - return this; - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLlmRanker() { - if (llmRankerBuilder_ == null) { - if (rankingConfigCase_ == 3) { - rankingConfigCase_ = 0; - rankingConfig_ = null; - onChanged(); - } - } else { - if (rankingConfigCase_ == 3) { - rankingConfigCase_ = 0; - rankingConfig_ = null; - } - llmRankerBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder - getLlmRankerBuilder() { - return internalGetLlmRankerFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder - getLlmRankerOrBuilder() { - if ((rankingConfigCase_ == 3) && (llmRankerBuilder_ != null)) { - return llmRankerBuilder_.getMessageOrBuilder(); - } else { - if (rankingConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) - rankingConfig_; - } - return com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Optional. Config for LlmRanker.
-       * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRanker llm_ranker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder> - internalGetLlmRankerFieldBuilder() { - if (llmRankerBuilder_ == null) { - if (!(rankingConfigCase_ == 3)) { - rankingConfig_ = - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker - .getDefaultInstance(); - } - llmRankerBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRankerOrBuilder>( - (com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.LlmRanker) - rankingConfig_, - getParentForChildren(), - isClean()); - rankingConfig_ = null; - } - rankingConfigCase_ = 3; - onChanged(); - return llmRankerBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagRetrievalConfig.Ranking) - private static final com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking(); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Ranking 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.vertexai.api.RagRetrievalConfig.Ranking getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int TOP_K_FIELD_NUMBER = 1; - private int topK_ = 0; - - /** - * - * - *
-   * Optional. The number of contexts to retrieve.
-   * 
- * - * int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - @java.lang.Override - public int getTopK() { - return topK_; - } - - public static final int FILTER_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.RagRetrievalConfig.Filter filter_; - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the filter field is set. - */ - @java.lang.Override - public boolean hasFilter() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The filter. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter getFilter() { - return filter_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance() - : filter_; - } - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder getFilterOrBuilder() { - return filter_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance() - : filter_; - } - - public static final int RANKING_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking ranking_; - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ranking field is set. - */ - @java.lang.Override - public boolean hasRanking() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ranking. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking getRanking() { - return ranking_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance() - : ranking_; - } - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder getRankingOrBuilder() { - return ranking_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance() - : ranking_; - } - - 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 (topK_ != 0) { - output.writeInt32(1, topK_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getFilter()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getRanking()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topK_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, topK_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFilter()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRanking()); - } - 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.vertexai.api.RagRetrievalConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagRetrievalConfig other = - (com.google.cloud.vertexai.api.RagRetrievalConfig) obj; - - if (getTopK() != other.getTopK()) return false; - if (hasFilter() != other.hasFilter()) return false; - if (hasFilter()) { - if (!getFilter().equals(other.getFilter())) return false; - } - if (hasRanking() != other.hasRanking()) return false; - if (hasRanking()) { - if (!getRanking().equals(other.getRanking())) 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) + TOP_K_FIELD_NUMBER; - hash = (53 * hash) + getTopK(); - if (hasFilter()) { - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - } - if (hasRanking()) { - hash = (37 * hash) + RANKING_FIELD_NUMBER; - hash = (53 * hash) + getRanking().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig 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.vertexai.api.RagRetrievalConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig 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.vertexai.api.RagRetrievalConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagRetrievalConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Specifies the context retrieval config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagRetrievalConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagRetrievalConfig) - com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagRetrievalConfig.class, - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagRetrievalConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetFilterFieldBuilder(); - internalGetRankingFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - topK_ = 0; - filter_ = null; - if (filterBuilder_ != null) { - filterBuilder_.dispose(); - filterBuilder_ = null; - } - ranking_ = null; - if (rankingBuilder_ != null) { - rankingBuilder_.dispose(); - rankingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig build() { - com.google.cloud.vertexai.api.RagRetrievalConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig buildPartial() { - com.google.cloud.vertexai.api.RagRetrievalConfig result = - new com.google.cloud.vertexai.api.RagRetrievalConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagRetrievalConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.topK_ = topK_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.ranking_ = rankingBuilder_ == null ? ranking_ : rankingBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagRetrievalConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagRetrievalConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagRetrievalConfig other) { - if (other == com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance()) - return this; - if (other.getTopK() != 0) { - setTopK(other.getTopK()); - } - if (other.hasFilter()) { - mergeFilter(other.getFilter()); - } - if (other.hasRanking()) { - mergeRanking(other.getRanking()); - } - 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: - { - topK_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 26: - { - input.readMessage(internalGetFilterFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 34: - { - input.readMessage(internalGetRankingFieldBuilder().getBuilder(), extensionRegistry); - 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 int topK_; - - /** - * - * - *
-     * Optional. The number of contexts to retrieve.
-     * 
- * - * int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - @java.lang.Override - public int getTopK() { - return topK_; - } - - /** - * - * - *
-     * Optional. The number of contexts to retrieve.
-     * 
- * - * int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The topK to set. - * @return This builder for chaining. - */ - public Builder setTopK(int value) { - - topK_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The number of contexts to retrieve.
-     * 
- * - * int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTopK() { - bitField0_ = (bitField0_ & ~0x00000001); - topK_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.RagRetrievalConfig.Filter filter_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter, - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder> - filterBuilder_; - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the filter field is set. - */ - public boolean hasFilter() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The filter. - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter getFilter() { - if (filterBuilder_ == null) { - return filter_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance() - : filter_; - } else { - return filterBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFilter(com.google.cloud.vertexai.api.RagRetrievalConfig.Filter value) { - if (filterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - } else { - filterBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFilter( - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder builderForValue) { - if (filterBuilder_ == null) { - filter_ = builderForValue.build(); - } else { - filterBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFilter(com.google.cloud.vertexai.api.RagRetrievalConfig.Filter value) { - if (filterBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && filter_ != null - && filter_ - != com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance()) { - getFilterBuilder().mergeFrom(value); - } else { - filter_ = value; - } - } else { - filterBuilder_.mergeFrom(value); - } - if (filter_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFilter() { - bitField0_ = (bitField0_ & ~0x00000002); - filter_ = null; - if (filterBuilder_ != null) { - filterBuilder_.dispose(); - filterBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder getFilterBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetFilterFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder getFilterOrBuilder() { - if (filterBuilder_ != null) { - return filterBuilder_.getMessageOrBuilder(); - } else { - return filter_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.getDefaultInstance() - : filter_; - } - } - - /** - * - * - *
-     * Optional. Config for filters.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter, - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder> - internalGetFilterFieldBuilder() { - if (filterBuilder_ == null) { - filterBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter, - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder>( - getFilter(), getParentForChildren(), isClean()); - filter_ = null; - } - return filterBuilder_; - } - - private com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking ranking_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder> - rankingBuilder_; - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ranking field is set. - */ - public boolean hasRanking() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ranking. - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking getRanking() { - if (rankingBuilder_ == null) { - return ranking_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance() - : ranking_; - } else { - return rankingBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRanking(com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking value) { - if (rankingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ranking_ = value; - } else { - rankingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRanking( - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder builderForValue) { - if (rankingBuilder_ == null) { - ranking_ = builderForValue.build(); - } else { - rankingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRanking(com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking value) { - if (rankingBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && ranking_ != null - && ranking_ - != com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance()) { - getRankingBuilder().mergeFrom(value); - } else { - ranking_ = value; - } - } else { - rankingBuilder_.mergeFrom(value); - } - if (ranking_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRanking() { - bitField0_ = (bitField0_ & ~0x00000004); - ranking_ = null; - if (rankingBuilder_ != null) { - rankingBuilder_.dispose(); - rankingBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder getRankingBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetRankingFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder getRankingOrBuilder() { - if (rankingBuilder_ != null) { - return rankingBuilder_.getMessageOrBuilder(); - } else { - return ranking_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.getDefaultInstance() - : ranking_; - } - } - - /** - * - * - *
-     * Optional. Config for ranking and reranking.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder> - internalGetRankingFieldBuilder() { - if (rankingBuilder_ == null) { - rankingBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking, - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder>( - getRanking(), getParentForChildren(), isClean()); - ranking_ = null; - } - return rankingBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagRetrievalConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagRetrievalConfig) - private static final com.google.cloud.vertexai.api.RagRetrievalConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagRetrievalConfig(); - } - - public static com.google.cloud.vertexai.api.RagRetrievalConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagRetrievalConfig 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.vertexai.api.RagRetrievalConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfigOrBuilder.java deleted file mode 100644 index 1670fa564ba3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagRetrievalConfigOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagRetrievalConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagRetrievalConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The number of contexts to retrieve.
-   * 
- * - * int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The topK. - */ - int getTopK(); - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the filter field is set. - */ - boolean hasFilter(); - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The filter. - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Filter getFilter(); - - /** - * - * - *
-   * Optional. Config for filters.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.FilterOrBuilder getFilterOrBuilder(); - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ranking field is set. - */ - boolean hasRanking(); - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ranking. - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.Ranking getRanking(); - - /** - * - * - *
-   * Optional. Config for ranking and reranking.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig.Ranking ranking = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagRetrievalConfig.RankingOrBuilder getRankingOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfig.java deleted file mode 100644 index fa962ec55be1..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfig.java +++ /dev/null @@ -1,5890 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for the Vector DB to use for RAG.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig} - */ -@com.google.protobuf.Generated -public final class RagVectorDbConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig) - RagVectorDbConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagVectorDbConfig"); - } - - // Use RagVectorDbConfig.newBuilder() to construct. - private RagVectorDbConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagVectorDbConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder.class); - } - - public interface RagManagedDbOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return Whether the knn field is set. - */ - boolean hasKnn(); - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return The knn. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN getKnn(); - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder getKnnOrBuilder(); - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return Whether the ann field is set. - */ - boolean hasAnn(); - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return The ann. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN getAnn(); - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder getAnnOrBuilder(); - - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.RetrievalStrategyCase - getRetrievalStrategyCase(); - } - - /** - * - * - *
-   * The config for the default RAG-managed Vector DB.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb} - */ - public static final class RagManagedDb extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb) - RagManagedDbOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagManagedDb"); - } - - // Use RagManagedDb.newBuilder() to construct. - private RagManagedDb(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagManagedDb() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder.class); - } - - public interface KNNOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN) - com.google.protobuf.MessageOrBuilder {} - - /** - * - * - *
-     * Config for KNN search.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN} - */ - public static final class KNN extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN) - KNNOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "KNN"); - } - - // Use KNN.newBuilder() to construct. - private KNN(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private KNN() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder.class); - } - - 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.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN other = - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) 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.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Config for KNN search.
-       * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN) - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN build() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN result = - new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN other) { - if (other - == com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KNN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ANNOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The depth of the tree-based structure. Only depth values of 2 and 3 are
-       * supported.
-       *
-       * Recommended value is 2 if you have if you have O(10K) files in the
-       * RagCorpus and set this to 3 if more than that.
-       *
-       * Default value is 2.
-       * 
- * - * int32 tree_depth = 1; - * - * @return The treeDepth. - */ - int getTreeDepth(); - - /** - * - * - *
-       * Number of leaf nodes in the tree-based structure. Each leaf node
-       * contains groups of closely related vectors along with their
-       * corresponding centroid.
-       *
-       * Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
-       *
-       * Default value is 500.
-       * 
- * - * int32 leaf_count = 2; - * - * @return The leafCount. - */ - int getLeafCount(); - } - - /** - * - * - *
-     * Config for ANN search.
-     *
-     * RagManagedDb uses a tree-based structure to partition data and
-     * facilitate faster searches. As a tradeoff, it requires longer indexing
-     * time and manual triggering of index rebuild via the ImportRagFiles and
-     * UpdateRagCorpus API.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN} - */ - public static final class ANN extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN) - ANNOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ANN"); - } - - // Use ANN.newBuilder() to construct. - private ANN(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ANN() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder.class); - } - - public static final int TREE_DEPTH_FIELD_NUMBER = 1; - private int treeDepth_ = 0; - - /** - * - * - *
-       * The depth of the tree-based structure. Only depth values of 2 and 3 are
-       * supported.
-       *
-       * Recommended value is 2 if you have if you have O(10K) files in the
-       * RagCorpus and set this to 3 if more than that.
-       *
-       * Default value is 2.
-       * 
- * - * int32 tree_depth = 1; - * - * @return The treeDepth. - */ - @java.lang.Override - public int getTreeDepth() { - return treeDepth_; - } - - public static final int LEAF_COUNT_FIELD_NUMBER = 2; - private int leafCount_ = 0; - - /** - * - * - *
-       * Number of leaf nodes in the tree-based structure. Each leaf node
-       * contains groups of closely related vectors along with their
-       * corresponding centroid.
-       *
-       * Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
-       *
-       * Default value is 500.
-       * 
- * - * int32 leaf_count = 2; - * - * @return The leafCount. - */ - @java.lang.Override - public int getLeafCount() { - return leafCount_; - } - - 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 (treeDepth_ != 0) { - output.writeInt32(1, treeDepth_); - } - if (leafCount_ != 0) { - output.writeInt32(2, leafCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (treeDepth_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, treeDepth_); - } - if (leafCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, leafCount_); - } - 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.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN other = - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) obj; - - if (getTreeDepth() != other.getTreeDepth()) return false; - if (getLeafCount() != other.getLeafCount()) 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) + TREE_DEPTH_FIELD_NUMBER; - hash = (53 * hash) + getTreeDepth(); - hash = (37 * hash) + LEAF_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getLeafCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * Config for ANN search.
-       *
-       * RagManagedDb uses a tree-based structure to partition data and
-       * facilitate faster searches. As a tradeoff, it requires longer indexing
-       * time and manual triggering of index rebuild via the ImportRagFiles and
-       * UpdateRagCorpus API.
-       * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN) - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - treeDepth_ = 0; - leafCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN build() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN result = - new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.treeDepth_ = treeDepth_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.leafCount_ = leafCount_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN other) { - if (other - == com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance()) return this; - if (other.getTreeDepth() != 0) { - setTreeDepth(other.getTreeDepth()); - } - if (other.getLeafCount() != 0) { - setLeafCount(other.getLeafCount()); - } - 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: - { - treeDepth_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - leafCount_ = 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 treeDepth_; - - /** - * - * - *
-         * The depth of the tree-based structure. Only depth values of 2 and 3 are
-         * supported.
-         *
-         * Recommended value is 2 if you have if you have O(10K) files in the
-         * RagCorpus and set this to 3 if more than that.
-         *
-         * Default value is 2.
-         * 
- * - * int32 tree_depth = 1; - * - * @return The treeDepth. - */ - @java.lang.Override - public int getTreeDepth() { - return treeDepth_; - } - - /** - * - * - *
-         * The depth of the tree-based structure. Only depth values of 2 and 3 are
-         * supported.
-         *
-         * Recommended value is 2 if you have if you have O(10K) files in the
-         * RagCorpus and set this to 3 if more than that.
-         *
-         * Default value is 2.
-         * 
- * - * int32 tree_depth = 1; - * - * @param value The treeDepth to set. - * @return This builder for chaining. - */ - public Builder setTreeDepth(int value) { - - treeDepth_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * The depth of the tree-based structure. Only depth values of 2 and 3 are
-         * supported.
-         *
-         * Recommended value is 2 if you have if you have O(10K) files in the
-         * RagCorpus and set this to 3 if more than that.
-         *
-         * Default value is 2.
-         * 
- * - * int32 tree_depth = 1; - * - * @return This builder for chaining. - */ - public Builder clearTreeDepth() { - bitField0_ = (bitField0_ & ~0x00000001); - treeDepth_ = 0; - onChanged(); - return this; - } - - private int leafCount_; - - /** - * - * - *
-         * Number of leaf nodes in the tree-based structure. Each leaf node
-         * contains groups of closely related vectors along with their
-         * corresponding centroid.
-         *
-         * Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
-         *
-         * Default value is 500.
-         * 
- * - * int32 leaf_count = 2; - * - * @return The leafCount. - */ - @java.lang.Override - public int getLeafCount() { - return leafCount_; - } - - /** - * - * - *
-         * Number of leaf nodes in the tree-based structure. Each leaf node
-         * contains groups of closely related vectors along with their
-         * corresponding centroid.
-         *
-         * Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
-         *
-         * Default value is 500.
-         * 
- * - * int32 leaf_count = 2; - * - * @param value The leafCount to set. - * @return This builder for chaining. - */ - public Builder setLeafCount(int value) { - - leafCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-         * Number of leaf nodes in the tree-based structure. Each leaf node
-         * contains groups of closely related vectors along with their
-         * corresponding centroid.
-         *
-         * Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
-         *
-         * Default value is 500.
-         * 
- * - * int32 leaf_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearLeafCount() { - bitField0_ = (bitField0_ & ~0x00000002); - leafCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ANN 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.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int retrievalStrategyCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object retrievalStrategy_; - - public enum RetrievalStrategyCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - KNN(1), - ANN(2), - RETRIEVALSTRATEGY_NOT_SET(0); - private final int value; - - private RetrievalStrategyCase(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 RetrievalStrategyCase valueOf(int value) { - return forNumber(value); - } - - public static RetrievalStrategyCase forNumber(int value) { - switch (value) { - case 1: - return KNN; - case 2: - return ANN; - case 0: - return RETRIEVALSTRATEGY_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public RetrievalStrategyCase getRetrievalStrategyCase() { - return RetrievalStrategyCase.forNumber(retrievalStrategyCase_); - } - - public static final int KNN_FIELD_NUMBER = 1; - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return Whether the knn field is set. - */ - @java.lang.Override - public boolean hasKnn() { - return retrievalStrategyCase_ == 1; - } - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return The knn. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN getKnn() { - if (retrievalStrategyCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.getDefaultInstance(); - } - - /** - * - * - *
-     * Performs a KNN search on RagCorpus.
-     * Default choice if not specified.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder - getKnnOrBuilder() { - if (retrievalStrategyCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.getDefaultInstance(); - } - - public static final int ANN_FIELD_NUMBER = 2; - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return Whether the ann field is set. - */ - @java.lang.Override - public boolean hasAnn() { - return retrievalStrategyCase_ == 2; - } - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return The ann. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN getAnn() { - if (retrievalStrategyCase_ == 2) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.getDefaultInstance(); - } - - /** - * - * - *
-     * Performs an ANN search on RagCorpus. Use this if you have a lot of
-     * files (> 10K) in your RagCorpus and want to reduce the search latency.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder - getAnnOrBuilder() { - if (retrievalStrategyCase_ == 2) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.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 (retrievalStrategyCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) retrievalStrategy_); - } - if (retrievalStrategyCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) retrievalStrategy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (retrievalStrategyCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_); - } - if (retrievalStrategyCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_); - } - 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.vertexai.api.RagVectorDbConfig.RagManagedDb)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb other = - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) obj; - - if (!getRetrievalStrategyCase().equals(other.getRetrievalStrategyCase())) return false; - switch (retrievalStrategyCase_) { - case 1: - if (!getKnn().equals(other.getKnn())) return false; - break; - case 2: - if (!getAnn().equals(other.getAnn())) 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 (retrievalStrategyCase_) { - case 1: - hash = (37 * hash) + KNN_FIELD_NUMBER; - hash = (53 * hash) + getKnn().hashCode(); - break; - case 2: - hash = (37 * hash) + ANN_FIELD_NUMBER; - hash = (53 * hash) + getAnn().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb 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.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb 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.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig.RagManagedDb 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The config for the default RAG-managed Vector DB.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb) - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (knnBuilder_ != null) { - knnBuilder_.clear(); - } - if (annBuilder_ != null) { - annBuilder_.clear(); - } - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb build() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb result = - new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb result) { - result.retrievalStrategyCase_ = retrievalStrategyCase_; - result.retrievalStrategy_ = this.retrievalStrategy_; - if (retrievalStrategyCase_ == 1 && knnBuilder_ != null) { - result.retrievalStrategy_ = knnBuilder_.build(); - } - if (retrievalStrategyCase_ == 2 && annBuilder_ != null) { - result.retrievalStrategy_ = annBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) { - return mergeFrom((com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb other) { - if (other - == com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance()) - return this; - switch (other.getRetrievalStrategyCase()) { - case KNN: - { - mergeKnn(other.getKnn()); - break; - } - case ANN: - { - mergeAnn(other.getAnn()); - break; - } - case RETRIEVALSTRATEGY_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(internalGetKnnFieldBuilder().getBuilder(), extensionRegistry); - retrievalStrategyCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage(internalGetAnnFieldBuilder().getBuilder(), extensionRegistry); - retrievalStrategyCase_ = 2; - 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 retrievalStrategyCase_ = 0; - private java.lang.Object retrievalStrategy_; - - public RetrievalStrategyCase getRetrievalStrategyCase() { - return RetrievalStrategyCase.forNumber(retrievalStrategyCase_); - } - - public Builder clearRetrievalStrategy() { - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder> - knnBuilder_; - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return Whether the knn field is set. - */ - @java.lang.Override - public boolean hasKnn() { - return retrievalStrategyCase_ == 1; - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - * - * @return The knn. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN getKnn() { - if (knnBuilder_ == null) { - if (retrievalStrategyCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance(); - } else { - if (retrievalStrategyCase_ == 1) { - return knnBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - public Builder setKnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN value) { - if (knnBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retrievalStrategy_ = value; - onChanged(); - } else { - knnBuilder_.setMessage(value); - } - retrievalStrategyCase_ = 1; - return this; - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - public Builder setKnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder - builderForValue) { - if (knnBuilder_ == null) { - retrievalStrategy_ = builderForValue.build(); - onChanged(); - } else { - knnBuilder_.setMessage(builderForValue.build()); - } - retrievalStrategyCase_ = 1; - return this; - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - public Builder mergeKnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN value) { - if (knnBuilder_ == null) { - if (retrievalStrategyCase_ == 1 - && retrievalStrategy_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance()) { - retrievalStrategy_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_) - .mergeFrom(value) - .buildPartial(); - } else { - retrievalStrategy_ = value; - } - onChanged(); - } else { - if (retrievalStrategyCase_ == 1) { - knnBuilder_.mergeFrom(value); - } else { - knnBuilder_.setMessage(value); - } - } - retrievalStrategyCase_ = 1; - return this; - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - public Builder clearKnn() { - if (knnBuilder_ == null) { - if (retrievalStrategyCase_ == 1) { - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - onChanged(); - } - } else { - if (retrievalStrategyCase_ == 1) { - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - } - knnBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder - getKnnBuilder() { - return internalGetKnnFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder - getKnnOrBuilder() { - if ((retrievalStrategyCase_ == 1) && (knnBuilder_ != null)) { - return knnBuilder_.getMessageOrBuilder(); - } else { - if (retrievalStrategyCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Performs a KNN search on RagCorpus.
-       * Default choice if not specified.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNN knn = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder> - internalGetKnnFieldBuilder() { - if (knnBuilder_ == null) { - if (!(retrievalStrategyCase_ == 1)) { - retrievalStrategy_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN - .getDefaultInstance(); - } - knnBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNNOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.KNN) - retrievalStrategy_, - getParentForChildren(), - isClean()); - retrievalStrategy_ = null; - } - retrievalStrategyCase_ = 1; - onChanged(); - return knnBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder> - annBuilder_; - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return Whether the ann field is set. - */ - @java.lang.Override - public boolean hasAnn() { - return retrievalStrategyCase_ == 2; - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - * - * @return The ann. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN getAnn() { - if (annBuilder_ == null) { - if (retrievalStrategyCase_ == 2) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance(); - } else { - if (retrievalStrategyCase_ == 2) { - return annBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - public Builder setAnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN value) { - if (annBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retrievalStrategy_ = value; - onChanged(); - } else { - annBuilder_.setMessage(value); - } - retrievalStrategyCase_ = 2; - return this; - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - public Builder setAnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder - builderForValue) { - if (annBuilder_ == null) { - retrievalStrategy_ = builderForValue.build(); - onChanged(); - } else { - annBuilder_.setMessage(builderForValue.build()); - } - retrievalStrategyCase_ = 2; - return this; - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - public Builder mergeAnn( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN value) { - if (annBuilder_ == null) { - if (retrievalStrategyCase_ == 2 - && retrievalStrategy_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance()) { - retrievalStrategy_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_) - .mergeFrom(value) - .buildPartial(); - } else { - retrievalStrategy_ = value; - } - onChanged(); - } else { - if (retrievalStrategyCase_ == 2) { - annBuilder_.mergeFrom(value); - } else { - annBuilder_.setMessage(value); - } - } - retrievalStrategyCase_ = 2; - return this; - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - public Builder clearAnn() { - if (annBuilder_ == null) { - if (retrievalStrategyCase_ == 2) { - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - onChanged(); - } - } else { - if (retrievalStrategyCase_ == 2) { - retrievalStrategyCase_ = 0; - retrievalStrategy_ = null; - } - annBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder - getAnnBuilder() { - return internalGetAnnFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder - getAnnOrBuilder() { - if ((retrievalStrategyCase_ == 2) && (annBuilder_ != null)) { - return annBuilder_.getMessageOrBuilder(); - } else { - if (retrievalStrategyCase_ == 2) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance(); - } - } - - /** - * - * - *
-       * Performs an ANN search on RagCorpus. Use this if you have a lot of
-       * files (> 10K) in your RagCorpus and want to reduce the search latency.
-       * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANN ann = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder> - internalGetAnnFieldBuilder() { - if (annBuilder_ == null) { - if (!(retrievalStrategyCase_ == 2)) { - retrievalStrategy_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN - .getDefaultInstance(); - } - annBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANNOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.ANN) - retrievalStrategy_, - getParentForChildren(), - isClean()); - retrievalStrategy_ = null; - } - retrievalStrategyCase_ = 2; - onChanged(); - return annBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagManagedDb 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.vertexai.api.RagVectorDbConfig.RagManagedDb - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface PineconeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Pinecone index name.
-     * This value cannot be changed after it's set.
-     * 
- * - * string index_name = 1; - * - * @return The indexName. - */ - java.lang.String getIndexName(); - - /** - * - * - *
-     * Pinecone index name.
-     * This value cannot be changed after it's set.
-     * 
- * - * string index_name = 1; - * - * @return The bytes for indexName. - */ - com.google.protobuf.ByteString getIndexNameBytes(); - } - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone} - */ - public static final class Pinecone extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone) - PineconeOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Pinecone"); - } - - // Use Pinecone.newBuilder() to construct. - private Pinecone(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Pinecone() { - indexName_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder.class); - } - - public static final int INDEX_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object indexName_ = ""; - - /** - * - * - *
-     * Pinecone index name.
-     * This value cannot be changed after it's set.
-     * 
- * - * string index_name = 1; - * - * @return The indexName. - */ - @java.lang.Override - public java.lang.String getIndexName() { - java.lang.Object ref = indexName_; - 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(); - indexName_ = s; - return s; - } - } - - /** - * - * - *
-     * Pinecone index name.
-     * This value cannot be changed after it's set.
-     * 
- * - * string index_name = 1; - * - * @return The bytes for indexName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indexName_ = 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.GeneratedMessage.isStringEmpty(indexName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, indexName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indexName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, indexName_); - } - 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.vertexai.api.RagVectorDbConfig.Pinecone)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone other = - (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) obj; - - if (!getIndexName().equals(other.getIndexName())) 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) + INDEX_NAME_FIELD_NUMBER; - hash = (53 * hash) + getIndexName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone 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.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone 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.vertexai.api.RagVectorDbConfig.Pinecone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig.Pinecone 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone) - com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - indexName_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone build() { - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone result = - new com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.indexName_ = indexName_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) { - return mergeFrom((com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone other) { - if (other == com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance()) - return this; - if (!other.getIndexName().isEmpty()) { - indexName_ = other.indexName_; - 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: - { - indexName_ = 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 indexName_ = ""; - - /** - * - * - *
-       * Pinecone index name.
-       * This value cannot be changed after it's set.
-       * 
- * - * string index_name = 1; - * - * @return The indexName. - */ - public java.lang.String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - indexName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Pinecone index name.
-       * This value cannot be changed after it's set.
-       * 
- * - * string index_name = 1; - * - * @return The bytes for indexName. - */ - public com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Pinecone index name.
-       * This value cannot be changed after it's set.
-       * 
- * - * string index_name = 1; - * - * @param value The indexName to set. - * @return This builder for chaining. - */ - public Builder setIndexName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - indexName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Pinecone index name.
-       * This value cannot be changed after it's set.
-       * 
- * - * string index_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearIndexName() { - indexName_ = getDefaultInstance().getIndexName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Pinecone index name.
-       * This value cannot be changed after it's set.
-       * 
- * - * string index_name = 1; - * - * @param value The bytes for indexName to set. - * @return This builder for chaining. - */ - public Builder setIndexNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - indexName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Pinecone 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.vertexai.api.RagVectorDbConfig.Pinecone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface VertexVectorSearchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The resource name of the Index Endpoint.
-     * Format:
-     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-     * 
- * - * string index_endpoint = 1; - * - * @return The indexEndpoint. - */ - java.lang.String getIndexEndpoint(); - - /** - * - * - *
-     * The resource name of the Index Endpoint.
-     * Format:
-     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-     * 
- * - * string index_endpoint = 1; - * - * @return The bytes for indexEndpoint. - */ - com.google.protobuf.ByteString getIndexEndpointBytes(); - - /** - * - * - *
-     * The resource name of the Index.
-     * Format:
-     * `projects/{project}/locations/{location}/indexes/{index}`
-     * 
- * - * string index = 2; - * - * @return The index. - */ - java.lang.String getIndex(); - - /** - * - * - *
-     * The resource name of the Index.
-     * Format:
-     * `projects/{project}/locations/{location}/indexes/{index}`
-     * 
- * - * string index = 2; - * - * @return The bytes for index. - */ - com.google.protobuf.ByteString getIndexBytes(); - } - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch} - */ - public static final class VertexVectorSearch extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch) - VertexVectorSearchOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexVectorSearch"); - } - - // Use VertexVectorSearch.newBuilder() to construct. - private VertexVectorSearch(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VertexVectorSearch() { - indexEndpoint_ = ""; - index_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder.class); - } - - public static final int INDEX_ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object indexEndpoint_ = ""; - - /** - * - * - *
-     * The resource name of the Index Endpoint.
-     * Format:
-     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-     * 
- * - * string index_endpoint = 1; - * - * @return The indexEndpoint. - */ - @java.lang.Override - public java.lang.String getIndexEndpoint() { - java.lang.Object ref = indexEndpoint_; - 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(); - indexEndpoint_ = s; - return s; - } - } - - /** - * - * - *
-     * The resource name of the Index Endpoint.
-     * Format:
-     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-     * 
- * - * string index_endpoint = 1; - * - * @return The bytes for indexEndpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIndexEndpointBytes() { - java.lang.Object ref = indexEndpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indexEndpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEX_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object index_ = ""; - - /** - * - * - *
-     * The resource name of the Index.
-     * Format:
-     * `projects/{project}/locations/{location}/indexes/{index}`
-     * 
- * - * string index = 2; - * - * @return The index. - */ - @java.lang.Override - public java.lang.String getIndex() { - java.lang.Object ref = index_; - 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(); - index_ = s; - return s; - } - } - - /** - * - * - *
-     * The resource name of the Index.
-     * Format:
-     * `projects/{project}/locations/{location}/indexes/{index}`
-     * 
- * - * string index = 2; - * - * @return The bytes for index. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIndexBytes() { - java.lang.Object ref = index_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - index_ = 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.GeneratedMessage.isStringEmpty(indexEndpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, indexEndpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, index_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indexEndpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, indexEndpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, index_); - } - 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.vertexai.api.RagVectorDbConfig.VertexVectorSearch)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch other = - (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) obj; - - if (!getIndexEndpoint().equals(other.getIndexEndpoint())) return false; - if (!getIndex().equals(other.getIndex())) 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) + INDEX_ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getIndexEndpoint().hashCode(); - hash = (37 * hash) + INDEX_FIELD_NUMBER; - hash = (53 * hash) + getIndex().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch 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.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch 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.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig.VertexVectorSearch 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch) - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - indexEndpoint_ = ""; - index_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch build() { - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch result = - new com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.indexEndpoint_ = indexEndpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.index_ = index_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) { - return mergeFrom( - (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch other) { - if (other - == com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance()) return this; - if (!other.getIndexEndpoint().isEmpty()) { - indexEndpoint_ = other.indexEndpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getIndex().isEmpty()) { - index_ = other.index_; - 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: - { - indexEndpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - index_ = 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 indexEndpoint_ = ""; - - /** - * - * - *
-       * The resource name of the Index Endpoint.
-       * Format:
-       * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-       * 
- * - * string index_endpoint = 1; - * - * @return The indexEndpoint. - */ - public java.lang.String getIndexEndpoint() { - java.lang.Object ref = indexEndpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - indexEndpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The resource name of the Index Endpoint.
-       * Format:
-       * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-       * 
- * - * string index_endpoint = 1; - * - * @return The bytes for indexEndpoint. - */ - public com.google.protobuf.ByteString getIndexEndpointBytes() { - java.lang.Object ref = indexEndpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - indexEndpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The resource name of the Index Endpoint.
-       * Format:
-       * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-       * 
- * - * string index_endpoint = 1; - * - * @param value The indexEndpoint to set. - * @return This builder for chaining. - */ - public Builder setIndexEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - indexEndpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The resource name of the Index Endpoint.
-       * Format:
-       * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-       * 
- * - * string index_endpoint = 1; - * - * @return This builder for chaining. - */ - public Builder clearIndexEndpoint() { - indexEndpoint_ = getDefaultInstance().getIndexEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * The resource name of the Index Endpoint.
-       * Format:
-       * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
-       * 
- * - * string index_endpoint = 1; - * - * @param value The bytes for indexEndpoint to set. - * @return This builder for chaining. - */ - public Builder setIndexEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - indexEndpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object index_ = ""; - - /** - * - * - *
-       * The resource name of the Index.
-       * Format:
-       * `projects/{project}/locations/{location}/indexes/{index}`
-       * 
- * - * string index = 2; - * - * @return The index. - */ - public java.lang.String getIndex() { - java.lang.Object ref = index_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - index_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The resource name of the Index.
-       * Format:
-       * `projects/{project}/locations/{location}/indexes/{index}`
-       * 
- * - * string index = 2; - * - * @return The bytes for index. - */ - public com.google.protobuf.ByteString getIndexBytes() { - java.lang.Object ref = index_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - index_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The resource name of the Index.
-       * Format:
-       * `projects/{project}/locations/{location}/indexes/{index}`
-       * 
- * - * string index = 2; - * - * @param value The index to set. - * @return This builder for chaining. - */ - public Builder setIndex(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - index_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * The resource name of the Index.
-       * Format:
-       * `projects/{project}/locations/{location}/indexes/{index}`
-       * 
- * - * string index = 2; - * - * @return This builder for chaining. - */ - public Builder clearIndex() { - index_ = getDefaultInstance().getIndex(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * The resource name of the Index.
-       * Format:
-       * `projects/{project}/locations/{location}/indexes/{index}`
-       * 
- * - * string index = 2; - * - * @param value The bytes for index to set. - * @return This builder for chaining. - */ - public Builder setIndexBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - index_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VertexVectorSearch 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.vertexai.api.RagVectorDbConfig.VertexVectorSearch - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - private int vectorDbCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object vectorDb_; - - public enum VectorDbCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RAG_MANAGED_DB(1), - PINECONE(3), - VERTEX_VECTOR_SEARCH(6), - VECTORDB_NOT_SET(0); - private final int value; - - private VectorDbCase(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 VectorDbCase valueOf(int value) { - return forNumber(value); - } - - public static VectorDbCase forNumber(int value) { - switch (value) { - case 1: - return RAG_MANAGED_DB; - case 3: - return PINECONE; - case 6: - return VERTEX_VECTOR_SEARCH; - case 0: - return VECTORDB_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VectorDbCase getVectorDbCase() { - return VectorDbCase.forNumber(vectorDbCase_); - } - - public static final int RAG_MANAGED_DB_FIELD_NUMBER = 1; - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return Whether the ragManagedDb field is set. - */ - @java.lang.Override - public boolean hasRagManagedDb() { - return vectorDbCase_ == 1; - } - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return The ragManagedDb. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb getRagManagedDb() { - if (vectorDbCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder - getRagManagedDbOrBuilder() { - if (vectorDbCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - - public static final int PINECONE_FIELD_NUMBER = 3; - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return Whether the pinecone field is set. - */ - @java.lang.Override - public boolean hasPinecone() { - return vectorDbCase_ == 3; - } - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return The pinecone. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone getPinecone() { - if (vectorDbCase_ == 3) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder getPineconeOrBuilder() { - if (vectorDbCase_ == 3) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - - public static final int VERTEX_VECTOR_SEARCH_FIELD_NUMBER = 6; - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return Whether the vertexVectorSearch field is set. - */ - @java.lang.Override - public boolean hasVertexVectorSearch() { - return vectorDbCase_ == 6; - } - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return The vertexVectorSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - getVertexVectorSearch() { - if (vectorDbCase_ == 6) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.getDefaultInstance(); - } - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder - getVertexVectorSearchOrBuilder() { - if (vectorDbCase_ == 6) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.getDefaultInstance(); - } - - public static final int API_AUTH_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.ApiAuth apiAuth_; - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return Whether the apiAuth field is set. - */ - @java.lang.Override - public boolean hasApiAuth() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return The apiAuth. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth getApiAuth() { - return apiAuth_ == null ? com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance() : apiAuth_; - } - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuthOrBuilder getApiAuthOrBuilder() { - return apiAuth_ == null ? com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance() : apiAuth_; - } - - public static final int RAG_EMBEDDING_MODEL_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.RagEmbeddingModelConfig ragEmbeddingModelConfig_; - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the ragEmbeddingModelConfig field is set. - */ - @java.lang.Override - public boolean hasRagEmbeddingModelConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The ragEmbeddingModelConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig getRagEmbeddingModelConfig() { - return ragEmbeddingModelConfig_ == null - ? com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance() - : ragEmbeddingModelConfig_; - } - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder - getRagEmbeddingModelConfigOrBuilder() { - return ragEmbeddingModelConfig_ == null - ? com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance() - : ragEmbeddingModelConfig_; - } - - 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 (vectorDbCase_ == 1) { - output.writeMessage( - 1, (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_); - } - if (vectorDbCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getApiAuth()); - } - if (vectorDbCase_ == 6) { - output.writeMessage( - 6, (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getRagEmbeddingModelConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (vectorDbCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_); - } - if (vectorDbCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getApiAuth()); - } - if (vectorDbCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRagEmbeddingModelConfig()); - } - 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.vertexai.api.RagVectorDbConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RagVectorDbConfig other = - (com.google.cloud.vertexai.api.RagVectorDbConfig) obj; - - if (hasApiAuth() != other.hasApiAuth()) return false; - if (hasApiAuth()) { - if (!getApiAuth().equals(other.getApiAuth())) return false; - } - if (hasRagEmbeddingModelConfig() != other.hasRagEmbeddingModelConfig()) return false; - if (hasRagEmbeddingModelConfig()) { - if (!getRagEmbeddingModelConfig().equals(other.getRagEmbeddingModelConfig())) return false; - } - if (!getVectorDbCase().equals(other.getVectorDbCase())) return false; - switch (vectorDbCase_) { - case 1: - if (!getRagManagedDb().equals(other.getRagManagedDb())) return false; - break; - case 3: - if (!getPinecone().equals(other.getPinecone())) return false; - break; - case 6: - if (!getVertexVectorSearch().equals(other.getVertexVectorSearch())) 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 (hasApiAuth()) { - hash = (37 * hash) + API_AUTH_FIELD_NUMBER; - hash = (53 * hash) + getApiAuth().hashCode(); - } - if (hasRagEmbeddingModelConfig()) { - hash = (37 * hash) + RAG_EMBEDDING_MODEL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagEmbeddingModelConfig().hashCode(); - } - switch (vectorDbCase_) { - case 1: - hash = (37 * hash) + RAG_MANAGED_DB_FIELD_NUMBER; - hash = (53 * hash) + getRagManagedDb().hashCode(); - break; - case 3: - hash = (37 * hash) + PINECONE_FIELD_NUMBER; - hash = (53 * hash) + getPinecone().hashCode(); - break; - case 6: - hash = (37 * hash) + VERTEX_VECTOR_SEARCH_FIELD_NUMBER; - hash = (53 * hash) + getVertexVectorSearch().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig 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.vertexai.api.RagVectorDbConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig 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.vertexai.api.RagVectorDbConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RagVectorDbConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for the Vector DB to use for RAG.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RagVectorDbConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RagVectorDbConfig) - com.google.cloud.vertexai.api.RagVectorDbConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RagVectorDbConfig.class, - com.google.cloud.vertexai.api.RagVectorDbConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RagVectorDbConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetApiAuthFieldBuilder(); - internalGetRagEmbeddingModelConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (ragManagedDbBuilder_ != null) { - ragManagedDbBuilder_.clear(); - } - if (pineconeBuilder_ != null) { - pineconeBuilder_.clear(); - } - if (vertexVectorSearchBuilder_ != null) { - vertexVectorSearchBuilder_.clear(); - } - apiAuth_ = null; - if (apiAuthBuilder_ != null) { - apiAuthBuilder_.dispose(); - apiAuthBuilder_ = null; - } - ragEmbeddingModelConfig_ = null; - if (ragEmbeddingModelConfigBuilder_ != null) { - ragEmbeddingModelConfigBuilder_.dispose(); - ragEmbeddingModelConfigBuilder_ = null; - } - vectorDbCase_ = 0; - vectorDb_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig build() { - com.google.cloud.vertexai.api.RagVectorDbConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig buildPartial() { - com.google.cloud.vertexai.api.RagVectorDbConfig result = - new com.google.cloud.vertexai.api.RagVectorDbConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RagVectorDbConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.apiAuth_ = apiAuthBuilder_ == null ? apiAuth_ : apiAuthBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.ragEmbeddingModelConfig_ = - ragEmbeddingModelConfigBuilder_ == null - ? ragEmbeddingModelConfig_ - : ragEmbeddingModelConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.RagVectorDbConfig result) { - result.vectorDbCase_ = vectorDbCase_; - result.vectorDb_ = this.vectorDb_; - if (vectorDbCase_ == 1 && ragManagedDbBuilder_ != null) { - result.vectorDb_ = ragManagedDbBuilder_.build(); - } - if (vectorDbCase_ == 3 && pineconeBuilder_ != null) { - result.vectorDb_ = pineconeBuilder_.build(); - } - if (vectorDbCase_ == 6 && vertexVectorSearchBuilder_ != null) { - result.vectorDb_ = vertexVectorSearchBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RagVectorDbConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RagVectorDbConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RagVectorDbConfig other) { - if (other == com.google.cloud.vertexai.api.RagVectorDbConfig.getDefaultInstance()) - return this; - if (other.hasApiAuth()) { - mergeApiAuth(other.getApiAuth()); - } - if (other.hasRagEmbeddingModelConfig()) { - mergeRagEmbeddingModelConfig(other.getRagEmbeddingModelConfig()); - } - switch (other.getVectorDbCase()) { - case RAG_MANAGED_DB: - { - mergeRagManagedDb(other.getRagManagedDb()); - break; - } - case PINECONE: - { - mergePinecone(other.getPinecone()); - break; - } - case VERTEX_VECTOR_SEARCH: - { - mergeVertexVectorSearch(other.getVertexVectorSearch()); - break; - } - case VECTORDB_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( - internalGetRagManagedDbFieldBuilder().getBuilder(), extensionRegistry); - vectorDbCase_ = 1; - break; - } // case 10 - case 26: - { - input.readMessage( - internalGetPineconeFieldBuilder().getBuilder(), extensionRegistry); - vectorDbCase_ = 3; - break; - } // case 26 - case 42: - { - input.readMessage(internalGetApiAuthFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetVertexVectorSearchFieldBuilder().getBuilder(), extensionRegistry); - vectorDbCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetRagEmbeddingModelConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000010; - 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 vectorDbCase_ = 0; - private java.lang.Object vectorDb_; - - public VectorDbCase getVectorDbCase() { - return VectorDbCase.forNumber(vectorDbCase_); - } - - public Builder clearVectorDb() { - vectorDbCase_ = 0; - vectorDb_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder> - ragManagedDbBuilder_; - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return Whether the ragManagedDb field is set. - */ - @java.lang.Override - public boolean hasRagManagedDb() { - return vectorDbCase_ == 1; - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return The ragManagedDb. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb getRagManagedDb() { - if (ragManagedDbBuilder_ == null) { - if (vectorDbCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } else { - if (vectorDbCase_ == 1) { - return ragManagedDbBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - public Builder setRagManagedDb( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb value) { - if (ragManagedDbBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - vectorDb_ = value; - onChanged(); - } else { - ragManagedDbBuilder_.setMessage(value); - } - vectorDbCase_ = 1; - return this; - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - public Builder setRagManagedDb( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder builderForValue) { - if (ragManagedDbBuilder_ == null) { - vectorDb_ = builderForValue.build(); - onChanged(); - } else { - ragManagedDbBuilder_.setMessage(builderForValue.build()); - } - vectorDbCase_ = 1; - return this; - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - public Builder mergeRagManagedDb( - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb value) { - if (ragManagedDbBuilder_ == null) { - if (vectorDbCase_ == 1 - && vectorDb_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb - .getDefaultInstance()) { - vectorDb_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_) - .mergeFrom(value) - .buildPartial(); - } else { - vectorDb_ = value; - } - onChanged(); - } else { - if (vectorDbCase_ == 1) { - ragManagedDbBuilder_.mergeFrom(value); - } else { - ragManagedDbBuilder_.setMessage(value); - } - } - vectorDbCase_ = 1; - return this; - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - public Builder clearRagManagedDb() { - if (ragManagedDbBuilder_ == null) { - if (vectorDbCase_ == 1) { - vectorDbCase_ = 0; - vectorDb_ = null; - onChanged(); - } - } else { - if (vectorDbCase_ == 1) { - vectorDbCase_ = 0; - vectorDb_ = null; - } - ragManagedDbBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder - getRagManagedDbBuilder() { - return internalGetRagManagedDbFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder - getRagManagedDbOrBuilder() { - if ((vectorDbCase_ == 1) && (ragManagedDbBuilder_ != null)) { - return ragManagedDbBuilder_.getMessageOrBuilder(); - } else { - if (vectorDbCase_ == 1) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the RAG-managed Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder> - internalGetRagManagedDbFieldBuilder() { - if (ragManagedDbBuilder_ == null) { - if (!(vectorDbCase_ == 1)) { - vectorDb_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.getDefaultInstance(); - } - ragManagedDbBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb) vectorDb_, - getParentForChildren(), - isClean()); - vectorDb_ = null; - } - vectorDbCase_ = 1; - onChanged(); - return ragManagedDbBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone, - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder> - pineconeBuilder_; - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return Whether the pinecone field is set. - */ - @java.lang.Override - public boolean hasPinecone() { - return vectorDbCase_ == 3; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return The pinecone. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone getPinecone() { - if (pineconeBuilder_ == null) { - if (vectorDbCase_ == 3) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } else { - if (vectorDbCase_ == 3) { - return pineconeBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - public Builder setPinecone(com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone value) { - if (pineconeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - vectorDb_ = value; - onChanged(); - } else { - pineconeBuilder_.setMessage(value); - } - vectorDbCase_ = 3; - return this; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - public Builder setPinecone( - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder builderForValue) { - if (pineconeBuilder_ == null) { - vectorDb_ = builderForValue.build(); - onChanged(); - } else { - pineconeBuilder_.setMessage(builderForValue.build()); - } - vectorDbCase_ = 3; - return this; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - public Builder mergePinecone(com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone value) { - if (pineconeBuilder_ == null) { - if (vectorDbCase_ == 3 - && vectorDb_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance()) { - vectorDb_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_) - .mergeFrom(value) - .buildPartial(); - } else { - vectorDb_ = value; - } - onChanged(); - } else { - if (vectorDbCase_ == 3) { - pineconeBuilder_.mergeFrom(value); - } else { - pineconeBuilder_.setMessage(value); - } - } - vectorDbCase_ = 3; - return this; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - public Builder clearPinecone() { - if (pineconeBuilder_ == null) { - if (vectorDbCase_ == 3) { - vectorDbCase_ = 0; - vectorDb_ = null; - onChanged(); - } - } else { - if (vectorDbCase_ == 3) { - vectorDbCase_ = 0; - vectorDb_ = null; - } - pineconeBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder getPineconeBuilder() { - return internalGetPineconeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder - getPineconeOrBuilder() { - if ((vectorDbCase_ == 3) && (pineconeBuilder_ != null)) { - return pineconeBuilder_.getMessageOrBuilder(); - } else { - if (vectorDbCase_ == 3) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the Pinecone.
-     * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone, - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder> - internalGetPineconeFieldBuilder() { - if (pineconeBuilder_ == null) { - if (!(vectorDbCase_ == 3)) { - vectorDb_ = com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.getDefaultInstance(); - } - pineconeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone, - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone) vectorDb_, - getParentForChildren(), - isClean()); - vectorDb_ = null; - } - vectorDbCase_ = 3; - onChanged(); - return pineconeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder> - vertexVectorSearchBuilder_; - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return Whether the vertexVectorSearch field is set. - */ - @java.lang.Override - public boolean hasVertexVectorSearch() { - return vectorDbCase_ == 6; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return The vertexVectorSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - getVertexVectorSearch() { - if (vertexVectorSearchBuilder_ == null) { - if (vectorDbCase_ == 6) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance(); - } else { - if (vectorDbCase_ == 6) { - return vertexVectorSearchBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - public Builder setVertexVectorSearch( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch value) { - if (vertexVectorSearchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - vectorDb_ = value; - onChanged(); - } else { - vertexVectorSearchBuilder_.setMessage(value); - } - vectorDbCase_ = 6; - return this; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - public Builder setVertexVectorSearch( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder - builderForValue) { - if (vertexVectorSearchBuilder_ == null) { - vectorDb_ = builderForValue.build(); - onChanged(); - } else { - vertexVectorSearchBuilder_.setMessage(builderForValue.build()); - } - vectorDbCase_ = 6; - return this; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - public Builder mergeVertexVectorSearch( - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch value) { - if (vertexVectorSearchBuilder_ == null) { - if (vectorDbCase_ == 6 - && vectorDb_ - != com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance()) { - vectorDb_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.newBuilder( - (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) - vectorDb_) - .mergeFrom(value) - .buildPartial(); - } else { - vectorDb_ = value; - } - onChanged(); - } else { - if (vectorDbCase_ == 6) { - vertexVectorSearchBuilder_.mergeFrom(value); - } else { - vertexVectorSearchBuilder_.setMessage(value); - } - } - vectorDbCase_ = 6; - return this; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - public Builder clearVertexVectorSearch() { - if (vertexVectorSearchBuilder_ == null) { - if (vectorDbCase_ == 6) { - vectorDbCase_ = 0; - vectorDb_ = null; - onChanged(); - } - } else { - if (vectorDbCase_ == 6) { - vectorDbCase_ = 0; - vectorDb_ = null; - } - vertexVectorSearchBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder - getVertexVectorSearchBuilder() { - return internalGetVertexVectorSearchFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder - getVertexVectorSearchOrBuilder() { - if ((vectorDbCase_ == 6) && (vertexVectorSearchBuilder_ != null)) { - return vertexVectorSearchBuilder_.getMessageOrBuilder(); - } else { - if (vectorDbCase_ == 6) { - return (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_; - } - return com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * The config for the Vertex Vector Search.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder> - internalGetVertexVectorSearchFieldBuilder() { - if (vertexVectorSearchBuilder_ == null) { - if (!(vectorDbCase_ == 6)) { - vectorDb_ = - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch - .getDefaultInstance(); - } - vertexVectorSearchBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch.Builder, - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder>( - (com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch) vectorDb_, - getParentForChildren(), - isClean()); - vectorDb_ = null; - } - vectorDbCase_ = 6; - onChanged(); - return vertexVectorSearchBuilder_; - } - - private com.google.cloud.vertexai.api.ApiAuth apiAuth_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth, - com.google.cloud.vertexai.api.ApiAuth.Builder, - com.google.cloud.vertexai.api.ApiAuthOrBuilder> - apiAuthBuilder_; - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return Whether the apiAuth field is set. - */ - public boolean hasApiAuth() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return The apiAuth. - */ - public com.google.cloud.vertexai.api.ApiAuth getApiAuth() { - if (apiAuthBuilder_ == null) { - return apiAuth_ == null - ? com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance() - : apiAuth_; - } else { - return apiAuthBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public Builder setApiAuth(com.google.cloud.vertexai.api.ApiAuth value) { - if (apiAuthBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiAuth_ = value; - } else { - apiAuthBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public Builder setApiAuth(com.google.cloud.vertexai.api.ApiAuth.Builder builderForValue) { - if (apiAuthBuilder_ == null) { - apiAuth_ = builderForValue.build(); - } else { - apiAuthBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public Builder mergeApiAuth(com.google.cloud.vertexai.api.ApiAuth value) { - if (apiAuthBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && apiAuth_ != null - && apiAuth_ != com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance()) { - getApiAuthBuilder().mergeFrom(value); - } else { - apiAuth_ = value; - } - } else { - apiAuthBuilder_.mergeFrom(value); - } - if (apiAuth_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public Builder clearApiAuth() { - bitField0_ = (bitField0_ & ~0x00000008); - apiAuth_ = null; - if (apiAuthBuilder_ != null) { - apiAuthBuilder_.dispose(); - apiAuthBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public com.google.cloud.vertexai.api.ApiAuth.Builder getApiAuthBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetApiAuthFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - public com.google.cloud.vertexai.api.ApiAuthOrBuilder getApiAuthOrBuilder() { - if (apiAuthBuilder_ != null) { - return apiAuthBuilder_.getMessageOrBuilder(); - } else { - return apiAuth_ == null - ? com.google.cloud.vertexai.api.ApiAuth.getDefaultInstance() - : apiAuth_; - } - } - - /** - * - * - *
-     * Authentication config for the chosen Vector DB.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth, - com.google.cloud.vertexai.api.ApiAuth.Builder, - com.google.cloud.vertexai.api.ApiAuthOrBuilder> - internalGetApiAuthFieldBuilder() { - if (apiAuthBuilder_ == null) { - apiAuthBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth, - com.google.cloud.vertexai.api.ApiAuth.Builder, - com.google.cloud.vertexai.api.ApiAuthOrBuilder>( - getApiAuth(), getParentForChildren(), isClean()); - apiAuth_ = null; - } - return apiAuthBuilder_; - } - - private com.google.cloud.vertexai.api.RagEmbeddingModelConfig ragEmbeddingModelConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder> - ragEmbeddingModelConfigBuilder_; - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the ragEmbeddingModelConfig field is set. - */ - public boolean hasRagEmbeddingModelConfig() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The ragEmbeddingModelConfig. - */ - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig getRagEmbeddingModelConfig() { - if (ragEmbeddingModelConfigBuilder_ == null) { - return ragEmbeddingModelConfig_ == null - ? com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance() - : ragEmbeddingModelConfig_; - } else { - return ragEmbeddingModelConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setRagEmbeddingModelConfig( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig value) { - if (ragEmbeddingModelConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragEmbeddingModelConfig_ = value; - } else { - ragEmbeddingModelConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder setRagEmbeddingModelConfig( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder builderForValue) { - if (ragEmbeddingModelConfigBuilder_ == null) { - ragEmbeddingModelConfig_ = builderForValue.build(); - } else { - ragEmbeddingModelConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder mergeRagEmbeddingModelConfig( - com.google.cloud.vertexai.api.RagEmbeddingModelConfig value) { - if (ragEmbeddingModelConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && ragEmbeddingModelConfig_ != null - && ragEmbeddingModelConfig_ - != com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance()) { - getRagEmbeddingModelConfigBuilder().mergeFrom(value); - } else { - ragEmbeddingModelConfig_ = value; - } - } else { - ragEmbeddingModelConfigBuilder_.mergeFrom(value); - } - if (ragEmbeddingModelConfig_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public Builder clearRagEmbeddingModelConfig() { - bitField0_ = (bitField0_ & ~0x00000010); - ragEmbeddingModelConfig_ = null; - if (ragEmbeddingModelConfigBuilder_ != null) { - ragEmbeddingModelConfigBuilder_.dispose(); - ragEmbeddingModelConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder - getRagEmbeddingModelConfigBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetRagEmbeddingModelConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - public com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder - getRagEmbeddingModelConfigOrBuilder() { - if (ragEmbeddingModelConfigBuilder_ != null) { - return ragEmbeddingModelConfigBuilder_.getMessageOrBuilder(); - } else { - return ragEmbeddingModelConfig_ == null - ? com.google.cloud.vertexai.api.RagEmbeddingModelConfig.getDefaultInstance() - : ragEmbeddingModelConfig_; - } - } - - /** - * - * - *
-     * Optional. Immutable. The embedding model config of the Vector DB.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder> - internalGetRagEmbeddingModelConfigFieldBuilder() { - if (ragEmbeddingModelConfigBuilder_ == null) { - ragEmbeddingModelConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagEmbeddingModelConfig, - com.google.cloud.vertexai.api.RagEmbeddingModelConfig.Builder, - com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder>( - getRagEmbeddingModelConfig(), getParentForChildren(), isClean()); - ragEmbeddingModelConfig_ = null; - } - return ragEmbeddingModelConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RagVectorDbConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RagVectorDbConfig) - private static final com.google.cloud.vertexai.api.RagVectorDbConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RagVectorDbConfig(); - } - - public static com.google.cloud.vertexai.api.RagVectorDbConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagVectorDbConfig 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.vertexai.api.RagVectorDbConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfigOrBuilder.java deleted file mode 100644 index 0de64a5b9d1b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RagVectorDbConfigOrBuilder.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RagVectorDbConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RagVectorDbConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return Whether the ragManagedDb field is set. - */ - boolean hasRagManagedDb(); - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - * - * @return The ragManagedDb. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDb getRagManagedDb(); - - /** - * - * - *
-   * The config for the RAG-managed Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.RagManagedDbOrBuilder getRagManagedDbOrBuilder(); - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return Whether the pinecone field is set. - */ - boolean hasPinecone(); - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - * - * @return The pinecone. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.Pinecone getPinecone(); - - /** - * - * - *
-   * The config for the Pinecone.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.Pinecone pinecone = 3; - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.PineconeOrBuilder getPineconeOrBuilder(); - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return Whether the vertexVectorSearch field is set. - */ - boolean hasVertexVectorSearch(); - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - * - * @return The vertexVectorSearch. - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearch getVertexVectorSearch(); - - /** - * - * - *
-   * The config for the Vertex Vector Search.
-   * 
- * - * .google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; - * - */ - com.google.cloud.vertexai.api.RagVectorDbConfig.VertexVectorSearchOrBuilder - getVertexVectorSearchOrBuilder(); - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return Whether the apiAuth field is set. - */ - boolean hasApiAuth(); - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - * - * @return The apiAuth. - */ - com.google.cloud.vertexai.api.ApiAuth getApiAuth(); - - /** - * - * - *
-   * Authentication config for the chosen Vector DB.
-   * 
- * - * .google.cloud.vertexai.v1.ApiAuth api_auth = 5; - */ - com.google.cloud.vertexai.api.ApiAuthOrBuilder getApiAuthOrBuilder(); - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return Whether the ragEmbeddingModelConfig field is set. - */ - boolean hasRagEmbeddingModelConfig(); - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The ragEmbeddingModelConfig. - */ - com.google.cloud.vertexai.api.RagEmbeddingModelConfig getRagEmbeddingModelConfig(); - - /** - * - * - *
-   * Optional. Immutable. The embedding model config of the Vector DB.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * - */ - com.google.cloud.vertexai.api.RagEmbeddingModelConfigOrBuilder - getRagEmbeddingModelConfigOrBuilder(); - - com.google.cloud.vertexai.api.RagVectorDbConfig.VectorDbCase getVectorDbCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java deleted file mode 100644 index 9bacc2a868f6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java +++ /dev/null @@ -1,1077 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RawPredictRequest} - */ -@com.google.protobuf.Generated -public final class RawPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RawPredictRequest) - RawPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RawPredictRequest"); - } - - // Use RawPredictRequest.newBuilder() to construct. - private RawPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RawPredictRequest() { - endpoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_RawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RawPredictRequest.class, - com.google.cloud.vertexai.api.RawPredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HTTP_BODY_FIELD_NUMBER = 2; - private com.google.api.HttpBody httpBody_; - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - @java.lang.Override - public boolean hasHttpBody() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - @java.lang.Override - public com.google.api.HttpBody getHttpBody() { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - */ - @java.lang.Override - public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getHttpBody()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); - } - 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.vertexai.api.RawPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RawPredictRequest other = - (com.google.cloud.vertexai.api.RawPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (hasHttpBody() != other.hasHttpBody()) return false; - if (hasHttpBody()) { - if (!getHttpBody().equals(other.getHttpBody())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (hasHttpBody()) { - hash = (37 * hash) + HTTP_BODY_FIELD_NUMBER; - hash = (53 * hash) + getHttpBody().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest 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.vertexai.api.RawPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest 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.vertexai.api.RawPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RawPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RawPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RawPredictRequest) - com.google.cloud.vertexai.api.RawPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_RawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RawPredictRequest.class, - com.google.cloud.vertexai.api.RawPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RawPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetHttpBodyFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - httpBody_ = null; - if (httpBodyBuilder_ != null) { - httpBodyBuilder_.dispose(); - httpBodyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RawPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RawPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RawPredictRequest build() { - com.google.cloud.vertexai.api.RawPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RawPredictRequest buildPartial() { - com.google.cloud.vertexai.api.RawPredictRequest result = - new com.google.cloud.vertexai.api.RawPredictRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RawPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RawPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.RawPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RawPredictRequest other) { - if (other == com.google.cloud.vertexai.api.RawPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasHttpBody()) { - mergeHttpBody(other.getHttpBody()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetHttpBodyFieldBuilder().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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.api.HttpBody httpBody_; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder> - httpBodyBuilder_; - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - public boolean hasHttpBody() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - public com.google.api.HttpBody getHttpBody() { - if (httpBodyBuilder_ == null) { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } else { - return httpBodyBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder setHttpBody(com.google.api.HttpBody value) { - if (httpBodyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - httpBody_ = value; - } else { - httpBodyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder setHttpBody(com.google.api.HttpBody.Builder builderForValue) { - if (httpBodyBuilder_ == null) { - httpBody_ = builderForValue.build(); - } else { - httpBodyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder mergeHttpBody(com.google.api.HttpBody value) { - if (httpBodyBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && httpBody_ != null - && httpBody_ != com.google.api.HttpBody.getDefaultInstance()) { - getHttpBodyBuilder().mergeFrom(value); - } else { - httpBody_ = value; - } - } else { - httpBodyBuilder_.mergeFrom(value); - } - if (httpBody_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder clearHttpBody() { - bitField0_ = (bitField0_ & ~0x00000002); - httpBody_ = null; - if (httpBodyBuilder_ != null) { - httpBodyBuilder_.dispose(); - httpBodyBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public com.google.api.HttpBody.Builder getHttpBodyBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetHttpBodyFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { - if (httpBodyBuilder_ != null) { - return httpBodyBuilder_.getMessageOrBuilder(); - } else { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     *
-     * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-     * upper limit on the number of instances it supports per request. When this
-     * limit it is exceeded for an AutoML model, the
-     * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-     * method returns an error. When this limit is exceeded for a custom-trained
-     * model, the behavior varies depending on the model.
-     *
-     * You can specify the schema for each instance in the
-     * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-     * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-     * schema applies when you deploy the `Model` as a `DeployedModel` to an
-     * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-     * method.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder> - internalGetHttpBodyFieldBuilder() { - if (httpBodyBuilder_ == null) { - httpBodyBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder>(getHttpBody(), getParentForChildren(), isClean()); - httpBody_ = null; - } - return httpBodyBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RawPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RawPredictRequest) - private static final com.google.cloud.vertexai.api.RawPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RawPredictRequest(); - } - - public static com.google.cloud.vertexai.api.RawPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RawPredictRequest 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.vertexai.api.RawPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java deleted file mode 100644 index 92b29fd2c572..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RawPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RawPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - boolean hasHttpBody(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - com.google.api.HttpBody getHttpBody(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   *
-   * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
-   * upper limit on the number of instances it supports per request. When this
-   * limit it is exceeded for an AutoML model, the
-   * [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
-   * method returns an error. When this limit is exceeded for a custom-trained
-   * model, the behavior varies depending on the model.
-   *
-   * You can specify the schema for each instance in the
-   * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
-   * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
-   * schema applies when you deploy the `Model` as a `DeployedModel` to an
-   * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
-   * method.
-   * 
- * - * .google.api.HttpBody http_body = 2; - */ - com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfig.java deleted file mode 100644 index 79b51e264379..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfig.java +++ /dev/null @@ -1,717 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The configuration for the replicated voice to use.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ReplicatedVoiceConfig} - */ -@com.google.protobuf.Generated -public final class ReplicatedVoiceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ReplicatedVoiceConfig) - ReplicatedVoiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ReplicatedVoiceConfig"); - } - - // Use ReplicatedVoiceConfig.newBuilder() to construct. - private ReplicatedVoiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ReplicatedVoiceConfig() { - mimeType_ = ""; - voiceSampleAudio_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.class, - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder.class); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object mimeType_ = ""; - - /** - * - * - *
-   * Optional. The mimetype of the voice sample. The only currently supported
-   * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-   * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-   * set.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. The mimetype of the voice sample. The only currently supported
-   * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-   * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-   * set.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - public static final int VOICE_SAMPLE_AUDIO_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString voiceSampleAudio_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Optional. The sample of the custom voice.
-   * 
- * - * bytes voice_sample_audio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The voiceSampleAudio. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVoiceSampleAudio() { - return voiceSampleAudio_; - } - - 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.GeneratedMessage.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); - } - if (!voiceSampleAudio_.isEmpty()) { - output.writeBytes(2, voiceSampleAudio_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); - } - if (!voiceSampleAudio_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, voiceSampleAudio_); - } - 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.vertexai.api.ReplicatedVoiceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ReplicatedVoiceConfig other = - (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) obj; - - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getVoiceSampleAudio().equals(other.getVoiceSampleAudio())) 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) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + VOICE_SAMPLE_AUDIO_FIELD_NUMBER; - hash = (53 * hash) + getVoiceSampleAudio().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig 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.vertexai.api.ReplicatedVoiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig 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.vertexai.api.ReplicatedVoiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ReplicatedVoiceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The configuration for the replicated voice to use.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ReplicatedVoiceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ReplicatedVoiceConfig) - com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.class, - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ReplicatedVoiceConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mimeType_ = ""; - voiceSampleAudio_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_ReplicatedVoiceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig build() { - com.google.cloud.vertexai.api.ReplicatedVoiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig buildPartial() { - com.google.cloud.vertexai.api.ReplicatedVoiceConfig result = - new com.google.cloud.vertexai.api.ReplicatedVoiceConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ReplicatedVoiceConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.mimeType_ = mimeType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.voiceSampleAudio_ = voiceSampleAudio_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ReplicatedVoiceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ReplicatedVoiceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ReplicatedVoiceConfig other) { - if (other == com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance()) - return this; - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getVoiceSampleAudio().isEmpty()) { - setVoiceSampleAudio(other.getVoiceSampleAudio()); - } - 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_ |= 0x00000001; - break; - } // case 10 - case 18: - { - voiceSampleAudio_ = input.readBytes(); - 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 mimeType_ = ""; - - /** - * - * - *
-     * Optional. The mimetype of the voice sample. The only currently supported
-     * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-     * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-     * set.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The mimetype of the voice sample. The only currently supported
-     * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-     * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-     * set.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The mimetype of the voice sample. The only currently supported
-     * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-     * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-     * set.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The mimetype of the voice sample. The only currently supported
-     * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-     * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-     * set.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The mimetype of the voice sample. The only currently supported
-     * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-     * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-     * set.
-     * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString voiceSampleAudio_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Optional. The sample of the custom voice.
-     * 
- * - * bytes voice_sample_audio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The voiceSampleAudio. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVoiceSampleAudio() { - return voiceSampleAudio_; - } - - /** - * - * - *
-     * Optional. The sample of the custom voice.
-     * 
- * - * bytes voice_sample_audio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The voiceSampleAudio to set. - * @return This builder for chaining. - */ - public Builder setVoiceSampleAudio(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - voiceSampleAudio_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The sample of the custom voice.
-     * 
- * - * bytes voice_sample_audio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVoiceSampleAudio() { - bitField0_ = (bitField0_ & ~0x00000002); - voiceSampleAudio_ = getDefaultInstance().getVoiceSampleAudio(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ReplicatedVoiceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ReplicatedVoiceConfig) - private static final com.google.cloud.vertexai.api.ReplicatedVoiceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ReplicatedVoiceConfig(); - } - - public static com.google.cloud.vertexai.api.ReplicatedVoiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReplicatedVoiceConfig 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.vertexai.api.ReplicatedVoiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfigOrBuilder.java deleted file mode 100644 index 93efb3e06e4a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReplicatedVoiceConfigOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ReplicatedVoiceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ReplicatedVoiceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The mimetype of the voice sample. The only currently supported
-   * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-   * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-   * set.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - - /** - * - * - *
-   * Optional. The mimetype of the voice sample. The only currently supported
-   * value is `audio/wav`. This represents 16-bit signed little-endian wav data,
-   * with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not
-   * set.
-   * 
- * - * string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Optional. The sample of the custom voice.
-   * 
- * - * bytes voice_sample_audio = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The voiceSampleAudio. - */ - com.google.protobuf.ByteString getVoiceSampleAudio(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinity.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinity.java deleted file mode 100644 index 2e9ac18112a4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinity.java +++ /dev/null @@ -1,1323 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/reservation_affinity.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
- * DeployedModel) to draw its Compute Engine resources from a Shared
- * Reservation, or exclusively from on-demand capacity.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ReservationAffinity} - */ -@com.google.protobuf.Generated -public final class ReservationAffinity extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ReservationAffinity) - ReservationAffinityOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ReservationAffinity"); - } - - // Use ReservationAffinity.newBuilder() to construct. - private ReservationAffinity(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ReservationAffinity() { - reservationAffinityType_ = 0; - key_ = ""; - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ReservationAffinityProto - .internal_static_google_cloud_vertexai_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ReservationAffinityProto - .internal_static_google_cloud_vertexai_v1_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ReservationAffinity.class, - com.google.cloud.vertexai.api.ReservationAffinity.Builder.class); - } - - /** - * - * - *
-   * Identifies a type of reservation affinity.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.ReservationAffinity.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default value. This should not be used.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Do not consume from any reserved capacity, only use on-demand.
-     * 
- * - * NO_RESERVATION = 1; - */ - NO_RESERVATION(1), - /** - * - * - *
-     * Consume any reservation available, falling back to on-demand.
-     * 
- * - * ANY_RESERVATION = 2; - */ - ANY_RESERVATION(2), - /** - * - * - *
-     * Consume from a specific reservation. When chosen, the reservation
-     * must be identified via the `key` and `values` fields.
-     * 
- * - * SPECIFIC_RESERVATION = 3; - */ - SPECIFIC_RESERVATION(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Type"); - } - - /** - * - * - *
-     * Default value. This should not be used.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Do not consume from any reserved capacity, only use on-demand.
-     * 
- * - * NO_RESERVATION = 1; - */ - public static final int NO_RESERVATION_VALUE = 1; - - /** - * - * - *
-     * Consume any reservation available, falling back to on-demand.
-     * 
- * - * ANY_RESERVATION = 2; - */ - public static final int ANY_RESERVATION_VALUE = 2; - - /** - * - * - *
-     * Consume from a specific reservation. When chosen, the reservation
-     * must be identified via the `key` and `values` fields.
-     * 
- * - * SPECIFIC_RESERVATION = 3; - */ - public static final int SPECIFIC_RESERVATION_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 Type 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 Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return NO_RESERVATION; - case 2: - return ANY_RESERVATION; - case 3: - return SPECIFIC_RESERVATION; - 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 Type findValueByNumber(int number) { - return Type.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.ReservationAffinity.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Type[] VALUES = values(); - - public static Type 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 Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.ReservationAffinity.Type) - } - - public static final int RESERVATION_AFFINITY_TYPE_FIELD_NUMBER = 1; - private int reservationAffinityType_ = 0; - - /** - * - * - *
-   * Required. Specifies the reservation affinity type.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for reservationAffinityType. - */ - @java.lang.Override - public int getReservationAffinityTypeValue() { - return reservationAffinityType_; - } - - /** - * - * - *
-   * Required. Specifies the reservation affinity type.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The reservationAffinityType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity.Type getReservationAffinityType() { - com.google.cloud.vertexai.api.ReservationAffinity.Type result = - com.google.cloud.vertexai.api.ReservationAffinity.Type.forNumber(reservationAffinityType_); - return result == null - ? com.google.cloud.vertexai.api.ReservationAffinity.Type.UNRECOGNIZED - : result; - } - - public static final int KEY_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object key_ = ""; - - /** - * - * - *
-   * Optional. Corresponds to the label key of a reservation resource. To target
-   * a SPECIFIC_RESERVATION by name, use
-   * `compute.googleapis.com/reservation-name` as the key and specify the name
-   * of your reservation as its value.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. Corresponds to the label key of a reservation resource. To target
-   * a SPECIFIC_RESERVATION by name, use
-   * `compute.googleapis.com/reservation-name` as the key and specify the name
-   * of your reservation as its value.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList values_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_; - } - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.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 (reservationAffinityType_ - != com.google.cloud.vertexai.api.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, reservationAffinityType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); - } - for (int i = 0; i < values_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, values_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (reservationAffinityType_ - != com.google.cloud.vertexai.api.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, reservationAffinityType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); - } - { - int dataSize = 0; - for (int i = 0; i < values_.size(); i++) { - dataSize += computeStringSizeNoTag(values_.getRaw(i)); - } - size += dataSize; - size += 1 * getValuesList().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.vertexai.api.ReservationAffinity)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ReservationAffinity other = - (com.google.cloud.vertexai.api.ReservationAffinity) obj; - - if (reservationAffinityType_ != other.reservationAffinityType_) return false; - if (!getKey().equals(other.getKey())) return false; - 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(); - hash = (37 * hash) + RESERVATION_AFFINITY_TYPE_FIELD_NUMBER; - hash = (53 * hash) + reservationAffinityType_; - 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 = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity 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.vertexai.api.ReservationAffinity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity 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.vertexai.api.ReservationAffinity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ReservationAffinity 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
-   * DeployedModel) to draw its Compute Engine resources from a Shared
-   * Reservation, or exclusively from on-demand capacity.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ReservationAffinity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ReservationAffinity) - com.google.cloud.vertexai.api.ReservationAffinityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ReservationAffinityProto - .internal_static_google_cloud_vertexai_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ReservationAffinityProto - .internal_static_google_cloud_vertexai_v1_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ReservationAffinity.class, - com.google.cloud.vertexai.api.ReservationAffinity.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ReservationAffinity.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - reservationAffinityType_ = 0; - key_ = ""; - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ReservationAffinityProto - .internal_static_google_cloud_vertexai_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity build() { - com.google.cloud.vertexai.api.ReservationAffinity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity buildPartial() { - com.google.cloud.vertexai.api.ReservationAffinity result = - new com.google.cloud.vertexai.api.ReservationAffinity(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ReservationAffinity result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.reservationAffinityType_ = reservationAffinityType_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.key_ = key_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ReservationAffinity) { - return mergeFrom((com.google.cloud.vertexai.api.ReservationAffinity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ReservationAffinity other) { - if (other == com.google.cloud.vertexai.api.ReservationAffinity.getDefaultInstance()) - return this; - if (other.reservationAffinityType_ != 0) { - setReservationAffinityTypeValue(other.getReservationAffinityTypeValue()); - } - if (!other.getKey().isEmpty()) { - key_ = other.key_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ |= 0x00000004; - } 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 8: - { - reservationAffinityType_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - key_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureValuesIsMutable(); - values_.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 int reservationAffinityType_ = 0; - - /** - * - * - *
-     * Required. Specifies the reservation affinity type.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for reservationAffinityType. - */ - @java.lang.Override - public int getReservationAffinityTypeValue() { - return reservationAffinityType_; - } - - /** - * - * - *
-     * Required. Specifies the reservation affinity type.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for reservationAffinityType to set. - * @return This builder for chaining. - */ - public Builder setReservationAffinityTypeValue(int value) { - reservationAffinityType_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Specifies the reservation affinity type.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The reservationAffinityType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReservationAffinity.Type getReservationAffinityType() { - com.google.cloud.vertexai.api.ReservationAffinity.Type result = - com.google.cloud.vertexai.api.ReservationAffinity.Type.forNumber( - reservationAffinityType_); - return result == null - ? com.google.cloud.vertexai.api.ReservationAffinity.Type.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Required. Specifies the reservation affinity type.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The reservationAffinityType to set. - * @return This builder for chaining. - */ - public Builder setReservationAffinityType( - com.google.cloud.vertexai.api.ReservationAffinity.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - reservationAffinityType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Specifies the reservation affinity type.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearReservationAffinityType() { - bitField0_ = (bitField0_ & ~0x00000001); - reservationAffinityType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object key_ = ""; - - /** - * - * - *
-     * Optional. Corresponds to the label key of a reservation resource. To target
-     * a SPECIFIC_RESERVATION by name, use
-     * `compute.googleapis.com/reservation-name` as the key and specify the name
-     * of your reservation as its value.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Corresponds to the label key of a reservation resource. To target
-     * a SPECIFIC_RESERVATION by name, use
-     * `compute.googleapis.com/reservation-name` as the key and specify the name
-     * of your reservation as its value.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Corresponds to the label key of a reservation resource. To target
-     * a SPECIFIC_RESERVATION by name, use
-     * `compute.googleapis.com/reservation-name` as the key and specify the name
-     * of your reservation as its value.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label key of a reservation resource. To target
-     * a SPECIFIC_RESERVATION by name, use
-     * `compute.googleapis.com/reservation-name` as the key and specify the name
-     * of your reservation as its value.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKey() { - key_ = getDefaultInstance().getKey(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label key of a reservation resource. To target
-     * a SPECIFIC_RESERVATION by name, use
-     * `compute.googleapis.com/reservation-name` as the key and specify the name
-     * of your reservation as its value.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList values_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureValuesIsMutable() { - if (!values_.isModifiable()) { - values_ = new com.google.protobuf.LazyStringArrayList(values_); - } - bitField0_ |= 0x00000004; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @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_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Corresponds to the label values of a reservation resource. This
-     * must be the full resource name of the reservation.
-     * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes of the values to add. - * @return This builder for chaining. - */ - public Builder addValuesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureValuesIsMutable(); - values_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ReservationAffinity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ReservationAffinity) - private static final com.google.cloud.vertexai.api.ReservationAffinity DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ReservationAffinity(); - } - - public static com.google.cloud.vertexai.api.ReservationAffinity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReservationAffinity 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.vertexai.api.ReservationAffinity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityOrBuilder.java deleted file mode 100644 index ec59a40ed467..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/reservation_affinity.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ReservationAffinityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ReservationAffinity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Specifies the reservation affinity type.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for reservationAffinityType. - */ - int getReservationAffinityTypeValue(); - - /** - * - * - *
-   * Required. Specifies the reservation affinity type.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The reservationAffinityType. - */ - com.google.cloud.vertexai.api.ReservationAffinity.Type getReservationAffinityType(); - - /** - * - * - *
-   * Optional. Corresponds to the label key of a reservation resource. To target
-   * a SPECIFIC_RESERVATION by name, use
-   * `compute.googleapis.com/reservation-name` as the key and specify the name
-   * of your reservation as its value.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The key. - */ - java.lang.String getKey(); - - /** - * - * - *
-   * Optional. Corresponds to the label key of a reservation resource. To target
-   * a SPECIFIC_RESERVATION by name, use
-   * `compute.googleapis.com/reservation-name` as the key and specify the name
-   * of your reservation as its value.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for key. - */ - com.google.protobuf.ByteString getKeyBytes(); - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - java.lang.String getValues(int index); - - /** - * - * - *
-   * Optional. Corresponds to the label values of a reservation resource. This
-   * must be the full resource name of the reservation.
-   * 
- * - * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - com.google.protobuf.ByteString getValuesBytes(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityProto.java deleted file mode 100644 index d90262100180..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ReservationAffinityProto.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/reservation_affinity.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ReservationAffinityProto extends com.google.protobuf.GeneratedFile { - private ReservationAffinityProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ReservationAffinityProto"); - } - - 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_vertexai_v1_ReservationAffinity_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ReservationAffinity_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/vertexai/v1/reservation_a" - + "ffinity.proto\022\030google.cloud.vertexai.v1\032" - + "\037google/api/field_behavior.proto\032\031google" - + "/api/resource.proto\"\240\002\n\023ReservationAffin" - + "ity\022Z\n\031reservation_affinity_type\030\001 \001(\01622" - + ".google.cloud.vertexai.v1.ReservationAff" - + "inity.TypeB\003\340A\002\022\020\n\003key\030\002 \001(\tB\003\340A\001\022:\n\006val" - + "ues\030\003 \003(\tB*\340A\001\372A$\n\"compute.googleapis.co" - + "m/Reservation\"_\n\004Type\022\024\n\020TYPE_UNSPECIFIE" - + "D\020\000\022\022\n\016NO_RESERVATION\020\001\022\023\n\017ANY_RESERVATI" - + "ON\020\002\022\030\n\024SPECIFIC_RESERVATION\020\003B\312\002\n\035com.g" - + "oogle.cloud.vertexai.apiB\030ReservationAff" - + "inityProtoP\001Z>cloud.google.com/go/aiplat" - + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" - + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" - + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" - + "rm::V1\352Ar\n\"compute.googleapis.com/Reserv" - + "ation\022Lprojects/{project_id_or_number}/z" - + "ones/{zone}/reservations/{reservation_na" - + "me}b\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_cloud_vertexai_v1_ReservationAffinity_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_ReservationAffinity_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ReservationAffinity_descriptor, - new java.lang.String[] { - "ReservationAffinityType", "Key", "Values", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java deleted file mode 100644 index b34df0fa4259..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Statistics information about resource consumption.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ResourcesConsumed} - */ -@com.google.protobuf.Generated -public final class ResourcesConsumed extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ResourcesConsumed) - ResourcesConsumedOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ResourcesConsumed"); - } - - // Use ResourcesConsumed.newBuilder() to construct. - private ResourcesConsumed(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ResourcesConsumed() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ResourcesConsumed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ResourcesConsumed.class, - com.google.cloud.vertexai.api.ResourcesConsumed.Builder.class); - } - - public static final int REPLICA_HOURS_FIELD_NUMBER = 1; - private double replicaHours_ = 0D; - - /** - * - * - *
-   * Output only. The number of replica hours used. Note that many replicas may
-   * run in parallel, and additionally any given work may be queued for some
-   * time. Therefore this value is not strictly related to wall time.
-   * 
- * - * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The replicaHours. - */ - @java.lang.Override - public double getReplicaHours() { - return replicaHours_; - } - - 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 (java.lang.Double.doubleToRawLongBits(replicaHours_) != 0) { - output.writeDouble(1, replicaHours_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(replicaHours_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, replicaHours_); - } - 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.vertexai.api.ResourcesConsumed)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ResourcesConsumed other = - (com.google.cloud.vertexai.api.ResourcesConsumed) obj; - - if (java.lang.Double.doubleToLongBits(getReplicaHours()) - != java.lang.Double.doubleToLongBits(other.getReplicaHours())) 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) + REPLICA_HOURS_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getReplicaHours())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed 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.vertexai.api.ResourcesConsumed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed 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.vertexai.api.ResourcesConsumed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ResourcesConsumed 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Statistics information about resource consumption.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ResourcesConsumed} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ResourcesConsumed) - com.google.cloud.vertexai.api.ResourcesConsumedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ResourcesConsumed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ResourcesConsumed.class, - com.google.cloud.vertexai.api.ResourcesConsumed.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ResourcesConsumed.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - replicaHours_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ResourcesConsumed_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ResourcesConsumed getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ResourcesConsumed.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ResourcesConsumed build() { - com.google.cloud.vertexai.api.ResourcesConsumed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ResourcesConsumed buildPartial() { - com.google.cloud.vertexai.api.ResourcesConsumed result = - new com.google.cloud.vertexai.api.ResourcesConsumed(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ResourcesConsumed result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.replicaHours_ = replicaHours_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ResourcesConsumed) { - return mergeFrom((com.google.cloud.vertexai.api.ResourcesConsumed) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ResourcesConsumed other) { - if (other == com.google.cloud.vertexai.api.ResourcesConsumed.getDefaultInstance()) - return this; - if (java.lang.Double.doubleToRawLongBits(other.getReplicaHours()) != 0) { - setReplicaHours(other.getReplicaHours()); - } - 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: - { - replicaHours_ = input.readDouble(); - bitField0_ |= 0x00000001; - break; - } // case 9 - 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 double replicaHours_; - - /** - * - * - *
-     * Output only. The number of replica hours used. Note that many replicas may
-     * run in parallel, and additionally any given work may be queued for some
-     * time. Therefore this value is not strictly related to wall time.
-     * 
- * - * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The replicaHours. - */ - @java.lang.Override - public double getReplicaHours() { - return replicaHours_; - } - - /** - * - * - *
-     * Output only. The number of replica hours used. Note that many replicas may
-     * run in parallel, and additionally any given work may be queued for some
-     * time. Therefore this value is not strictly related to wall time.
-     * 
- * - * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The replicaHours to set. - * @return This builder for chaining. - */ - public Builder setReplicaHours(double value) { - - replicaHours_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The number of replica hours used. Note that many replicas may
-     * run in parallel, and additionally any given work may be queued for some
-     * time. Therefore this value is not strictly related to wall time.
-     * 
- * - * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearReplicaHours() { - bitField0_ = (bitField0_ & ~0x00000001); - replicaHours_ = 0D; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ResourcesConsumed) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ResourcesConsumed) - private static final com.google.cloud.vertexai.api.ResourcesConsumed DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ResourcesConsumed(); - } - - public static com.google.cloud.vertexai.api.ResourcesConsumed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourcesConsumed 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.vertexai.api.ResourcesConsumed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java deleted file mode 100644 index b8b973fae4eb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ResourcesConsumedOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ResourcesConsumed) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The number of replica hours used. Note that many replicas may
-   * run in parallel, and additionally any given work may be queued for some
-   * time. Therefore this value is not strictly related to wall time.
-   * 
- * - * double replica_hours = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The replicaHours. - */ - double getReplicaHours(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Retrieval.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Retrieval.java deleted file mode 100644 index d2f1dc1f6097..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Retrieval.java +++ /dev/null @@ -1,1230 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Defines a retrieval tool that model can call to access external knowledge.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Retrieval} - */ -@com.google.protobuf.Generated -public final class Retrieval extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Retrieval) - RetrievalOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Retrieval"); - } - - // Use Retrieval.newBuilder() to construct. - private Retrieval(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Retrieval() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Retrieval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Retrieval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Retrieval.class, - com.google.cloud.vertexai.api.Retrieval.Builder.class); - } - - 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 { - VERTEX_AI_SEARCH(2), - VERTEX_RAG_STORE(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 VERTEX_AI_SEARCH; - case 4: - return VERTEX_RAG_STORE; - 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 VERTEX_AI_SEARCH_FIELD_NUMBER = 2; - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return Whether the vertexAiSearch field is set. - */ - @java.lang.Override - public boolean hasVertexAiSearch() { - return sourceCase_ == 2; - } - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return The vertexAiSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch getVertexAiSearch() { - if (sourceCase_ == 2) { - return (com.google.cloud.vertexai.api.VertexAISearch) source_; - } - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearchOrBuilder getVertexAiSearchOrBuilder() { - if (sourceCase_ == 2) { - return (com.google.cloud.vertexai.api.VertexAISearch) source_; - } - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - - public static final int VERTEX_RAG_STORE_FIELD_NUMBER = 4; - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return Whether the vertexRagStore field is set. - */ - @java.lang.Override - public boolean hasVertexRagStore() { - return sourceCase_ == 4; - } - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return The vertexRagStore. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore getVertexRagStore() { - if (sourceCase_ == 4) { - return (com.google.cloud.vertexai.api.VertexRagStore) source_; - } - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStoreOrBuilder getVertexRagStoreOrBuilder() { - if (sourceCase_ == 4) { - return (com.google.cloud.vertexai.api.VertexRagStore) source_; - } - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - - public static final int DISABLE_ATTRIBUTION_FIELD_NUMBER = 3; - private boolean disableAttribution_ = false; - - /** - * - * - *
-   * Optional. Deprecated. This option is no longer supported.
-   * 
- * - * - * bool disable_attribution = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.Retrieval.disable_attribution is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=426 - * @return The disableAttribution. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean getDisableAttribution() { - return disableAttribution_; - } - - 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 (sourceCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.VertexAISearch) source_); - } - if (disableAttribution_ != false) { - output.writeBool(3, disableAttribution_); - } - if (sourceCase_ == 4) { - output.writeMessage(4, (com.google.cloud.vertexai.api.VertexRagStore) source_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.VertexAISearch) source_); - } - if (disableAttribution_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, disableAttribution_); - } - if (sourceCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.vertexai.api.VertexRagStore) source_); - } - 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.vertexai.api.Retrieval)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Retrieval other = (com.google.cloud.vertexai.api.Retrieval) obj; - - if (getDisableAttribution() != other.getDisableAttribution()) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 2: - if (!getVertexAiSearch().equals(other.getVertexAiSearch())) return false; - break; - case 4: - if (!getVertexRagStore().equals(other.getVertexRagStore())) 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) + DISABLE_ATTRIBUTION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAttribution()); - switch (sourceCase_) { - case 2: - hash = (37 * hash) + VERTEX_AI_SEARCH_FIELD_NUMBER; - hash = (53 * hash) + getVertexAiSearch().hashCode(); - break; - case 4: - hash = (37 * hash) + VERTEX_RAG_STORE_FIELD_NUMBER; - hash = (53 * hash) + getVertexRagStore().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Retrieval 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.vertexai.api.Retrieval parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Retrieval 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.vertexai.api.Retrieval parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Retrieval parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Retrieval parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Retrieval parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Retrieval 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Defines a retrieval tool that model can call to access external knowledge.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Retrieval} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Retrieval) - com.google.cloud.vertexai.api.RetrievalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Retrieval_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Retrieval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Retrieval.class, - com.google.cloud.vertexai.api.Retrieval.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Retrieval.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (vertexAiSearchBuilder_ != null) { - vertexAiSearchBuilder_.clear(); - } - if (vertexRagStoreBuilder_ != null) { - vertexRagStoreBuilder_.clear(); - } - disableAttribution_ = false; - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Retrieval_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Retrieval getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Retrieval.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Retrieval build() { - com.google.cloud.vertexai.api.Retrieval result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Retrieval buildPartial() { - com.google.cloud.vertexai.api.Retrieval result = - new com.google.cloud.vertexai.api.Retrieval(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Retrieval result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.disableAttribution_ = disableAttribution_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.Retrieval result) { - result.sourceCase_ = sourceCase_; - result.source_ = this.source_; - if (sourceCase_ == 2 && vertexAiSearchBuilder_ != null) { - result.source_ = vertexAiSearchBuilder_.build(); - } - if (sourceCase_ == 4 && vertexRagStoreBuilder_ != null) { - result.source_ = vertexRagStoreBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Retrieval) { - return mergeFrom((com.google.cloud.vertexai.api.Retrieval) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Retrieval other) { - if (other == com.google.cloud.vertexai.api.Retrieval.getDefaultInstance()) return this; - if (other.getDisableAttribution() != false) { - setDisableAttribution(other.getDisableAttribution()); - } - switch (other.getSourceCase()) { - case VERTEX_AI_SEARCH: - { - mergeVertexAiSearch(other.getVertexAiSearch()); - break; - } - case VERTEX_RAG_STORE: - { - mergeVertexRagStore(other.getVertexRagStore()); - 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 18: - { - input.readMessage( - internalGetVertexAiSearchFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 2; - break; - } // case 18 - case 24: - { - disableAttribution_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - input.readMessage( - internalGetVertexRagStoreFieldBuilder().getBuilder(), extensionRegistry); - sourceCase_ = 4; - 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 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.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch, - com.google.cloud.vertexai.api.VertexAISearch.Builder, - com.google.cloud.vertexai.api.VertexAISearchOrBuilder> - vertexAiSearchBuilder_; - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return Whether the vertexAiSearch field is set. - */ - @java.lang.Override - public boolean hasVertexAiSearch() { - return sourceCase_ == 2; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return The vertexAiSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch getVertexAiSearch() { - if (vertexAiSearchBuilder_ == null) { - if (sourceCase_ == 2) { - return (com.google.cloud.vertexai.api.VertexAISearch) source_; - } - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } else { - if (sourceCase_ == 2) { - return vertexAiSearchBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - public Builder setVertexAiSearch(com.google.cloud.vertexai.api.VertexAISearch value) { - if (vertexAiSearchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - vertexAiSearchBuilder_.setMessage(value); - } - sourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - public Builder setVertexAiSearch( - com.google.cloud.vertexai.api.VertexAISearch.Builder builderForValue) { - if (vertexAiSearchBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - vertexAiSearchBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - public Builder mergeVertexAiSearch(com.google.cloud.vertexai.api.VertexAISearch value) { - if (vertexAiSearchBuilder_ == null) { - if (sourceCase_ == 2 - && source_ != com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance()) { - source_ = - com.google.cloud.vertexai.api.VertexAISearch.newBuilder( - (com.google.cloud.vertexai.api.VertexAISearch) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 2) { - vertexAiSearchBuilder_.mergeFrom(value); - } else { - vertexAiSearchBuilder_.setMessage(value); - } - } - sourceCase_ = 2; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - public Builder clearVertexAiSearch() { - if (vertexAiSearchBuilder_ == null) { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - } - vertexAiSearchBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - public com.google.cloud.vertexai.api.VertexAISearch.Builder getVertexAiSearchBuilder() { - return internalGetVertexAiSearchFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearchOrBuilder getVertexAiSearchOrBuilder() { - if ((sourceCase_ == 2) && (vertexAiSearchBuilder_ != null)) { - return vertexAiSearchBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 2) { - return (com.google.cloud.vertexai.api.VertexAISearch) source_; - } - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Set to use data source powered by Vertex AI Search.
-     * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch, - com.google.cloud.vertexai.api.VertexAISearch.Builder, - com.google.cloud.vertexai.api.VertexAISearchOrBuilder> - internalGetVertexAiSearchFieldBuilder() { - if (vertexAiSearchBuilder_ == null) { - if (!(sourceCase_ == 2)) { - source_ = com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - vertexAiSearchBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch, - com.google.cloud.vertexai.api.VertexAISearch.Builder, - com.google.cloud.vertexai.api.VertexAISearchOrBuilder>( - (com.google.cloud.vertexai.api.VertexAISearch) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 2; - onChanged(); - return vertexAiSearchBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore, - com.google.cloud.vertexai.api.VertexRagStore.Builder, - com.google.cloud.vertexai.api.VertexRagStoreOrBuilder> - vertexRagStoreBuilder_; - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return Whether the vertexRagStore field is set. - */ - @java.lang.Override - public boolean hasVertexRagStore() { - return sourceCase_ == 4; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return The vertexRagStore. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore getVertexRagStore() { - if (vertexRagStoreBuilder_ == null) { - if (sourceCase_ == 4) { - return (com.google.cloud.vertexai.api.VertexRagStore) source_; - } - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } else { - if (sourceCase_ == 4) { - return vertexRagStoreBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - public Builder setVertexRagStore(com.google.cloud.vertexai.api.VertexRagStore value) { - if (vertexRagStoreBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - vertexRagStoreBuilder_.setMessage(value); - } - sourceCase_ = 4; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - public Builder setVertexRagStore( - com.google.cloud.vertexai.api.VertexRagStore.Builder builderForValue) { - if (vertexRagStoreBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - vertexRagStoreBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 4; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - public Builder mergeVertexRagStore(com.google.cloud.vertexai.api.VertexRagStore value) { - if (vertexRagStoreBuilder_ == null) { - if (sourceCase_ == 4 - && source_ != com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance()) { - source_ = - com.google.cloud.vertexai.api.VertexRagStore.newBuilder( - (com.google.cloud.vertexai.api.VertexRagStore) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 4) { - vertexRagStoreBuilder_.mergeFrom(value); - } else { - vertexRagStoreBuilder_.setMessage(value); - } - } - sourceCase_ = 4; - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - public Builder clearVertexRagStore() { - if (vertexRagStoreBuilder_ == null) { - if (sourceCase_ == 4) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 4) { - sourceCase_ = 0; - source_ = null; - } - vertexRagStoreBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - public com.google.cloud.vertexai.api.VertexRagStore.Builder getVertexRagStoreBuilder() { - return internalGetVertexRagStoreFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStoreOrBuilder getVertexRagStoreOrBuilder() { - if ((sourceCase_ == 4) && (vertexRagStoreBuilder_ != null)) { - return vertexRagStoreBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 4) { - return (com.google.cloud.vertexai.api.VertexRagStore) source_; - } - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Set to use data source powered by Vertex RAG store.
-     * User data is uploaded via the VertexRagDataService.
-     * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore, - com.google.cloud.vertexai.api.VertexRagStore.Builder, - com.google.cloud.vertexai.api.VertexRagStoreOrBuilder> - internalGetVertexRagStoreFieldBuilder() { - if (vertexRagStoreBuilder_ == null) { - if (!(sourceCase_ == 4)) { - source_ = com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - vertexRagStoreBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore, - com.google.cloud.vertexai.api.VertexRagStore.Builder, - com.google.cloud.vertexai.api.VertexRagStoreOrBuilder>( - (com.google.cloud.vertexai.api.VertexRagStore) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 4; - onChanged(); - return vertexRagStoreBuilder_; - } - - private boolean disableAttribution_; - - /** - * - * - *
-     * Optional. Deprecated. This option is no longer supported.
-     * 
- * - * - * bool disable_attribution = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.Retrieval.disable_attribution is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=426 - * @return The disableAttribution. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean getDisableAttribution() { - return disableAttribution_; - } - - /** - * - * - *
-     * Optional. Deprecated. This option is no longer supported.
-     * 
- * - * - * bool disable_attribution = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.Retrieval.disable_attribution is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=426 - * @param value The disableAttribution to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setDisableAttribution(boolean value) { - - disableAttribution_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Deprecated. This option is no longer supported.
-     * 
- * - * - * bool disable_attribution = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.Retrieval.disable_attribution is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=426 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearDisableAttribution() { - bitField0_ = (bitField0_ & ~0x00000004); - disableAttribution_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Retrieval) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Retrieval) - private static final com.google.cloud.vertexai.api.Retrieval DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Retrieval(); - } - - public static com.google.cloud.vertexai.api.Retrieval getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Retrieval 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.vertexai.api.Retrieval getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfig.java deleted file mode 100644 index b75e00b5da7b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfig.java +++ /dev/null @@ -1,910 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Retrieval config.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RetrievalConfig} - */ -@com.google.protobuf.Generated -public final class RetrievalConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RetrievalConfig) - RetrievalConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RetrievalConfig"); - } - - // Use RetrievalConfig.newBuilder() to construct. - private RetrievalConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RetrievalConfig() { - languageCode_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RetrievalConfig.class, - com.google.cloud.vertexai.api.RetrievalConfig.Builder.class); - } - - private int bitField0_; - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @return Whether the languageCode field is set. - */ - @java.lang.Override - public boolean hasLanguageCode() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @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; - } - } - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getLatLng()); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, languageCode_); - } - 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.computeMessageSize(1, getLatLng()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, 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.vertexai.api.RetrievalConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RetrievalConfig other = - (com.google.cloud.vertexai.api.RetrievalConfig) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng().equals(other.getLatLng())) return false; - } - if (hasLanguageCode() != other.hasLanguageCode()) return false; - if (hasLanguageCode()) { - 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(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - if (hasLanguageCode()) { - 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.vertexai.api.RetrievalConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig 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.vertexai.api.RetrievalConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig 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.vertexai.api.RetrievalConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RetrievalConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Retrieval config.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RetrievalConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RetrievalConfig) - com.google.cloud.vertexai.api.RetrievalConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RetrievalConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RetrievalConfig.class, - com.google.cloud.vertexai.api.RetrievalConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RetrievalConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetLatLngFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - latLng_ = null; - if (latLngBuilder_ != null) { - latLngBuilder_.dispose(); - latLngBuilder_ = null; - } - languageCode_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalConfig build() { - com.google.cloud.vertexai.api.RetrievalConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalConfig buildPartial() { - com.google.cloud.vertexai.api.RetrievalConfig result = - new com.google.cloud.vertexai.api.RetrievalConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RetrievalConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.latLng_ = latLngBuilder_ == null ? latLng_ : latLngBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.languageCode_ = languageCode_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RetrievalConfig) { - return mergeFrom((com.google.cloud.vertexai.api.RetrievalConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RetrievalConfig other) { - if (other == com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - if (other.hasLanguageCode()) { - languageCode_ = other.languageCode_; - 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: - { - input.readMessage(internalGetLatLngFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - languageCode_ = 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.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilder< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - latLngBuilder_; - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - } else { - latLngBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && latLng_ != null - && latLng_ != com.google.type.LatLng.getDefaultInstance()) { - getLatLngBuilder().mergeFrom(value); - } else { - latLng_ = value; - } - } else { - latLngBuilder_.mergeFrom(value); - } - if (latLng_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - bitField0_ = (bitField0_ & ~0x00000001); - latLng_ = null; - if (latLngBuilder_ != null) { - latLngBuilder_.dispose(); - latLngBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetLatLngFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - - /** - * - * - *
-     * The location of the user.
-     * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - internalGetLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.type.LatLng, - com.google.type.LatLng.Builder, - com.google.type.LatLngOrBuilder>(getLatLng(), getParentForChildren(), isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - - private java.lang.Object languageCode_ = ""; - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @return Whether the languageCode field is set. - */ - public boolean hasLanguageCode() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @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; - } - } - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @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; - } - } - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * The language code of the user.
-     * 
- * - * optional string language_code = 2; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RetrievalConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RetrievalConfig) - private static final com.google.cloud.vertexai.api.RetrievalConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RetrievalConfig(); - } - - public static com.google.cloud.vertexai.api.RetrievalConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RetrievalConfig 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.vertexai.api.RetrievalConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfigOrBuilder.java deleted file mode 100644 index 7e809bfd055b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalConfigOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RetrievalConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RetrievalConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - * - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - - /** - * - * - *
-   * The location of the user.
-   * 
- * - * optional .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @return Whether the languageCode field is set. - */ - boolean hasLanguageCode(); - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - - /** - * - * - *
-   * The language code of the user.
-   * 
- * - * optional string language_code = 2; - * - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString getLanguageCodeBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadata.java deleted file mode 100644 index 2c4d6932c3da..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadata.java +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Metadata related to retrieval in the grounding flow.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RetrievalMetadata} - */ -@com.google.protobuf.Generated -public final class RetrievalMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.RetrievalMetadata) - RetrievalMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RetrievalMetadata"); - } - - // Use RetrievalMetadata.newBuilder() to construct. - private RetrievalMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RetrievalMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_RetrievalMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_RetrievalMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RetrievalMetadata.class, - com.google.cloud.vertexai.api.RetrievalMetadata.Builder.class); - } - - public static final int GOOGLE_SEARCH_DYNAMIC_RETRIEVAL_SCORE_FIELD_NUMBER = 2; - private float googleSearchDynamicRetrievalScore_ = 0F; - - /** - * - * - *
-   * Optional. Score indicating how likely information from Google Search could
-   * help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
-   * least likely and 1 is the most likely. This score is only populated when
-   * Google Search grounding and dynamic retrieval is enabled. It will be
-   * compared to the threshold to determine whether to trigger Google Search.
-   * 
- * - * - * float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchDynamicRetrievalScore. - */ - @java.lang.Override - public float getGoogleSearchDynamicRetrievalScore() { - return googleSearchDynamicRetrievalScore_; - } - - 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 (java.lang.Float.floatToRawIntBits(googleSearchDynamicRetrievalScore_) != 0) { - output.writeFloat(2, googleSearchDynamicRetrievalScore_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(googleSearchDynamicRetrievalScore_) != 0) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 2, googleSearchDynamicRetrievalScore_); - } - 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.vertexai.api.RetrievalMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.RetrievalMetadata other = - (com.google.cloud.vertexai.api.RetrievalMetadata) obj; - - if (java.lang.Float.floatToIntBits(getGoogleSearchDynamicRetrievalScore()) - != java.lang.Float.floatToIntBits(other.getGoogleSearchDynamicRetrievalScore())) - 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) + GOOGLE_SEARCH_DYNAMIC_RETRIEVAL_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getGoogleSearchDynamicRetrievalScore()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata 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.vertexai.api.RetrievalMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata 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.vertexai.api.RetrievalMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.RetrievalMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Metadata related to retrieval in the grounding flow.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.RetrievalMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.RetrievalMetadata) - com.google.cloud.vertexai.api.RetrievalMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_RetrievalMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_RetrievalMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.RetrievalMetadata.class, - com.google.cloud.vertexai.api.RetrievalMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.RetrievalMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - googleSearchDynamicRetrievalScore_ = 0F; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_RetrievalMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalMetadata build() { - com.google.cloud.vertexai.api.RetrievalMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalMetadata buildPartial() { - com.google.cloud.vertexai.api.RetrievalMetadata result = - new com.google.cloud.vertexai.api.RetrievalMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.RetrievalMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.googleSearchDynamicRetrievalScore_ = googleSearchDynamicRetrievalScore_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.RetrievalMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.RetrievalMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.RetrievalMetadata other) { - if (other == com.google.cloud.vertexai.api.RetrievalMetadata.getDefaultInstance()) - return this; - if (java.lang.Float.floatToRawIntBits(other.getGoogleSearchDynamicRetrievalScore()) != 0) { - setGoogleSearchDynamicRetrievalScore(other.getGoogleSearchDynamicRetrievalScore()); - } - 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 21: - { - googleSearchDynamicRetrievalScore_ = input.readFloat(); - bitField0_ |= 0x00000001; - 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 float googleSearchDynamicRetrievalScore_; - - /** - * - * - *
-     * Optional. Score indicating how likely information from Google Search could
-     * help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
-     * least likely and 1 is the most likely. This score is only populated when
-     * Google Search grounding and dynamic retrieval is enabled. It will be
-     * compared to the threshold to determine whether to trigger Google Search.
-     * 
- * - * - * float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchDynamicRetrievalScore. - */ - @java.lang.Override - public float getGoogleSearchDynamicRetrievalScore() { - return googleSearchDynamicRetrievalScore_; - } - - /** - * - * - *
-     * Optional. Score indicating how likely information from Google Search could
-     * help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
-     * least likely and 1 is the most likely. This score is only populated when
-     * Google Search grounding and dynamic retrieval is enabled. It will be
-     * compared to the threshold to determine whether to trigger Google Search.
-     * 
- * - * - * float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The googleSearchDynamicRetrievalScore to set. - * @return This builder for chaining. - */ - public Builder setGoogleSearchDynamicRetrievalScore(float value) { - - googleSearchDynamicRetrievalScore_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Score indicating how likely information from Google Search could
-     * help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
-     * least likely and 1 is the most likely. This score is only populated when
-     * Google Search grounding and dynamic retrieval is enabled. It will be
-     * compared to the threshold to determine whether to trigger Google Search.
-     * 
- * - * - * float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearGoogleSearchDynamicRetrievalScore() { - bitField0_ = (bitField0_ & ~0x00000001); - googleSearchDynamicRetrievalScore_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.RetrievalMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.RetrievalMetadata) - private static final com.google.cloud.vertexai.api.RetrievalMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.RetrievalMetadata(); - } - - public static com.google.cloud.vertexai.api.RetrievalMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RetrievalMetadata 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.vertexai.api.RetrievalMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadataOrBuilder.java deleted file mode 100644 index 2c3e43bbe64c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalMetadataOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RetrievalMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.RetrievalMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Score indicating how likely information from Google Search could
-   * help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
-   * least likely and 1 is the most likely. This score is only populated when
-   * Google Search grounding and dynamic retrieval is enabled. It will be
-   * compared to the threshold to determine whether to trigger Google Search.
-   * 
- * - * - * float google_search_dynamic_retrieval_score = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchDynamicRetrievalScore. - */ - float getGoogleSearchDynamicRetrievalScore(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalOrBuilder.java deleted file mode 100644 index 56541a5cc300..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RetrievalOrBuilder.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface RetrievalOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Retrieval) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return Whether the vertexAiSearch field is set. - */ - boolean hasVertexAiSearch(); - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - * - * @return The vertexAiSearch. - */ - com.google.cloud.vertexai.api.VertexAISearch getVertexAiSearch(); - - /** - * - * - *
-   * Set to use data source powered by Vertex AI Search.
-   * 
- * - * .google.cloud.vertexai.v1.VertexAISearch vertex_ai_search = 2; - */ - com.google.cloud.vertexai.api.VertexAISearchOrBuilder getVertexAiSearchOrBuilder(); - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return Whether the vertexRagStore field is set. - */ - boolean hasVertexRagStore(); - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - * - * @return The vertexRagStore. - */ - com.google.cloud.vertexai.api.VertexRagStore getVertexRagStore(); - - /** - * - * - *
-   * Set to use data source powered by Vertex RAG store.
-   * User data is uploaded via the VertexRagDataService.
-   * 
- * - * .google.cloud.vertexai.v1.VertexRagStore vertex_rag_store = 4; - */ - com.google.cloud.vertexai.api.VertexRagStoreOrBuilder getVertexRagStoreOrBuilder(); - - /** - * - * - *
-   * Optional. Deprecated. This option is no longer supported.
-   * 
- * - * - * bool disable_attribution = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.Retrieval.disable_attribution is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=426 - * @return The disableAttribution. - */ - @java.lang.Deprecated - boolean getDisableAttribution(); - - com.google.cloud.vertexai.api.Retrieval.SourceCase getSourceCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java deleted file mode 100644 index 25855381f458..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java +++ /dev/null @@ -1,1661 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Safety rating corresponding to the generated content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SafetyRating} - */ -@com.google.protobuf.Generated -public final class SafetyRating extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SafetyRating) - SafetyRatingOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SafetyRating"); - } - - // Use SafetyRating.newBuilder() to construct. - private SafetyRating(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SafetyRating() { - category_ = 0; - probability_ = 0; - severity_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetyRating_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetyRating_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SafetyRating.class, - com.google.cloud.vertexai.api.SafetyRating.Builder.class); - } - - /** - * - * - *
-   * Harm probability levels in the content.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.SafetyRating.HarmProbability} - */ - public enum HarmProbability implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Harm probability unspecified.
-     * 
- * - * HARM_PROBABILITY_UNSPECIFIED = 0; - */ - HARM_PROBABILITY_UNSPECIFIED(0), - /** - * - * - *
-     * Negligible level of harm.
-     * 
- * - * NEGLIGIBLE = 1; - */ - NEGLIGIBLE(1), - /** - * - * - *
-     * Low level of harm.
-     * 
- * - * LOW = 2; - */ - LOW(2), - /** - * - * - *
-     * Medium level of harm.
-     * 
- * - * MEDIUM = 3; - */ - MEDIUM(3), - /** - * - * - *
-     * High level of harm.
-     * 
- * - * HIGH = 4; - */ - HIGH(4), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "HarmProbability"); - } - - /** - * - * - *
-     * Harm probability unspecified.
-     * 
- * - * HARM_PROBABILITY_UNSPECIFIED = 0; - */ - public static final int HARM_PROBABILITY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Negligible level of harm.
-     * 
- * - * NEGLIGIBLE = 1; - */ - public static final int NEGLIGIBLE_VALUE = 1; - - /** - * - * - *
-     * Low level of harm.
-     * 
- * - * LOW = 2; - */ - public static final int LOW_VALUE = 2; - - /** - * - * - *
-     * Medium level of harm.
-     * 
- * - * MEDIUM = 3; - */ - public static final int MEDIUM_VALUE = 3; - - /** - * - * - *
-     * High level of harm.
-     * 
- * - * HIGH = 4; - */ - public static final int HIGH_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 HarmProbability 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 HarmProbability forNumber(int value) { - switch (value) { - case 0: - return HARM_PROBABILITY_UNSPECIFIED; - case 1: - return NEGLIGIBLE; - case 2: - return LOW; - case 3: - return MEDIUM; - case 4: - return 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 HarmProbability findValueByNumber(int number) { - return HarmProbability.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.SafetyRating.getDescriptor().getEnumTypes().get(0); - } - - private static final HarmProbability[] VALUES = values(); - - public static HarmProbability 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 HarmProbability(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetyRating.HarmProbability) - } - - /** - * - * - *
-   * Harm severity levels.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.SafetyRating.HarmSeverity} - */ - public enum HarmSeverity implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Harm severity unspecified.
-     * 
- * - * HARM_SEVERITY_UNSPECIFIED = 0; - */ - HARM_SEVERITY_UNSPECIFIED(0), - /** - * - * - *
-     * Negligible level of harm severity.
-     * 
- * - * HARM_SEVERITY_NEGLIGIBLE = 1; - */ - HARM_SEVERITY_NEGLIGIBLE(1), - /** - * - * - *
-     * Low level of harm severity.
-     * 
- * - * HARM_SEVERITY_LOW = 2; - */ - HARM_SEVERITY_LOW(2), - /** - * - * - *
-     * Medium level of harm severity.
-     * 
- * - * HARM_SEVERITY_MEDIUM = 3; - */ - HARM_SEVERITY_MEDIUM(3), - /** - * - * - *
-     * High level of harm severity.
-     * 
- * - * HARM_SEVERITY_HIGH = 4; - */ - HARM_SEVERITY_HIGH(4), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "HarmSeverity"); - } - - /** - * - * - *
-     * Harm severity unspecified.
-     * 
- * - * HARM_SEVERITY_UNSPECIFIED = 0; - */ - public static final int HARM_SEVERITY_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Negligible level of harm severity.
-     * 
- * - * HARM_SEVERITY_NEGLIGIBLE = 1; - */ - public static final int HARM_SEVERITY_NEGLIGIBLE_VALUE = 1; - - /** - * - * - *
-     * Low level of harm severity.
-     * 
- * - * HARM_SEVERITY_LOW = 2; - */ - public static final int HARM_SEVERITY_LOW_VALUE = 2; - - /** - * - * - *
-     * Medium level of harm severity.
-     * 
- * - * HARM_SEVERITY_MEDIUM = 3; - */ - public static final int HARM_SEVERITY_MEDIUM_VALUE = 3; - - /** - * - * - *
-     * High level of harm severity.
-     * 
- * - * HARM_SEVERITY_HIGH = 4; - */ - public static final int HARM_SEVERITY_HIGH_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 HarmSeverity 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 HarmSeverity forNumber(int value) { - switch (value) { - case 0: - return HARM_SEVERITY_UNSPECIFIED; - case 1: - return HARM_SEVERITY_NEGLIGIBLE; - case 2: - return HARM_SEVERITY_LOW; - case 3: - return HARM_SEVERITY_MEDIUM; - case 4: - return HARM_SEVERITY_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 HarmSeverity findValueByNumber(int number) { - return HarmSeverity.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.SafetyRating.getDescriptor().getEnumTypes().get(1); - } - - private static final HarmSeverity[] VALUES = values(); - - public static HarmSeverity 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 HarmSeverity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetyRating.HarmSeverity) - } - - public static final int CATEGORY_FIELD_NUMBER = 1; - private int category_ = 0; - - /** - * - * - *
-   * Output only. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for category. - */ - @java.lang.Override - public int getCategoryValue() { - return category_; - } - - /** - * - * - *
-   * Output only. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The category. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.HarmCategory getCategory() { - com.google.cloud.vertexai.api.HarmCategory result = - com.google.cloud.vertexai.api.HarmCategory.forNumber(category_); - return result == null ? com.google.cloud.vertexai.api.HarmCategory.UNRECOGNIZED : result; - } - - public static final int PROBABILITY_FIELD_NUMBER = 2; - private int probability_ = 0; - - /** - * - * - *
-   * Output only. Harm probability levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for probability. - */ - @java.lang.Override - public int getProbabilityValue() { - return probability_; - } - - /** - * - * - *
-   * Output only. Harm probability levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The probability. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating.HarmProbability getProbability() { - com.google.cloud.vertexai.api.SafetyRating.HarmProbability result = - com.google.cloud.vertexai.api.SafetyRating.HarmProbability.forNumber(probability_); - return result == null - ? com.google.cloud.vertexai.api.SafetyRating.HarmProbability.UNRECOGNIZED - : result; - } - - public static final int PROBABILITY_SCORE_FIELD_NUMBER = 5; - private float probabilityScore_ = 0F; - - /** - * - * - *
-   * Output only. Harm probability score.
-   * 
- * - * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The probabilityScore. - */ - @java.lang.Override - public float getProbabilityScore() { - return probabilityScore_; - } - - public static final int SEVERITY_FIELD_NUMBER = 6; - private int severity_ = 0; - - /** - * - * - *
-   * Output only. Harm severity levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override - public int getSeverityValue() { - return severity_; - } - - /** - * - * - *
-   * Output only. Harm severity levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The severity. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity() { - com.google.cloud.vertexai.api.SafetyRating.HarmSeverity result = - com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.forNumber(severity_); - return result == null - ? com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.UNRECOGNIZED - : result; - } - - public static final int SEVERITY_SCORE_FIELD_NUMBER = 7; - private float severityScore_ = 0F; - - /** - * - * - *
-   * Output only. Harm severity score.
-   * 
- * - * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The severityScore. - */ - @java.lang.Override - public float getSeverityScore() { - return severityScore_; - } - - public static final int BLOCKED_FIELD_NUMBER = 3; - private boolean blocked_ = false; - - /** - * - * - *
-   * Output only. Indicates whether the content was filtered out because of this
-   * rating.
-   * 
- * - * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blocked. - */ - @java.lang.Override - public boolean getBlocked() { - return blocked_; - } - - 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 (category_ - != com.google.cloud.vertexai.api.HarmCategory.HARM_CATEGORY_UNSPECIFIED.getNumber()) { - output.writeEnum(1, category_); - } - if (probability_ - != com.google.cloud.vertexai.api.SafetyRating.HarmProbability.HARM_PROBABILITY_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, probability_); - } - if (blocked_ != false) { - output.writeBool(3, blocked_); - } - if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { - output.writeFloat(5, probabilityScore_); - } - if (severity_ - != com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.HARM_SEVERITY_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, severity_); - } - if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { - output.writeFloat(7, severityScore_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (category_ - != com.google.cloud.vertexai.api.HarmCategory.HARM_CATEGORY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); - } - if (probability_ - != com.google.cloud.vertexai.api.SafetyRating.HarmProbability.HARM_PROBABILITY_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, probability_); - } - if (blocked_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, blocked_); - } - if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, probabilityScore_); - } - if (severity_ - != com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.HARM_SEVERITY_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, severity_); - } - if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, severityScore_); - } - 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.vertexai.api.SafetyRating)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SafetyRating other = - (com.google.cloud.vertexai.api.SafetyRating) obj; - - if (category_ != other.category_) return false; - if (probability_ != other.probability_) return false; - if (java.lang.Float.floatToIntBits(getProbabilityScore()) - != java.lang.Float.floatToIntBits(other.getProbabilityScore())) return false; - if (severity_ != other.severity_) return false; - if (java.lang.Float.floatToIntBits(getSeverityScore()) - != java.lang.Float.floatToIntBits(other.getSeverityScore())) return false; - if (getBlocked() != other.getBlocked()) 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) + CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + category_; - hash = (37 * hash) + PROBABILITY_FIELD_NUMBER; - hash = (53 * hash) + probability_; - hash = (37 * hash) + PROBABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getProbabilityScore()); - hash = (37 * hash) + SEVERITY_FIELD_NUMBER; - hash = (53 * hash) + severity_; - hash = (37 * hash) + SEVERITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getSeverityScore()); - hash = (37 * hash) + BLOCKED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBlocked()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetyRating 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.vertexai.api.SafetyRating parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetyRating 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.vertexai.api.SafetyRating parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetyRating parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SafetyRating 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Safety rating corresponding to the generated content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SafetyRating} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SafetyRating) - com.google.cloud.vertexai.api.SafetyRatingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetyRating_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetyRating_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SafetyRating.class, - com.google.cloud.vertexai.api.SafetyRating.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SafetyRating.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - category_ = 0; - probability_ = 0; - probabilityScore_ = 0F; - severity_ = 0; - severityScore_ = 0F; - blocked_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetyRating_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating build() { - com.google.cloud.vertexai.api.SafetyRating result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating buildPartial() { - com.google.cloud.vertexai.api.SafetyRating result = - new com.google.cloud.vertexai.api.SafetyRating(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SafetyRating result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.category_ = category_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.probability_ = probability_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.probabilityScore_ = probabilityScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.severity_ = severity_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.severityScore_ = severityScore_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.blocked_ = blocked_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SafetyRating) { - return mergeFrom((com.google.cloud.vertexai.api.SafetyRating) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SafetyRating other) { - if (other == com.google.cloud.vertexai.api.SafetyRating.getDefaultInstance()) return this; - if (other.category_ != 0) { - setCategoryValue(other.getCategoryValue()); - } - if (other.probability_ != 0) { - setProbabilityValue(other.getProbabilityValue()); - } - if (java.lang.Float.floatToRawIntBits(other.getProbabilityScore()) != 0) { - setProbabilityScore(other.getProbabilityScore()); - } - if (other.severity_ != 0) { - setSeverityValue(other.getSeverityValue()); - } - if (java.lang.Float.floatToRawIntBits(other.getSeverityScore()) != 0) { - setSeverityScore(other.getSeverityScore()); - } - if (other.getBlocked() != false) { - setBlocked(other.getBlocked()); - } - 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: - { - category_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - probability_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - blocked_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 24 - case 45: - { - probabilityScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 45 - case 48: - { - severity_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 48 - case 61: - { - severityScore_ = input.readFloat(); - bitField0_ |= 0x00000010; - break; - } // case 61 - 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 category_ = 0; - - /** - * - * - *
-     * Output only. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for category. - */ - @java.lang.Override - public int getCategoryValue() { - return category_; - } - - /** - * - * - *
-     * Output only. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for category to set. - * @return This builder for chaining. - */ - public Builder setCategoryValue(int value) { - category_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The category. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.HarmCategory getCategory() { - com.google.cloud.vertexai.api.HarmCategory result = - com.google.cloud.vertexai.api.HarmCategory.forNumber(category_); - return result == null ? com.google.cloud.vertexai.api.HarmCategory.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Output only. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The category to set. - * @return This builder for chaining. - */ - public Builder setCategory(com.google.cloud.vertexai.api.HarmCategory value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - category_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearCategory() { - bitField0_ = (bitField0_ & ~0x00000001); - category_ = 0; - onChanged(); - return this; - } - - private int probability_ = 0; - - /** - * - * - *
-     * Output only. Harm probability levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for probability. - */ - @java.lang.Override - public int getProbabilityValue() { - return probability_; - } - - /** - * - * - *
-     * Output only. Harm probability levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for probability to set. - * @return This builder for chaining. - */ - public Builder setProbabilityValue(int value) { - probability_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm probability levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The probability. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating.HarmProbability getProbability() { - com.google.cloud.vertexai.api.SafetyRating.HarmProbability result = - com.google.cloud.vertexai.api.SafetyRating.HarmProbability.forNumber(probability_); - return result == null - ? com.google.cloud.vertexai.api.SafetyRating.HarmProbability.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. Harm probability levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The probability to set. - * @return This builder for chaining. - */ - public Builder setProbability( - com.google.cloud.vertexai.api.SafetyRating.HarmProbability value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - probability_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm probability levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearProbability() { - bitField0_ = (bitField0_ & ~0x00000002); - probability_ = 0; - onChanged(); - return this; - } - - private float probabilityScore_; - - /** - * - * - *
-     * Output only. Harm probability score.
-     * 
- * - * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The probabilityScore. - */ - @java.lang.Override - public float getProbabilityScore() { - return probabilityScore_; - } - - /** - * - * - *
-     * Output only. Harm probability score.
-     * 
- * - * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The probabilityScore to set. - * @return This builder for chaining. - */ - public Builder setProbabilityScore(float value) { - - probabilityScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm probability score.
-     * 
- * - * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearProbabilityScore() { - bitField0_ = (bitField0_ & ~0x00000004); - probabilityScore_ = 0F; - onChanged(); - return this; - } - - private int severity_ = 0; - - /** - * - * - *
-     * Output only. Harm severity levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for severity. - */ - @java.lang.Override - public int getSeverityValue() { - return severity_; - } - - /** - * - * - *
-     * Output only. Harm severity levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for severity to set. - * @return This builder for chaining. - */ - public Builder setSeverityValue(int value) { - severity_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm severity levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The severity. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity() { - com.google.cloud.vertexai.api.SafetyRating.HarmSeverity result = - com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.forNumber(severity_); - return result == null - ? com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. Harm severity levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The severity to set. - * @return This builder for chaining. - */ - public Builder setSeverity(com.google.cloud.vertexai.api.SafetyRating.HarmSeverity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - severity_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm severity levels in the content.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000008); - severity_ = 0; - onChanged(); - return this; - } - - private float severityScore_; - - /** - * - * - *
-     * Output only. Harm severity score.
-     * 
- * - * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The severityScore. - */ - @java.lang.Override - public float getSeverityScore() { - return severityScore_; - } - - /** - * - * - *
-     * Output only. Harm severity score.
-     * 
- * - * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The severityScore to set. - * @return This builder for chaining. - */ - public Builder setSeverityScore(float value) { - - severityScore_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Harm severity score.
-     * 
- * - * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearSeverityScore() { - bitField0_ = (bitField0_ & ~0x00000010); - severityScore_ = 0F; - onChanged(); - return this; - } - - private boolean blocked_; - - /** - * - * - *
-     * Output only. Indicates whether the content was filtered out because of this
-     * rating.
-     * 
- * - * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blocked. - */ - @java.lang.Override - public boolean getBlocked() { - return blocked_; - } - - /** - * - * - *
-     * Output only. Indicates whether the content was filtered out because of this
-     * rating.
-     * 
- * - * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The blocked to set. - * @return This builder for chaining. - */ - public Builder setBlocked(boolean value) { - - blocked_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Indicates whether the content was filtered out because of this
-     * rating.
-     * 
- * - * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearBlocked() { - bitField0_ = (bitField0_ & ~0x00000020); - blocked_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SafetyRating) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SafetyRating) - private static final com.google.cloud.vertexai.api.SafetyRating DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SafetyRating(); - } - - public static com.google.cloud.vertexai.api.SafetyRating getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafetyRating 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.vertexai.api.SafetyRating getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java deleted file mode 100644 index 9d7c99020a12..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SafetyRatingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SafetyRating) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for category. - */ - int getCategoryValue(); - - /** - * - * - *
-   * Output only. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The category. - */ - com.google.cloud.vertexai.api.HarmCategory getCategory(); - - /** - * - * - *
-   * Output only. Harm probability levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for probability. - */ - int getProbabilityValue(); - - /** - * - * - *
-   * Output only. Harm probability levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The probability. - */ - com.google.cloud.vertexai.api.SafetyRating.HarmProbability getProbability(); - - /** - * - * - *
-   * Output only. Harm probability score.
-   * 
- * - * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The probabilityScore. - */ - float getProbabilityScore(); - - /** - * - * - *
-   * Output only. Harm severity levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for severity. - */ - int getSeverityValue(); - - /** - * - * - *
-   * Output only. Harm severity levels in the content.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The severity. - */ - com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity(); - - /** - * - * - *
-   * Output only. Harm severity score.
-   * 
- * - * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The severityScore. - */ - float getSeverityScore(); - - /** - * - * - *
-   * Output only. Indicates whether the content was filtered out because of this
-   * rating.
-   * 
- * - * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The blocked. - */ - boolean getBlocked(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java deleted file mode 100644 index 73c40fdb3b45..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java +++ /dev/null @@ -1,1353 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Safety settings.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SafetySetting} - */ -@com.google.protobuf.Generated -public final class SafetySetting extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SafetySetting) - SafetySettingOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SafetySetting"); - } - - // Use SafetySetting.newBuilder() to construct. - private SafetySetting(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SafetySetting() { - category_ = 0; - threshold_ = 0; - method_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetySetting_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetySetting_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SafetySetting.class, - com.google.cloud.vertexai.api.SafetySetting.Builder.class); - } - - /** - * - * - *
-   * Probability based thresholds levels for blocking.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold} - */ - public enum HarmBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified harm block threshold.
-     * 
- * - * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; - */ - HARM_BLOCK_THRESHOLD_UNSPECIFIED(0), - /** - * - * - *
-     * Block low threshold and above (i.e. block more).
-     * 
- * - * BLOCK_LOW_AND_ABOVE = 1; - */ - BLOCK_LOW_AND_ABOVE(1), - /** - * - * - *
-     * Block medium threshold and above.
-     * 
- * - * BLOCK_MEDIUM_AND_ABOVE = 2; - */ - BLOCK_MEDIUM_AND_ABOVE(2), - /** - * - * - *
-     * Block only high threshold (i.e. block less).
-     * 
- * - * BLOCK_ONLY_HIGH = 3; - */ - BLOCK_ONLY_HIGH(3), - /** - * - * - *
-     * Block none.
-     * 
- * - * BLOCK_NONE = 4; - */ - BLOCK_NONE(4), - /** - * - * - *
-     * Turn off the safety filter.
-     * 
- * - * OFF = 5; - */ - OFF(5), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "HarmBlockThreshold"); - } - - /** - * - * - *
-     * Unspecified harm block threshold.
-     * 
- * - * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; - */ - public static final int HARM_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Block low threshold and above (i.e. block more).
-     * 
- * - * BLOCK_LOW_AND_ABOVE = 1; - */ - public static final int BLOCK_LOW_AND_ABOVE_VALUE = 1; - - /** - * - * - *
-     * Block medium threshold and above.
-     * 
- * - * BLOCK_MEDIUM_AND_ABOVE = 2; - */ - public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 2; - - /** - * - * - *
-     * Block only high threshold (i.e. block less).
-     * 
- * - * BLOCK_ONLY_HIGH = 3; - */ - public static final int BLOCK_ONLY_HIGH_VALUE = 3; - - /** - * - * - *
-     * Block none.
-     * 
- * - * BLOCK_NONE = 4; - */ - public static final int BLOCK_NONE_VALUE = 4; - - /** - * - * - *
-     * Turn off the safety filter.
-     * 
- * - * OFF = 5; - */ - public static final int OFF_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 HarmBlockThreshold 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 HarmBlockThreshold forNumber(int value) { - switch (value) { - case 0: - return HARM_BLOCK_THRESHOLD_UNSPECIFIED; - case 1: - return BLOCK_LOW_AND_ABOVE; - case 2: - return BLOCK_MEDIUM_AND_ABOVE; - case 3: - return BLOCK_ONLY_HIGH; - case 4: - return BLOCK_NONE; - case 5: - return OFF; - 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 HarmBlockThreshold findValueByNumber(int number) { - return HarmBlockThreshold.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.SafetySetting.getDescriptor().getEnumTypes().get(0); - } - - private static final HarmBlockThreshold[] VALUES = values(); - - public static HarmBlockThreshold 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 HarmBlockThreshold(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold) - } - - /** - * - * - *
-   * Probability vs severity.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod} - */ - public enum HarmBlockMethod implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The harm block method is unspecified.
-     * 
- * - * HARM_BLOCK_METHOD_UNSPECIFIED = 0; - */ - HARM_BLOCK_METHOD_UNSPECIFIED(0), - /** - * - * - *
-     * The harm block method uses both probability and severity scores.
-     * 
- * - * SEVERITY = 1; - */ - SEVERITY(1), - /** - * - * - *
-     * The harm block method uses the probability score.
-     * 
- * - * PROBABILITY = 2; - */ - PROBABILITY(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "HarmBlockMethod"); - } - - /** - * - * - *
-     * The harm block method is unspecified.
-     * 
- * - * HARM_BLOCK_METHOD_UNSPECIFIED = 0; - */ - public static final int HARM_BLOCK_METHOD_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * The harm block method uses both probability and severity scores.
-     * 
- * - * SEVERITY = 1; - */ - public static final int SEVERITY_VALUE = 1; - - /** - * - * - *
-     * The harm block method uses the probability score.
-     * 
- * - * PROBABILITY = 2; - */ - public static final int PROBABILITY_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 HarmBlockMethod 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 HarmBlockMethod forNumber(int value) { - switch (value) { - case 0: - return HARM_BLOCK_METHOD_UNSPECIFIED; - case 1: - return SEVERITY; - case 2: - return PROBABILITY; - 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 HarmBlockMethod findValueByNumber(int number) { - return HarmBlockMethod.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.SafetySetting.getDescriptor().getEnumTypes().get(1); - } - - private static final HarmBlockMethod[] VALUES = values(); - - public static HarmBlockMethod 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 HarmBlockMethod(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod) - } - - public static final int CATEGORY_FIELD_NUMBER = 1; - private int category_ = 0; - - /** - * - * - *
-   * Required. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for category. - */ - @java.lang.Override - public int getCategoryValue() { - return category_; - } - - /** - * - * - *
-   * Required. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The category. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.HarmCategory getCategory() { - com.google.cloud.vertexai.api.HarmCategory result = - com.google.cloud.vertexai.api.HarmCategory.forNumber(category_); - return result == null ? com.google.cloud.vertexai.api.HarmCategory.UNRECOGNIZED : result; - } - - public static final int THRESHOLD_FIELD_NUMBER = 2; - private int threshold_ = 0; - - /** - * - * - *
-   * Required. The harm block threshold.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for threshold. - */ - @java.lang.Override - public int getThresholdValue() { - return threshold_; - } - - /** - * - * - *
-   * Required. The harm block threshold.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The threshold. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold getThreshold() { - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold result = - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold.forNumber(threshold_); - return result == null - ? com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold.UNRECOGNIZED - : result; - } - - public static final int METHOD_FIELD_NUMBER = 4; - private int method_ = 0; - - /** - * - * - *
-   * Optional. Specify if the threshold is used for probability or severity
-   * score. If not specified, the threshold is used for probability score.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for method. - */ - @java.lang.Override - public int getMethodValue() { - return method_; - } - - /** - * - * - *
-   * Optional. Specify if the threshold is used for probability or severity
-   * score. If not specified, the threshold is used for probability score.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The method. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod getMethod() { - com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod result = - com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.forNumber(method_); - return result == null - ? com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.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 (category_ - != com.google.cloud.vertexai.api.HarmCategory.HARM_CATEGORY_UNSPECIFIED.getNumber()) { - output.writeEnum(1, category_); - } - if (threshold_ - != com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold - .HARM_BLOCK_THRESHOLD_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, threshold_); - } - if (method_ - != com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.HARM_BLOCK_METHOD_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, method_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (category_ - != com.google.cloud.vertexai.api.HarmCategory.HARM_CATEGORY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); - } - if (threshold_ - != com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold - .HARM_BLOCK_THRESHOLD_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, threshold_); - } - if (method_ - != com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.HARM_BLOCK_METHOD_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, method_); - } - 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.vertexai.api.SafetySetting)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SafetySetting other = - (com.google.cloud.vertexai.api.SafetySetting) obj; - - if (category_ != other.category_) return false; - if (threshold_ != other.threshold_) return false; - if (method_ != other.method_) 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) + CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + category_; - hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; - hash = (53 * hash) + threshold_; - hash = (37 * hash) + METHOD_FIELD_NUMBER; - hash = (53 * hash) + method_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetySetting 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.vertexai.api.SafetySetting parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetySetting 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.vertexai.api.SafetySetting parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SafetySetting parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SafetySetting 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Safety settings.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SafetySetting} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SafetySetting) - com.google.cloud.vertexai.api.SafetySettingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetySetting_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetySetting_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SafetySetting.class, - com.google.cloud.vertexai.api.SafetySetting.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SafetySetting.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - category_ = 0; - threshold_ = 0; - method_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SafetySetting_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SafetySetting.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting build() { - com.google.cloud.vertexai.api.SafetySetting result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting buildPartial() { - com.google.cloud.vertexai.api.SafetySetting result = - new com.google.cloud.vertexai.api.SafetySetting(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SafetySetting result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.category_ = category_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.threshold_ = threshold_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.method_ = method_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SafetySetting) { - return mergeFrom((com.google.cloud.vertexai.api.SafetySetting) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SafetySetting other) { - if (other == com.google.cloud.vertexai.api.SafetySetting.getDefaultInstance()) return this; - if (other.category_ != 0) { - setCategoryValue(other.getCategoryValue()); - } - if (other.threshold_ != 0) { - setThresholdValue(other.getThresholdValue()); - } - if (other.method_ != 0) { - setMethodValue(other.getMethodValue()); - } - 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: - { - category_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - threshold_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 32: - { - method_ = input.readEnum(); - bitField0_ |= 0x00000004; - 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 int category_ = 0; - - /** - * - * - *
-     * Required. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for category. - */ - @java.lang.Override - public int getCategoryValue() { - return category_; - } - - /** - * - * - *
-     * Required. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for category to set. - * @return This builder for chaining. - */ - public Builder setCategoryValue(int value) { - category_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The category. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.HarmCategory getCategory() { - com.google.cloud.vertexai.api.HarmCategory result = - com.google.cloud.vertexai.api.HarmCategory.forNumber(category_); - return result == null ? com.google.cloud.vertexai.api.HarmCategory.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Required. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The category to set. - * @return This builder for chaining. - */ - public Builder setCategory(com.google.cloud.vertexai.api.HarmCategory value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - category_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Harm category.
-     * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearCategory() { - bitField0_ = (bitField0_ & ~0x00000001); - category_ = 0; - onChanged(); - return this; - } - - private int threshold_ = 0; - - /** - * - * - *
-     * Required. The harm block threshold.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for threshold. - */ - @java.lang.Override - public int getThresholdValue() { - return threshold_; - } - - /** - * - * - *
-     * Required. The harm block threshold.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for threshold to set. - * @return This builder for chaining. - */ - public Builder setThresholdValue(int value) { - threshold_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The harm block threshold.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The threshold. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold getThreshold() { - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold result = - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold.forNumber(threshold_); - return result == null - ? com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Required. The harm block threshold.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The threshold to set. - * @return This builder for chaining. - */ - public Builder setThreshold( - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - threshold_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The harm block threshold.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearThreshold() { - bitField0_ = (bitField0_ & ~0x00000002); - threshold_ = 0; - onChanged(); - return this; - } - - private int method_ = 0; - - /** - * - * - *
-     * Optional. Specify if the threshold is used for probability or severity
-     * score. If not specified, the threshold is used for probability score.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for method. - */ - @java.lang.Override - public int getMethodValue() { - return method_; - } - - /** - * - * - *
-     * Optional. Specify if the threshold is used for probability or severity
-     * score. If not specified, the threshold is used for probability score.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for method to set. - * @return This builder for chaining. - */ - public Builder setMethodValue(int value) { - method_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Specify if the threshold is used for probability or severity
-     * score. If not specified, the threshold is used for probability score.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The method. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod getMethod() { - com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod result = - com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.forNumber(method_); - return result == null - ? com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Optional. Specify if the threshold is used for probability or severity
-     * score. If not specified, the threshold is used for probability score.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The method to set. - * @return This builder for chaining. - */ - public Builder setMethod(com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - method_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Specify if the threshold is used for probability or severity
-     * score. If not specified, the threshold is used for probability score.
-     * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearMethod() { - bitField0_ = (bitField0_ & ~0x00000004); - method_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SafetySetting) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SafetySetting) - private static final com.google.cloud.vertexai.api.SafetySetting DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SafetySetting(); - } - - public static com.google.cloud.vertexai.api.SafetySetting getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafetySetting 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.vertexai.api.SafetySetting getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java deleted file mode 100644 index 7d382b31ca89..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SafetySettingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SafetySetting) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for category. - */ - int getCategoryValue(); - - /** - * - * - *
-   * Required. Harm category.
-   * 
- * - * - * .google.cloud.vertexai.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The category. - */ - com.google.cloud.vertexai.api.HarmCategory getCategory(); - - /** - * - * - *
-   * Required. The harm block threshold.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for threshold. - */ - int getThresholdValue(); - - /** - * - * - *
-   * Required. The harm block threshold.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The threshold. - */ - com.google.cloud.vertexai.api.SafetySetting.HarmBlockThreshold getThreshold(); - - /** - * - * - *
-   * Optional. Specify if the threshold is used for probability or severity
-   * score. If not specified, the threshold is used for probability score.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for method. - */ - int getMethodValue(); - - /** - * - * - *
-   * Optional. Specify if the threshold is used for probability or severity
-   * score. If not specified, the threshold is used for probability score.
-   * 
- * - * - * .google.cloud.vertexai.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The method. - */ - com.google.cloud.vertexai.api.SafetySetting.HarmBlockMethod getMethod(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java deleted file mode 100644 index 0777255800e6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * An attribution method that approximates Shapley values for features that
- * contribute to the label being predicted. A sampling strategy is used to
- * approximate the value rather than considering all subsets of features.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SampledShapleyAttribution} - */ -@com.google.protobuf.Generated -public final class SampledShapleyAttribution extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SampledShapleyAttribution) - SampledShapleyAttributionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SampledShapleyAttribution"); - } - - // Use SampledShapleyAttribution.newBuilder() to construct. - private SampledShapleyAttribution(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SampledShapleyAttribution() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SampledShapleyAttribution.class, - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder.class); - } - - public static final int PATH_COUNT_FIELD_NUMBER = 1; - private int pathCount_ = 0; - - /** - * - * - *
-   * Required. The number of feature permutations to consider when approximating
-   * the Shapley values.
-   *
-   * Valid range of its value is [1, 50], inclusively.
-   * 
- * - * int32 path_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The pathCount. - */ - @java.lang.Override - public int getPathCount() { - return pathCount_; - } - - 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 (pathCount_ != 0) { - output.writeInt32(1, pathCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (pathCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pathCount_); - } - 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.vertexai.api.SampledShapleyAttribution)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SampledShapleyAttribution other = - (com.google.cloud.vertexai.api.SampledShapleyAttribution) obj; - - if (getPathCount() != other.getPathCount()) 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) + PATH_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getPathCount(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution 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.vertexai.api.SampledShapleyAttribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution 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.vertexai.api.SampledShapleyAttribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SampledShapleyAttribution 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * An attribution method that approximates Shapley values for features that
-   * contribute to the label being predicted. A sampling strategy is used to
-   * approximate the value rather than considering all subsets of features.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SampledShapleyAttribution} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SampledShapleyAttribution) - com.google.cloud.vertexai.api.SampledShapleyAttributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SampledShapleyAttribution.class, - com.google.cloud.vertexai.api.SampledShapleyAttribution.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SampledShapleyAttribution.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pathCount_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SampledShapleyAttribution_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttribution getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttribution build() { - com.google.cloud.vertexai.api.SampledShapleyAttribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SampledShapleyAttribution buildPartial() { - com.google.cloud.vertexai.api.SampledShapleyAttribution result = - new com.google.cloud.vertexai.api.SampledShapleyAttribution(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SampledShapleyAttribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pathCount_ = pathCount_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SampledShapleyAttribution) { - return mergeFrom((com.google.cloud.vertexai.api.SampledShapleyAttribution) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SampledShapleyAttribution other) { - if (other == com.google.cloud.vertexai.api.SampledShapleyAttribution.getDefaultInstance()) - return this; - if (other.getPathCount() != 0) { - setPathCount(other.getPathCount()); - } - 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: - { - pathCount_ = input.readInt32(); - 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 pathCount_; - - /** - * - * - *
-     * Required. The number of feature permutations to consider when approximating
-     * the Shapley values.
-     *
-     * Valid range of its value is [1, 50], inclusively.
-     * 
- * - * int32 path_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The pathCount. - */ - @java.lang.Override - public int getPathCount() { - return pathCount_; - } - - /** - * - * - *
-     * Required. The number of feature permutations to consider when approximating
-     * the Shapley values.
-     *
-     * Valid range of its value is [1, 50], inclusively.
-     * 
- * - * int32 path_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The pathCount to set. - * @return This builder for chaining. - */ - public Builder setPathCount(int value) { - - pathCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The number of feature permutations to consider when approximating
-     * the Shapley values.
-     *
-     * Valid range of its value is [1, 50], inclusively.
-     * 
- * - * int32 path_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPathCount() { - bitField0_ = (bitField0_ & ~0x00000001); - pathCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SampledShapleyAttribution) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SampledShapleyAttribution) - private static final com.google.cloud.vertexai.api.SampledShapleyAttribution DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SampledShapleyAttribution(); - } - - public static com.google.cloud.vertexai.api.SampledShapleyAttribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SampledShapleyAttribution 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.vertexai.api.SampledShapleyAttribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java deleted file mode 100644 index 5c932812048e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SampledShapleyAttributionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SampledShapleyAttribution) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The number of feature permutations to consider when approximating
-   * the Shapley values.
-   *
-   * Valid range of its value is [1, 50], inclusively.
-   * 
- * - * int32 path_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The pathCount. - */ - int getPathCount(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java deleted file mode 100644 index e5fac6fe65bf..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java +++ /dev/null @@ -1,6210 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/openapi.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Schema is used to define the format of input/output data. Represents a select
- * subset of an [OpenAPI 3.0 schema
- * object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
- * be added in the future as needed.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Schema} - */ -@com.google.protobuf.Generated -public final class Schema extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Schema) - SchemaOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Schema"); - } - - // Use Schema.newBuilder() to construct. - private Schema(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Schema() { - type_ = 0; - format_ = ""; - title_ = ""; - description_ = ""; - enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); - propertyOrdering_ = com.google.protobuf.LazyStringArrayList.emptyList(); - required_ = com.google.protobuf.LazyStringArrayList.emptyList(); - pattern_ = ""; - anyOf_ = java.util.Collections.emptyList(); - ref_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetProperties(); - case 28: - return internalGetDefs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Schema.class, - com.google.cloud.vertexai.api.Schema.Builder.class); - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; - - /** - * - * - *
-   * Optional. The type of the data.
-   * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - - /** - * - * - *
-   * Optional. The type of the data.
-   * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Type getType() { - com.google.cloud.vertexai.api.Type result = com.google.cloud.vertexai.api.Type.forNumber(type_); - return result == null ? com.google.cloud.vertexai.api.Type.UNRECOGNIZED : result; - } - - public static final int FORMAT_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object format_ = ""; - - /** - * - * - *
-   * Optional. The format of the data.
-   * Supported formats:
-   * for NUMBER type: "float", "double"
-   * for INTEGER type: "int32", "int64"
-   * for STRING type: "email", "byte", etc
-   * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The format. - */ - @java.lang.Override - public java.lang.String getFormat() { - java.lang.Object ref = format_; - 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(); - format_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The format of the data.
-   * Supported formats:
-   * for NUMBER type: "float", "double"
-   * for INTEGER type: "int32", "int64"
-   * for STRING type: "email", "byte", etc
-   * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for format. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TITLE_FIELD_NUMBER = 24; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - - /** - * - * - *
-   * Optional. The title of the Schema.
-   * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The title of the Schema.
-   * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - - /** - * - * - *
-   * Optional. The description of the data.
-   * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. The description of the data.
-   * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NULLABLE_FIELD_NUMBER = 6; - private boolean nullable_ = false; - - /** - * - * - *
-   * Optional. Indicates if the value may be null.
-   * 
- * - * bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The nullable. - */ - @java.lang.Override - public boolean getNullable() { - return nullable_; - } - - public static final int DEFAULT_FIELD_NUMBER = 23; - private com.google.protobuf.Value default_; - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the default field is set. - */ - @java.lang.Override - public boolean hasDefault() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The default. - */ - @java.lang.Override - public com.google.protobuf.Value getDefault() { - return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; - } - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { - return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; - } - - public static final int ITEMS_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Schema items_; - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the items field is set. - */ - @java.lang.Override - public boolean hasItems() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The items. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getItems() { - return items_ == null ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() : items_; - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SchemaOrBuilder getItemsOrBuilder() { - return items_ == null ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() : items_; - } - - public static final int MIN_ITEMS_FIELD_NUMBER = 21; - private long minItems_ = 0L; - - /** - * - * - *
-   * Optional. Minimum number of the elements for Type.ARRAY.
-   * 
- * - * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - - public static final int MAX_ITEMS_FIELD_NUMBER = 22; - private long maxItems_ = 0L; - - /** - * - * - *
-   * Optional. Maximum number of the elements for Type.ARRAY.
-   * 
- * - * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - - public static final int ENUM_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the enum. - */ - public com.google.protobuf.ProtocolStringList getEnumList() { - return enum_; - } - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of enum. - */ - public int getEnumCount() { - return enum_.size(); - } - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The enum at the given index. - */ - public java.lang.String getEnum(int index) { - return enum_.get(index); - } - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - public com.google.protobuf.ByteString getEnumBytes(int index) { - return enum_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 3; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.Schema> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.Schema.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField - properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetProperties().getMap().containsKey(key); - } - - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Schema getPropertiesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PROPERTY_ORDERING_FIELD_NUMBER = 25; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList propertyOrdering_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the propertyOrdering. - */ - public com.google.protobuf.ProtocolStringList getPropertyOrderingList() { - return propertyOrdering_; - } - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of propertyOrdering. - */ - public int getPropertyOrderingCount() { - return propertyOrdering_.size(); - } - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The propertyOrdering at the given index. - */ - public java.lang.String getPropertyOrdering(int index) { - return propertyOrdering_.get(index); - } - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the propertyOrdering at the given index. - */ - public com.google.protobuf.ByteString getPropertyOrderingBytes(int index) { - return propertyOrdering_.getByteString(index); - } - - public static final int REQUIRED_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the required. - */ - public com.google.protobuf.ProtocolStringList getRequiredList() { - return required_; - } - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of required. - */ - public int getRequiredCount() { - return required_.size(); - } - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The required at the given index. - */ - public java.lang.String getRequired(int index) { - return required_.get(index); - } - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - public com.google.protobuf.ByteString getRequiredBytes(int index) { - return required_.getByteString(index); - } - - public static final int MIN_PROPERTIES_FIELD_NUMBER = 14; - private long minProperties_ = 0L; - - /** - * - * - *
-   * Optional. Minimum number of the properties for Type.OBJECT.
-   * 
- * - * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minProperties. - */ - @java.lang.Override - public long getMinProperties() { - return minProperties_; - } - - public static final int MAX_PROPERTIES_FIELD_NUMBER = 15; - private long maxProperties_ = 0L; - - /** - * - * - *
-   * Optional. Maximum number of the properties for Type.OBJECT.
-   * 
- * - * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxProperties. - */ - @java.lang.Override - public long getMaxProperties() { - return maxProperties_; - } - - public static final int MINIMUM_FIELD_NUMBER = 16; - private double minimum_ = 0D; - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
-   * Minimum value of the Type.INTEGER and Type.NUMBER
-   * 
- * - * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minimum. - */ - @java.lang.Override - public double getMinimum() { - return minimum_; - } - - public static final int MAXIMUM_FIELD_NUMBER = 17; - private double maximum_ = 0D; - - /** - * - * - *
-   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
-   * 
- * - * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maximum. - */ - @java.lang.Override - public double getMaximum() { - return maximum_; - } - - public static final int MIN_LENGTH_FIELD_NUMBER = 18; - private long minLength_ = 0L; - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE STRING
-   * Minimum length of the Type.STRING
-   * 
- * - * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minLength. - */ - @java.lang.Override - public long getMinLength() { - return minLength_; - } - - public static final int MAX_LENGTH_FIELD_NUMBER = 19; - private long maxLength_ = 0L; - - /** - * - * - *
-   * Optional. Maximum length of the Type.STRING
-   * 
- * - * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxLength. - */ - @java.lang.Override - public long getMaxLength() { - return maxLength_; - } - - public static final int PATTERN_FIELD_NUMBER = 20; - - @SuppressWarnings("serial") - private volatile java.lang.Object pattern_ = ""; - - /** - * - * - *
-   * Optional. Pattern of the Type.STRING to restrict a string to a regular
-   * expression.
-   * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - 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(); - pattern_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Pattern of the Type.STRING to restrict a string to a regular
-   * expression.
-   * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXAMPLE_FIELD_NUMBER = 4; - private com.google.protobuf.Value example_; - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the example field is set. - */ - @java.lang.Override - public boolean hasExample() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The example. - */ - @java.lang.Override - public com.google.protobuf.Value getExample() { - return example_ == null ? com.google.protobuf.Value.getDefaultInstance() : example_; - } - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getExampleOrBuilder() { - return example_ == null ? com.google.protobuf.Value.getDefaultInstance() : example_; - } - - public static final int ANY_OF_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private java.util.List anyOf_; - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getAnyOfList() { - return anyOf_; - } - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getAnyOfOrBuilderList() { - return anyOf_; - } - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getAnyOfCount() { - return anyOf_.size(); - } - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getAnyOf(int index) { - return anyOf_.get(index); - } - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SchemaOrBuilder getAnyOfOrBuilder(int index) { - return anyOf_.get(index); - } - - public static final int ADDITIONAL_PROPERTIES_FIELD_NUMBER = 26; - private com.google.protobuf.Value additionalProperties_; - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the additionalProperties field is set. - */ - @java.lang.Override - public boolean hasAdditionalProperties() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The additionalProperties. - */ - @java.lang.Override - public com.google.protobuf.Value getAdditionalProperties() { - return additionalProperties_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : additionalProperties_; - } - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.ValueOrBuilder getAdditionalPropertiesOrBuilder() { - return additionalProperties_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : additionalProperties_; - } - - public static final int REF_FIELD_NUMBER = 27; - - @SuppressWarnings("serial") - private volatile java.lang.Object ref_ = ""; - - /** - * - * - *
-   * Optional. Allows indirect references between schema nodes. The value should
-   * be a valid reference to a child of the root `defs`.
-   *
-   * For example, the following schema defines a reference to a schema node
-   * named "Pet":
-   *
-   * type: object
-   * properties:
-   * pet:
-   * ref: #/defs/Pet
-   * defs:
-   * Pet:
-   * type: object
-   * properties:
-   * name:
-   * type: string
-   *
-   * The value of the "pet" property is a reference to the schema node
-   * named "Pet".
-   * See details in
-   * https://json-schema.org/understanding-json-schema/structuring
-   * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The ref. - */ - @java.lang.Override - public java.lang.String getRef() { - java.lang.Object ref = ref_; - 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(); - ref_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Allows indirect references between schema nodes. The value should
-   * be a valid reference to a child of the root `defs`.
-   *
-   * For example, the following schema defines a reference to a schema node
-   * named "Pet":
-   *
-   * type: object
-   * properties:
-   * pet:
-   * ref: #/defs/Pet
-   * defs:
-   * Pet:
-   * type: object
-   * properties:
-   * name:
-   * type: string
-   *
-   * The value of the "pet" property is a reference to the schema node
-   * named "Pet".
-   * See details in
-   * https://json-schema.org/understanding-json-schema/structuring
-   * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for ref. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRefBytes() { - java.lang.Object ref = ref_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ref_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEFS_FIELD_NUMBER = 28; - - private static final class DefsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.Schema> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_DefsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.Schema.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField - defs_; - - private com.google.protobuf.MapField - internalGetDefs() { - if (defs_ == null) { - return com.google.protobuf.MapField.emptyMapField(DefsDefaultEntryHolder.defaultEntry); - } - return defs_; - } - - public int getDefsCount() { - return internalGetDefs().getMap().size(); - } - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsDefs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetDefs().getMap().containsKey(key); - } - - /** Use {@link #getDefsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDefs() { - return getDefsMap(); - } - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getDefsMap() { - return internalGetDefs().getMap(); - } - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Schema getDefsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetDefs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getDefsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetDefs().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 (type_ != com.google.cloud.vertexai.api.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getItems()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getExample()); - } - for (int i = 0; i < required_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, required_.getRaw(i)); - } - if (nullable_ != false) { - output.writeBool(6, nullable_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, format_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, description_); - } - for (int i = 0; i < enum_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, enum_.getRaw(i)); - } - for (int i = 0; i < anyOf_.size(); i++) { - output.writeMessage(11, anyOf_.get(i)); - } - if (minProperties_ != 0L) { - output.writeInt64(14, minProperties_); - } - if (maxProperties_ != 0L) { - output.writeInt64(15, maxProperties_); - } - if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { - output.writeDouble(16, minimum_); - } - if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { - output.writeDouble(17, maximum_); - } - if (minLength_ != 0L) { - output.writeInt64(18, minLength_); - } - if (maxLength_ != 0L) { - output.writeInt64(19, maxLength_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 20, pattern_); - } - if (minItems_ != 0L) { - output.writeInt64(21, minItems_); - } - if (maxItems_ != 0L) { - output.writeInt64(22, maxItems_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(23, getDefault()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 24, title_); - } - for (int i = 0; i < propertyOrdering_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 25, propertyOrdering_.getRaw(i)); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(26, getAdditionalProperties()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ref_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 27, ref_); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetDefs(), DefsDefaultEntryHolder.defaultEntry, 28); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vertexai.api.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getItems()); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry - properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExample()); - } - { - int dataSize = 0; - for (int i = 0; i < required_.size(); i++) { - dataSize += computeStringSizeNoTag(required_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequiredList().size(); - } - if (nullable_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, nullable_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, format_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(8, description_); - } - { - int dataSize = 0; - for (int i = 0; i < enum_.size(); i++) { - dataSize += computeStringSizeNoTag(enum_.getRaw(i)); - } - size += dataSize; - size += 1 * getEnumList().size(); - } - for (int i = 0; i < anyOf_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, anyOf_.get(i)); - } - if (minProperties_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, minProperties_); - } - if (maxProperties_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(15, maxProperties_); - } - if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(16, minimum_); - } - if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(17, maximum_); - } - if (minLength_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(18, minLength_); - } - if (maxLength_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, maxLength_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(20, pattern_); - } - if (minItems_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(21, minItems_); - } - if (maxItems_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(22, maxItems_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getDefault()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(24, title_); - } - { - int dataSize = 0; - for (int i = 0; i < propertyOrdering_.size(); i++) { - dataSize += computeStringSizeNoTag(propertyOrdering_.getRaw(i)); - } - size += dataSize; - size += 2 * getPropertyOrderingList().size(); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(26, getAdditionalProperties()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ref_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(27, ref_); - } - for (java.util.Map.Entry entry : - internalGetDefs().getMap().entrySet()) { - com.google.protobuf.MapEntry defs__ = - DefsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, defs__); - } - 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.vertexai.api.Schema)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Schema other = (com.google.cloud.vertexai.api.Schema) obj; - - if (type_ != other.type_) return false; - if (!getFormat().equals(other.getFormat())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (getNullable() != other.getNullable()) return false; - if (hasDefault() != other.hasDefault()) return false; - if (hasDefault()) { - if (!getDefault().equals(other.getDefault())) return false; - } - if (hasItems() != other.hasItems()) return false; - if (hasItems()) { - if (!getItems().equals(other.getItems())) return false; - } - if (getMinItems() != other.getMinItems()) return false; - if (getMaxItems() != other.getMaxItems()) return false; - if (!getEnumList().equals(other.getEnumList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!getPropertyOrderingList().equals(other.getPropertyOrderingList())) return false; - if (!getRequiredList().equals(other.getRequiredList())) return false; - if (getMinProperties() != other.getMinProperties()) return false; - if (getMaxProperties() != other.getMaxProperties()) return false; - if (java.lang.Double.doubleToLongBits(getMinimum()) - != java.lang.Double.doubleToLongBits(other.getMinimum())) return false; - if (java.lang.Double.doubleToLongBits(getMaximum()) - != java.lang.Double.doubleToLongBits(other.getMaximum())) return false; - if (getMinLength() != other.getMinLength()) return false; - if (getMaxLength() != other.getMaxLength()) return false; - if (!getPattern().equals(other.getPattern())) return false; - if (hasExample() != other.hasExample()) return false; - if (hasExample()) { - if (!getExample().equals(other.getExample())) return false; - } - if (!getAnyOfList().equals(other.getAnyOfList())) return false; - if (hasAdditionalProperties() != other.hasAdditionalProperties()) return false; - if (hasAdditionalProperties()) { - if (!getAdditionalProperties().equals(other.getAdditionalProperties())) return false; - } - if (!getRef().equals(other.getRef())) return false; - if (!internalGetDefs().equals(other.internalGetDefs())) 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) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getFormat().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + NULLABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullable()); - if (hasDefault()) { - hash = (37 * hash) + DEFAULT_FIELD_NUMBER; - hash = (53 * hash) + getDefault().hashCode(); - } - if (hasItems()) { - hash = (37 * hash) + ITEMS_FIELD_NUMBER; - hash = (53 * hash) + getItems().hashCode(); - } - hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinItems()); - hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxItems()); - if (getEnumCount() > 0) { - hash = (37 * hash) + ENUM_FIELD_NUMBER; - hash = (53 * hash) + getEnumList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (getPropertyOrderingCount() > 0) { - hash = (37 * hash) + PROPERTY_ORDERING_FIELD_NUMBER; - hash = (53 * hash) + getPropertyOrderingList().hashCode(); - } - if (getRequiredCount() > 0) { - hash = (37 * hash) + REQUIRED_FIELD_NUMBER; - hash = (53 * hash) + getRequiredList().hashCode(); - } - hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinProperties()); - hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxProperties()); - hash = (37 * hash) + MINIMUM_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMinimum())); - hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMaximum())); - hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinLength()); - hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxLength()); - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - if (hasExample()) { - hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; - hash = (53 * hash) + getExample().hashCode(); - } - if (getAnyOfCount() > 0) { - hash = (37 * hash) + ANY_OF_FIELD_NUMBER; - hash = (53 * hash) + getAnyOfList().hashCode(); - } - if (hasAdditionalProperties()) { - hash = (37 * hash) + ADDITIONAL_PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalProperties().hashCode(); - } - hash = (37 * hash) + REF_FIELD_NUMBER; - hash = (53 * hash) + getRef().hashCode(); - if (!internalGetDefs().getMap().isEmpty()) { - hash = (37 * hash) + DEFS_FIELD_NUMBER; - hash = (53 * hash) + internalGetDefs().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Schema parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Schema parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Schema parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Schema parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Schema parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Schema parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Schema parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Schema parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Schema parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Schema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Schema is used to define the format of input/output data. Represents a select
-   * subset of an [OpenAPI 3.0 schema
-   * object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
-   * be added in the future as needed.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Schema} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Schema) - com.google.cloud.vertexai.api.SchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetProperties(); - case 28: - return internalGetDefs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableProperties(); - case 28: - return internalGetMutableDefs(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Schema.class, - com.google.cloud.vertexai.api.Schema.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Schema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDefaultFieldBuilder(); - internalGetItemsFieldBuilder(); - internalGetExampleFieldBuilder(); - internalGetAnyOfFieldBuilder(); - internalGetAdditionalPropertiesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - format_ = ""; - title_ = ""; - description_ = ""; - nullable_ = false; - default_ = null; - if (defaultBuilder_ != null) { - defaultBuilder_.dispose(); - defaultBuilder_ = null; - } - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; - } - minItems_ = 0L; - maxItems_ = 0L; - enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); - internalGetMutableProperties().clear(); - propertyOrdering_ = com.google.protobuf.LazyStringArrayList.emptyList(); - required_ = com.google.protobuf.LazyStringArrayList.emptyList(); - minProperties_ = 0L; - maxProperties_ = 0L; - minimum_ = 0D; - maximum_ = 0D; - minLength_ = 0L; - maxLength_ = 0L; - pattern_ = ""; - example_ = null; - if (exampleBuilder_ != null) { - exampleBuilder_.dispose(); - exampleBuilder_ = null; - } - if (anyOfBuilder_ == null) { - anyOf_ = java.util.Collections.emptyList(); - } else { - anyOf_ = null; - anyOfBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00200000); - additionalProperties_ = null; - if (additionalPropertiesBuilder_ != null) { - additionalPropertiesBuilder_.dispose(); - additionalPropertiesBuilder_ = null; - } - ref_ = ""; - internalGetMutableDefs().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.OpenApiProto - .internal_static_google_cloud_vertexai_v1_Schema_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Schema.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Schema build() { - com.google.cloud.vertexai.api.Schema result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Schema buildPartial() { - com.google.cloud.vertexai.api.Schema result = new com.google.cloud.vertexai.api.Schema(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Schema result) { - if (anyOfBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0)) { - anyOf_ = java.util.Collections.unmodifiableList(anyOf_); - bitField0_ = (bitField0_ & ~0x00200000); - } - result.anyOf_ = anyOf_; - } else { - result.anyOf_ = anyOfBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Schema result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.format_ = format_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.nullable_ = nullable_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.default_ = defaultBuilder_ == null ? default_ : defaultBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.minItems_ = minItems_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.maxItems_ = maxItems_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - enum_.makeImmutable(); - result.enum_ = enum_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.properties_ = - internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000800) != 0)) { - propertyOrdering_.makeImmutable(); - result.propertyOrdering_ = propertyOrdering_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - required_.makeImmutable(); - result.required_ = required_; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.minProperties_ = minProperties_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.maxProperties_ = maxProperties_; - } - if (((from_bitField0_ & 0x00008000) != 0)) { - result.minimum_ = minimum_; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.maximum_ = maximum_; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.minLength_ = minLength_; - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.maxLength_ = maxLength_; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.pattern_ = pattern_; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00400000) != 0)) { - result.additionalProperties_ = - additionalPropertiesBuilder_ == null - ? additionalProperties_ - : additionalPropertiesBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00800000) != 0)) { - result.ref_ = ref_; - } - if (((from_bitField0_ & 0x01000000) != 0)) { - result.defs_ = internalGetDefs().build(DefsDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Schema) { - return mergeFrom((com.google.cloud.vertexai.api.Schema) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Schema other) { - if (other == com.google.cloud.vertexai.api.Schema.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getFormat().isEmpty()) { - format_ = other.format_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getNullable() != false) { - setNullable(other.getNullable()); - } - if (other.hasDefault()) { - mergeDefault(other.getDefault()); - } - if (other.hasItems()) { - mergeItems(other.getItems()); - } - if (other.getMinItems() != 0L) { - setMinItems(other.getMinItems()); - } - if (other.getMaxItems() != 0L) { - setMaxItems(other.getMaxItems()); - } - if (!other.enum_.isEmpty()) { - if (enum_.isEmpty()) { - enum_ = other.enum_; - bitField0_ |= 0x00000200; - } else { - ensureEnumIsMutable(); - enum_.addAll(other.enum_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - bitField0_ |= 0x00000400; - if (!other.propertyOrdering_.isEmpty()) { - if (propertyOrdering_.isEmpty()) { - propertyOrdering_ = other.propertyOrdering_; - bitField0_ |= 0x00000800; - } else { - ensurePropertyOrderingIsMutable(); - propertyOrdering_.addAll(other.propertyOrdering_); - } - onChanged(); - } - if (!other.required_.isEmpty()) { - if (required_.isEmpty()) { - required_ = other.required_; - bitField0_ |= 0x00001000; - } else { - ensureRequiredIsMutable(); - required_.addAll(other.required_); - } - onChanged(); - } - if (other.getMinProperties() != 0L) { - setMinProperties(other.getMinProperties()); - } - if (other.getMaxProperties() != 0L) { - setMaxProperties(other.getMaxProperties()); - } - if (java.lang.Double.doubleToRawLongBits(other.getMinimum()) != 0) { - setMinimum(other.getMinimum()); - } - if (java.lang.Double.doubleToRawLongBits(other.getMaximum()) != 0) { - setMaximum(other.getMaximum()); - } - if (other.getMinLength() != 0L) { - setMinLength(other.getMinLength()); - } - if (other.getMaxLength() != 0L) { - setMaxLength(other.getMaxLength()); - } - if (!other.getPattern().isEmpty()) { - pattern_ = other.pattern_; - bitField0_ |= 0x00080000; - onChanged(); - } - if (other.hasExample()) { - mergeExample(other.getExample()); - } - if (anyOfBuilder_ == null) { - if (!other.anyOf_.isEmpty()) { - if (anyOf_.isEmpty()) { - anyOf_ = other.anyOf_; - bitField0_ = (bitField0_ & ~0x00200000); - } else { - ensureAnyOfIsMutable(); - anyOf_.addAll(other.anyOf_); - } - onChanged(); - } - } else { - if (!other.anyOf_.isEmpty()) { - if (anyOfBuilder_.isEmpty()) { - anyOfBuilder_.dispose(); - anyOfBuilder_ = null; - anyOf_ = other.anyOf_; - bitField0_ = (bitField0_ & ~0x00200000); - anyOfBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetAnyOfFieldBuilder() - : null; - } else { - anyOfBuilder_.addAllMessages(other.anyOf_); - } - } - } - if (other.hasAdditionalProperties()) { - mergeAdditionalProperties(other.getAdditionalProperties()); - } - if (!other.getRef().isEmpty()) { - ref_ = other.ref_; - bitField0_ |= 0x00800000; - onChanged(); - } - internalGetMutableDefs().mergeFrom(other.internalGetDefs()); - bitField0_ |= 0x01000000; - 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: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage(internalGetItemsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 18 - case 26: - { - com.google.protobuf.MapEntry - properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableProperties() - .ensureBuilderMap() - .put(properties__.getKey(), properties__.getValue()); - bitField0_ |= 0x00000400; - break; - } // case 26 - case 34: - { - input.readMessage(internalGetExampleFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00100000; - break; - } // case 34 - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRequiredIsMutable(); - required_.add(s); - break; - } // case 42 - case 48: - { - nullable_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 48 - case 58: - { - format_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 58 - case 66: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 66 - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureEnumIsMutable(); - enum_.add(s); - break; - } // case 74 - case 90: - { - com.google.cloud.vertexai.api.Schema m = - input.readMessage( - com.google.cloud.vertexai.api.Schema.parser(), extensionRegistry); - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - anyOf_.add(m); - } else { - anyOfBuilder_.addMessage(m); - } - break; - } // case 90 - case 112: - { - minProperties_ = input.readInt64(); - bitField0_ |= 0x00002000; - break; - } // case 112 - case 120: - { - maxProperties_ = input.readInt64(); - bitField0_ |= 0x00004000; - break; - } // case 120 - case 129: - { - minimum_ = input.readDouble(); - bitField0_ |= 0x00008000; - break; - } // case 129 - case 137: - { - maximum_ = input.readDouble(); - bitField0_ |= 0x00010000; - break; - } // case 137 - case 144: - { - minLength_ = input.readInt64(); - bitField0_ |= 0x00020000; - break; - } // case 144 - case 152: - { - maxLength_ = input.readInt64(); - bitField0_ |= 0x00040000; - break; - } // case 152 - case 162: - { - pattern_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - break; - } // case 162 - case 168: - { - minItems_ = input.readInt64(); - bitField0_ |= 0x00000080; - break; - } // case 168 - case 176: - { - maxItems_ = input.readInt64(); - bitField0_ |= 0x00000100; - break; - } // case 176 - case 186: - { - input.readMessage(internalGetDefaultFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 186 - case 194: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 194 - case 202: - { - java.lang.String s = input.readStringRequireUtf8(); - ensurePropertyOrderingIsMutable(); - propertyOrdering_.add(s); - break; - } // case 202 - case 210: - { - input.readMessage( - internalGetAdditionalPropertiesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00400000; - break; - } // case 210 - case 218: - { - ref_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; - break; - } // case 218 - case 226: - { - com.google.protobuf.MapEntry - defs__ = - input.readMessage( - DefsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableDefs().ensureBuilderMap().put(defs__.getKey(), defs__.getValue()); - bitField0_ |= 0x01000000; - break; - } // case 226 - 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 type_ = 0; - - /** - * - * - *
-     * Optional. The type of the data.
-     * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - - /** - * - * - *
-     * Optional. The type of the data.
-     * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The type of the data.
-     * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Type getType() { - com.google.cloud.vertexai.api.Type result = - com.google.cloud.vertexai.api.Type.forNumber(type_); - return result == null ? com.google.cloud.vertexai.api.Type.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * Optional. The type of the data.
-     * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vertexai.api.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The type of the data.
-     * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object format_ = ""; - - /** - * - * - *
-     * Optional. The format of the data.
-     * Supported formats:
-     * for NUMBER type: "float", "double"
-     * for INTEGER type: "int32", "int64"
-     * for STRING type: "email", "byte", etc
-     * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The format. - */ - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The format of the data.
-     * Supported formats:
-     * for NUMBER type: "float", "double"
-     * for INTEGER type: "int32", "int64"
-     * for STRING type: "email", "byte", etc
-     * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for format. - */ - public com.google.protobuf.ByteString getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The format of the data.
-     * Supported formats:
-     * for NUMBER type: "float", "double"
-     * for INTEGER type: "int32", "int64"
-     * for STRING type: "email", "byte", etc
-     * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The format to set. - * @return This builder for chaining. - */ - public Builder setFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - format_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The format of the data.
-     * Supported formats:
-     * for NUMBER type: "float", "double"
-     * for INTEGER type: "int32", "int64"
-     * for STRING type: "email", "byte", etc
-     * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFormat() { - format_ = getDefaultInstance().getFormat(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The format of the data.
-     * Supported formats:
-     * for NUMBER type: "float", "double"
-     * for INTEGER type: "int32", "int64"
-     * for STRING type: "email", "byte", etc
-     * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for format to set. - * @return This builder for chaining. - */ - public Builder setFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - format_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object title_ = ""; - - /** - * - * - *
-     * Optional. The title of the Schema.
-     * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The title of the Schema.
-     * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The title of the Schema.
-     * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The title of the Schema.
-     * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The title of the Schema.
-     * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - - /** - * - * - *
-     * Optional. The description of the data.
-     * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the data.
-     * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. The description of the data.
-     * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the data.
-     * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The description of the data.
-     * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private boolean nullable_; - - /** - * - * - *
-     * Optional. Indicates if the value may be null.
-     * 
- * - * bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The nullable. - */ - @java.lang.Override - public boolean getNullable() { - return nullable_; - } - - /** - * - * - *
-     * Optional. Indicates if the value may be null.
-     * 
- * - * bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The nullable to set. - * @return This builder for chaining. - */ - public Builder setNullable(boolean value) { - - nullable_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Indicates if the value may be null.
-     * 
- * - * bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNullable() { - bitField0_ = (bitField0_ & ~0x00000010); - nullable_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.Value default_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - defaultBuilder_; - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the default field is set. - */ - public boolean hasDefault() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The default. - */ - public com.google.protobuf.Value getDefault() { - if (defaultBuilder_ == null) { - return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; - } else { - return defaultBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setDefault(com.google.protobuf.Value value) { - if (defaultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - default_ = value; - } else { - defaultBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setDefault(com.google.protobuf.Value.Builder builderForValue) { - if (defaultBuilder_ == null) { - default_ = builderForValue.build(); - } else { - defaultBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeDefault(com.google.protobuf.Value value) { - if (defaultBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && default_ != null - && default_ != com.google.protobuf.Value.getDefaultInstance()) { - getDefaultBuilder().mergeFrom(value); - } else { - default_ = value; - } - } else { - defaultBuilder_.mergeFrom(value); - } - if (default_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearDefault() { - bitField0_ = (bitField0_ & ~0x00000020); - default_ = null; - if (defaultBuilder_ != null) { - defaultBuilder_.dispose(); - defaultBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Value.Builder getDefaultBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetDefaultFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.ValueOrBuilder getDefaultOrBuilder() { - if (defaultBuilder_ != null) { - return defaultBuilder_.getMessageOrBuilder(); - } else { - return default_ == null ? com.google.protobuf.Value.getDefaultInstance() : default_; - } - } - - /** - * - * - *
-     * Optional. Default value of the data.
-     * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetDefaultFieldBuilder() { - if (defaultBuilder_ == null) { - defaultBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getDefault(), getParentForChildren(), isClean()); - default_ = null; - } - return defaultBuilder_; - } - - private com.google.cloud.vertexai.api.Schema items_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - itemsBuilder_; - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the items field is set. - */ - public boolean hasItems() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The items. - */ - public com.google.cloud.vertexai.api.Schema getItems() { - if (itemsBuilder_ == null) { - return items_ == null ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() : items_; - } else { - return itemsBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setItems(com.google.cloud.vertexai.api.Schema value) { - if (itemsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - items_ = value; - } else { - itemsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setItems(com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (itemsBuilder_ == null) { - items_ = builderForValue.build(); - } else { - itemsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeItems(com.google.cloud.vertexai.api.Schema value) { - if (itemsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && items_ != null - && items_ != com.google.cloud.vertexai.api.Schema.getDefaultInstance()) { - getItemsBuilder().mergeFrom(value); - } else { - items_ = value; - } - } else { - itemsBuilder_.mergeFrom(value); - } - if (items_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearItems() { - bitField0_ = (bitField0_ & ~0x00000040); - items_ = null; - if (itemsBuilder_ != null) { - itemsBuilder_.dispose(); - itemsBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder getItemsBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetItemsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SchemaOrBuilder getItemsOrBuilder() { - if (itemsBuilder_ != null) { - return itemsBuilder_.getMessageOrBuilder(); - } else { - return items_ == null ? com.google.cloud.vertexai.api.Schema.getDefaultInstance() : items_; - } - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-     * Schema of the elements of Type.ARRAY.
-     * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - internalGetItemsFieldBuilder() { - if (itemsBuilder_ == null) { - itemsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder>( - getItems(), getParentForChildren(), isClean()); - items_ = null; - } - return itemsBuilder_; - } - - private long minItems_; - - /** - * - * - *
-     * Optional. Minimum number of the elements for Type.ARRAY.
-     * 
- * - * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minItems. - */ - @java.lang.Override - public long getMinItems() { - return minItems_; - } - - /** - * - * - *
-     * Optional. Minimum number of the elements for Type.ARRAY.
-     * 
- * - * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minItems to set. - * @return This builder for chaining. - */ - public Builder setMinItems(long value) { - - minItems_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Minimum number of the elements for Type.ARRAY.
-     * 
- * - * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinItems() { - bitField0_ = (bitField0_ & ~0x00000080); - minItems_ = 0L; - onChanged(); - return this; - } - - private long maxItems_; - - /** - * - * - *
-     * Optional. Maximum number of the elements for Type.ARRAY.
-     * 
- * - * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxItems. - */ - @java.lang.Override - public long getMaxItems() { - return maxItems_; - } - - /** - * - * - *
-     * Optional. Maximum number of the elements for Type.ARRAY.
-     * 
- * - * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxItems to set. - * @return This builder for chaining. - */ - public Builder setMaxItems(long value) { - - maxItems_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Maximum number of the elements for Type.ARRAY.
-     * 
- * - * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxItems() { - bitField0_ = (bitField0_ & ~0x00000100); - maxItems_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList enum_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEnumIsMutable() { - if (!enum_.isModifiable()) { - enum_ = new com.google.protobuf.LazyStringArrayList(enum_); - } - bitField0_ |= 0x00000200; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the enum. - */ - public com.google.protobuf.ProtocolStringList getEnumList() { - enum_.makeImmutable(); - return enum_; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of enum. - */ - public int getEnumCount() { - return enum_.size(); - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The enum at the given index. - */ - public java.lang.String getEnum(int index) { - return enum_.get(index); - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - public com.google.protobuf.ByteString getEnumBytes(int index) { - return enum_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The enum to set. - * @return This builder for chaining. - */ - public Builder setEnum(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumIsMutable(); - enum_.set(index, value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enum to add. - * @return This builder for chaining. - */ - public Builder addEnum(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The enum to add. - * @return This builder for chaining. - */ - public Builder addAllEnum(java.lang.Iterable values) { - ensureEnumIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, enum_); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnum() { - enum_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Possible values of the element of primitive type with enum
-     * format. Examples:
-     * 1. We can define direction as :
-     * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-     * 2. We can define apartment number as :
-     * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-     * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the enum to add. - * @return This builder for chaining. - */ - public Builder addEnumBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureEnumIsMutable(); - enum_.add(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - private static final class PropertiesConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema> { - @java.lang.Override - public com.google.cloud.vertexai.api.Schema build( - com.google.cloud.vertexai.api.SchemaOrBuilder val) { - if (val instanceof com.google.cloud.vertexai.api.Schema) { - return (com.google.cloud.vertexai.api.Schema) val; - } - return ((com.google.cloud.vertexai.api.Schema.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry - defaultEntry() { - return PropertiesDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - properties_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - internalGetProperties() { - if (properties_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - return properties_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - internalGetMutableProperties() { - if (properties_ == null) { - properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); - } - bitField0_ |= 0x00000400; - onChanged(); - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetProperties().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map - getPropertiesMap() { - return internalGetProperties().getImmutableMap(); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Schema getPropertiesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableProperties().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return propertiesConverter.build(map.get(key)); - } - - public Builder clearProperties() { - bitField0_ = (bitField0_ & ~0x00000400); - internalGetMutableProperties().clear(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableProperties().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableProperties() { - bitField0_ |= 0x00000400; - return internalGetMutableProperties().ensureMessageMap(); - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, com.google.cloud.vertexai.api.Schema value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableProperties().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000400; - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties( - java.util.Map values) { - for (java.util.Map.Entry e : - values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableProperties().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000400; - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-     * Properties of Type.OBJECT.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder putPropertiesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = - internalGetMutableProperties().ensureBuilderMap(); - com.google.cloud.vertexai.api.SchemaOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.vertexai.api.Schema.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.vertexai.api.Schema) { - entry = ((com.google.cloud.vertexai.api.Schema) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.Schema.Builder) entry; - } - - private com.google.protobuf.LazyStringArrayList propertyOrdering_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensurePropertyOrderingIsMutable() { - if (!propertyOrdering_.isModifiable()) { - propertyOrdering_ = new com.google.protobuf.LazyStringArrayList(propertyOrdering_); - } - bitField0_ |= 0x00000800; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the propertyOrdering. - */ - public com.google.protobuf.ProtocolStringList getPropertyOrderingList() { - propertyOrdering_.makeImmutable(); - return propertyOrdering_; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of propertyOrdering. - */ - public int getPropertyOrderingCount() { - return propertyOrdering_.size(); - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The propertyOrdering at the given index. - */ - public java.lang.String getPropertyOrdering(int index) { - return propertyOrdering_.get(index); - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the propertyOrdering at the given index. - */ - public com.google.protobuf.ByteString getPropertyOrderingBytes(int index) { - return propertyOrdering_.getByteString(index); - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The propertyOrdering to set. - * @return This builder for chaining. - */ - public Builder setPropertyOrdering(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertyOrderingIsMutable(); - propertyOrdering_.set(index, value); - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The propertyOrdering to add. - * @return This builder for chaining. - */ - public Builder addPropertyOrdering(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertyOrderingIsMutable(); - propertyOrdering_.add(value); - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The propertyOrdering to add. - * @return This builder for chaining. - */ - public Builder addAllPropertyOrdering(java.lang.Iterable values) { - ensurePropertyOrderingIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertyOrdering_); - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearPropertyOrdering() { - propertyOrdering_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The order of the properties.
-     * Not a standard field in open api spec. Only used to support the order of
-     * the properties.
-     * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the propertyOrdering to add. - * @return This builder for chaining. - */ - public Builder addPropertyOrderingBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePropertyOrderingIsMutable(); - propertyOrdering_.add(value); - bitField0_ |= 0x00000800; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList required_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureRequiredIsMutable() { - if (!required_.isModifiable()) { - required_ = new com.google.protobuf.LazyStringArrayList(required_); - } - bitField0_ |= 0x00001000; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the required. - */ - public com.google.protobuf.ProtocolStringList getRequiredList() { - required_.makeImmutable(); - return required_; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of required. - */ - public int getRequiredCount() { - return required_.size(); - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The required at the given index. - */ - public java.lang.String getRequired(int index) { - return required_.get(index); - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - public com.google.protobuf.ByteString getRequiredBytes(int index) { - return required_.getByteString(index); - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The required to set. - * @return This builder for chaining. - */ - public Builder setRequired(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredIsMutable(); - required_.set(index, value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The required to add. - * @return This builder for chaining. - */ - public Builder addRequired(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The required to add. - * @return This builder for chaining. - */ - public Builder addAllRequired(java.lang.Iterable values) { - ensureRequiredIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, required_); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequired() { - required_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Required properties of Type.OBJECT.
-     * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the required to add. - * @return This builder for chaining. - */ - public Builder addRequiredBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequiredIsMutable(); - required_.add(value); - bitField0_ |= 0x00001000; - onChanged(); - return this; - } - - private long minProperties_; - - /** - * - * - *
-     * Optional. Minimum number of the properties for Type.OBJECT.
-     * 
- * - * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minProperties. - */ - @java.lang.Override - public long getMinProperties() { - return minProperties_; - } - - /** - * - * - *
-     * Optional. Minimum number of the properties for Type.OBJECT.
-     * 
- * - * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minProperties to set. - * @return This builder for chaining. - */ - public Builder setMinProperties(long value) { - - minProperties_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Minimum number of the properties for Type.OBJECT.
-     * 
- * - * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinProperties() { - bitField0_ = (bitField0_ & ~0x00002000); - minProperties_ = 0L; - onChanged(); - return this; - } - - private long maxProperties_; - - /** - * - * - *
-     * Optional. Maximum number of the properties for Type.OBJECT.
-     * 
- * - * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxProperties. - */ - @java.lang.Override - public long getMaxProperties() { - return maxProperties_; - } - - /** - * - * - *
-     * Optional. Maximum number of the properties for Type.OBJECT.
-     * 
- * - * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxProperties to set. - * @return This builder for chaining. - */ - public Builder setMaxProperties(long value) { - - maxProperties_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Maximum number of the properties for Type.OBJECT.
-     * 
- * - * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxProperties() { - bitField0_ = (bitField0_ & ~0x00004000); - maxProperties_ = 0L; - onChanged(); - return this; - } - - private double minimum_; - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
-     * Minimum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minimum. - */ - @java.lang.Override - public double getMinimum() { - return minimum_; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
-     * Minimum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minimum to set. - * @return This builder for chaining. - */ - public Builder setMinimum(double value) { - - minimum_ = value; - bitField0_ |= 0x00008000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
-     * Minimum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinimum() { - bitField0_ = (bitField0_ & ~0x00008000); - minimum_ = 0D; - onChanged(); - return this; - } - - private double maximum_; - - /** - * - * - *
-     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maximum. - */ - @java.lang.Override - public double getMaximum() { - return maximum_; - } - - /** - * - * - *
-     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maximum to set. - * @return This builder for chaining. - */ - public Builder setMaximum(double value) { - - maximum_ = value; - bitField0_ |= 0x00010000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
-     * 
- * - * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaximum() { - bitField0_ = (bitField0_ & ~0x00010000); - maximum_ = 0D; - onChanged(); - return this; - } - - private long minLength_; - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE STRING
-     * Minimum length of the Type.STRING
-     * 
- * - * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minLength. - */ - @java.lang.Override - public long getMinLength() { - return minLength_; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE STRING
-     * Minimum length of the Type.STRING
-     * 
- * - * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minLength to set. - * @return This builder for chaining. - */ - public Builder setMinLength(long value) { - - minLength_ = value; - bitField0_ |= 0x00020000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. SCHEMA FIELDS FOR TYPE STRING
-     * Minimum length of the Type.STRING
-     * 
- * - * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinLength() { - bitField0_ = (bitField0_ & ~0x00020000); - minLength_ = 0L; - onChanged(); - return this; - } - - private long maxLength_; - - /** - * - * - *
-     * Optional. Maximum length of the Type.STRING
-     * 
- * - * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxLength. - */ - @java.lang.Override - public long getMaxLength() { - return maxLength_; - } - - /** - * - * - *
-     * Optional. Maximum length of the Type.STRING
-     * 
- * - * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxLength to set. - * @return This builder for chaining. - */ - public Builder setMaxLength(long value) { - - maxLength_ = value; - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Maximum length of the Type.STRING
-     * 
- * - * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxLength() { - bitField0_ = (bitField0_ & ~0x00040000); - maxLength_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object pattern_ = ""; - - /** - * - * - *
-     * Optional. Pattern of the Type.STRING to restrict a string to a regular
-     * expression.
-     * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Pattern of the Type.STRING to restrict a string to a regular
-     * expression.
-     * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Pattern of the Type.STRING to restrict a string to a regular
-     * expression.
-     * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pattern_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Pattern of the Type.STRING to restrict a string to a regular
-     * expression.
-     * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPattern() { - pattern_ = getDefaultInstance().getPattern(); - bitField0_ = (bitField0_ & ~0x00080000); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Pattern of the Type.STRING to restrict a string to a regular
-     * expression.
-     * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pattern_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - - private com.google.protobuf.Value example_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - exampleBuilder_; - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the example field is set. - */ - public boolean hasExample() { - return ((bitField0_ & 0x00100000) != 0); - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The example. - */ - public com.google.protobuf.Value getExample() { - if (exampleBuilder_ == null) { - return example_ == null ? com.google.protobuf.Value.getDefaultInstance() : example_; - } else { - return exampleBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setExample(com.google.protobuf.Value value) { - if (exampleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - example_ = value; - } else { - exampleBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setExample(com.google.protobuf.Value.Builder builderForValue) { - if (exampleBuilder_ == null) { - example_ = builderForValue.build(); - } else { - exampleBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeExample(com.google.protobuf.Value value) { - if (exampleBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) - && example_ != null - && example_ != com.google.protobuf.Value.getDefaultInstance()) { - getExampleBuilder().mergeFrom(value); - } else { - example_ = value; - } - } else { - exampleBuilder_.mergeFrom(value); - } - if (example_ != null) { - bitField0_ |= 0x00100000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearExample() { - bitField0_ = (bitField0_ & ~0x00100000); - example_ = null; - if (exampleBuilder_ != null) { - exampleBuilder_.dispose(); - exampleBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Value.Builder getExampleBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return internalGetExampleFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.ValueOrBuilder getExampleOrBuilder() { - if (exampleBuilder_ != null) { - return exampleBuilder_.getMessageOrBuilder(); - } else { - return example_ == null ? com.google.protobuf.Value.getDefaultInstance() : example_; - } - } - - /** - * - * - *
-     * Optional. Example of the object. Will only populated when the object is the
-     * root.
-     * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetExampleFieldBuilder() { - if (exampleBuilder_ == null) { - exampleBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getExample(), getParentForChildren(), isClean()); - example_ = null; - } - return exampleBuilder_; - } - - private java.util.List anyOf_ = - java.util.Collections.emptyList(); - - private void ensureAnyOfIsMutable() { - if (!((bitField0_ & 0x00200000) != 0)) { - anyOf_ = new java.util.ArrayList(anyOf_); - bitField0_ |= 0x00200000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - anyOfBuilder_; - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getAnyOfList() { - if (anyOfBuilder_ == null) { - return java.util.Collections.unmodifiableList(anyOf_); - } else { - return anyOfBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getAnyOfCount() { - if (anyOfBuilder_ == null) { - return anyOf_.size(); - } else { - return anyOfBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema getAnyOf(int index) { - if (anyOfBuilder_ == null) { - return anyOf_.get(index); - } else { - return anyOfBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAnyOf(int index, com.google.cloud.vertexai.api.Schema value) { - if (anyOfBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnyOfIsMutable(); - anyOf_.set(index, value); - onChanged(); - } else { - anyOfBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAnyOf( - int index, com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - anyOf_.set(index, builderForValue.build()); - onChanged(); - } else { - anyOfBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAnyOf(com.google.cloud.vertexai.api.Schema value) { - if (anyOfBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnyOfIsMutable(); - anyOf_.add(value); - onChanged(); - } else { - anyOfBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAnyOf(int index, com.google.cloud.vertexai.api.Schema value) { - if (anyOfBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnyOfIsMutable(); - anyOf_.add(index, value); - onChanged(); - } else { - anyOfBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAnyOf(com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - anyOf_.add(builderForValue.build()); - onChanged(); - } else { - anyOfBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAnyOf( - int index, com.google.cloud.vertexai.api.Schema.Builder builderForValue) { - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - anyOf_.add(index, builderForValue.build()); - onChanged(); - } else { - anyOfBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllAnyOf( - java.lang.Iterable values) { - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, anyOf_); - onChanged(); - } else { - anyOfBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAnyOf() { - if (anyOfBuilder_ == null) { - anyOf_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); - onChanged(); - } else { - anyOfBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeAnyOf(int index) { - if (anyOfBuilder_ == null) { - ensureAnyOfIsMutable(); - anyOf_.remove(index); - onChanged(); - } else { - anyOfBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder getAnyOfBuilder(int index) { - return internalGetAnyOfFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.SchemaOrBuilder getAnyOfOrBuilder(int index) { - if (anyOfBuilder_ == null) { - return anyOf_.get(index); - } else { - return anyOfBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getAnyOfOrBuilderList() { - if (anyOfBuilder_ != null) { - return anyOfBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(anyOf_); - } - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder addAnyOfBuilder() { - return internalGetAnyOfFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Schema.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder addAnyOfBuilder(int index) { - return internalGetAnyOfFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Schema.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The value should be validated against any (one or more) of the
-     * subschemas in the list.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getAnyOfBuilderList() { - return internalGetAnyOfFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder> - internalGetAnyOfFieldBuilder() { - if (anyOfBuilder_ == null) { - anyOfBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder, - com.google.cloud.vertexai.api.SchemaOrBuilder>( - anyOf_, ((bitField0_ & 0x00200000) != 0), getParentForChildren(), isClean()); - anyOf_ = null; - } - return anyOfBuilder_; - } - - private com.google.protobuf.Value additionalProperties_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - additionalPropertiesBuilder_; - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the additionalProperties field is set. - */ - public boolean hasAdditionalProperties() { - return ((bitField0_ & 0x00400000) != 0); - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The additionalProperties. - */ - public com.google.protobuf.Value getAdditionalProperties() { - if (additionalPropertiesBuilder_ == null) { - return additionalProperties_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : additionalProperties_; - } else { - return additionalPropertiesBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdditionalProperties(com.google.protobuf.Value value) { - if (additionalPropertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - additionalProperties_ = value; - } else { - additionalPropertiesBuilder_.setMessage(value); - } - bitField0_ |= 0x00400000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdditionalProperties(com.google.protobuf.Value.Builder builderForValue) { - if (additionalPropertiesBuilder_ == null) { - additionalProperties_ = builderForValue.build(); - } else { - additionalPropertiesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00400000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAdditionalProperties(com.google.protobuf.Value value) { - if (additionalPropertiesBuilder_ == null) { - if (((bitField0_ & 0x00400000) != 0) - && additionalProperties_ != null - && additionalProperties_ != com.google.protobuf.Value.getDefaultInstance()) { - getAdditionalPropertiesBuilder().mergeFrom(value); - } else { - additionalProperties_ = value; - } - } else { - additionalPropertiesBuilder_.mergeFrom(value); - } - if (additionalProperties_ != null) { - bitField0_ |= 0x00400000; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAdditionalProperties() { - bitField0_ = (bitField0_ & ~0x00400000); - additionalProperties_ = null; - if (additionalPropertiesBuilder_ != null) { - additionalPropertiesBuilder_.dispose(); - additionalPropertiesBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Value.Builder getAdditionalPropertiesBuilder() { - bitField0_ |= 0x00400000; - onChanged(); - return internalGetAdditionalPropertiesFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.ValueOrBuilder getAdditionalPropertiesOrBuilder() { - if (additionalPropertiesBuilder_ != null) { - return additionalPropertiesBuilder_.getMessageOrBuilder(); - } else { - return additionalProperties_ == null - ? com.google.protobuf.Value.getDefaultInstance() - : additionalProperties_; - } - } - - /** - * - * - *
-     * Optional. Can either be a boolean or an object; controls the presence of
-     * additional properties.
-     * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - internalGetAdditionalPropertiesFieldBuilder() { - if (additionalPropertiesBuilder_ == null) { - additionalPropertiesBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - getAdditionalProperties(), getParentForChildren(), isClean()); - additionalProperties_ = null; - } - return additionalPropertiesBuilder_; - } - - private java.lang.Object ref_ = ""; - - /** - * - * - *
-     * Optional. Allows indirect references between schema nodes. The value should
-     * be a valid reference to a child of the root `defs`.
-     *
-     * For example, the following schema defines a reference to a schema node
-     * named "Pet":
-     *
-     * type: object
-     * properties:
-     * pet:
-     * ref: #/defs/Pet
-     * defs:
-     * Pet:
-     * type: object
-     * properties:
-     * name:
-     * type: string
-     *
-     * The value of the "pet" property is a reference to the schema node
-     * named "Pet".
-     * See details in
-     * https://json-schema.org/understanding-json-schema/structuring
-     * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The ref. - */ - public java.lang.String getRef() { - java.lang.Object ref = ref_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ref_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Allows indirect references between schema nodes. The value should
-     * be a valid reference to a child of the root `defs`.
-     *
-     * For example, the following schema defines a reference to a schema node
-     * named "Pet":
-     *
-     * type: object
-     * properties:
-     * pet:
-     * ref: #/defs/Pet
-     * defs:
-     * Pet:
-     * type: object
-     * properties:
-     * name:
-     * type: string
-     *
-     * The value of the "pet" property is a reference to the schema node
-     * named "Pet".
-     * See details in
-     * https://json-schema.org/understanding-json-schema/structuring
-     * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for ref. - */ - public com.google.protobuf.ByteString getRefBytes() { - java.lang.Object ref = ref_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ref_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Allows indirect references between schema nodes. The value should
-     * be a valid reference to a child of the root `defs`.
-     *
-     * For example, the following schema defines a reference to a schema node
-     * named "Pet":
-     *
-     * type: object
-     * properties:
-     * pet:
-     * ref: #/defs/Pet
-     * defs:
-     * Pet:
-     * type: object
-     * properties:
-     * name:
-     * type: string
-     *
-     * The value of the "pet" property is a reference to the schema node
-     * named "Pet".
-     * See details in
-     * https://json-schema.org/understanding-json-schema/structuring
-     * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The ref to set. - * @return This builder for chaining. - */ - public Builder setRef(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ref_ = value; - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Allows indirect references between schema nodes. The value should
-     * be a valid reference to a child of the root `defs`.
-     *
-     * For example, the following schema defines a reference to a schema node
-     * named "Pet":
-     *
-     * type: object
-     * properties:
-     * pet:
-     * ref: #/defs/Pet
-     * defs:
-     * Pet:
-     * type: object
-     * properties:
-     * name:
-     * type: string
-     *
-     * The value of the "pet" property is a reference to the schema node
-     * named "Pet".
-     * See details in
-     * https://json-schema.org/understanding-json-schema/structuring
-     * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRef() { - ref_ = getDefaultInstance().getRef(); - bitField0_ = (bitField0_ & ~0x00800000); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Allows indirect references between schema nodes. The value should
-     * be a valid reference to a child of the root `defs`.
-     *
-     * For example, the following schema defines a reference to a schema node
-     * named "Pet":
-     *
-     * type: object
-     * properties:
-     * pet:
-     * ref: #/defs/Pet
-     * defs:
-     * Pet:
-     * type: object
-     * properties:
-     * name:
-     * type: string
-     *
-     * The value of the "pet" property is a reference to the schema node
-     * named "Pet".
-     * See details in
-     * https://json-schema.org/understanding-json-schema/structuring
-     * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for ref to set. - * @return This builder for chaining. - */ - public Builder setRefBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ref_ = value; - bitField0_ |= 0x00800000; - onChanged(); - return this; - } - - private static final class DefsConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema> { - @java.lang.Override - public com.google.cloud.vertexai.api.Schema build( - com.google.cloud.vertexai.api.SchemaOrBuilder val) { - if (val instanceof com.google.cloud.vertexai.api.Schema) { - return (com.google.cloud.vertexai.api.Schema) val; - } - return ((com.google.cloud.vertexai.api.Schema.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry - defaultEntry() { - return DefsDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final DefsConverter defsConverter = new DefsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - defs_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - internalGetDefs() { - if (defs_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(defsConverter); - } - return defs_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.SchemaOrBuilder, - com.google.cloud.vertexai.api.Schema, - com.google.cloud.vertexai.api.Schema.Builder> - internalGetMutableDefs() { - if (defs_ == null) { - defs_ = new com.google.protobuf.MapFieldBuilder<>(defsConverter); - } - bitField0_ |= 0x01000000; - onChanged(); - return defs_; - } - - public int getDefsCount() { - return internalGetDefs().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsDefs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetDefs().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getDefsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDefs() { - return getDefsMap(); - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getDefsMap() { - return internalGetDefs().getImmutableMap(); - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Schema getDefsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableDefs().ensureBuilderMap(); - return map.containsKey(key) ? defsConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Schema getDefsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableDefs().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return defsConverter.build(map.get(key)); - } - - public Builder clearDefs() { - bitField0_ = (bitField0_ & ~0x01000000); - internalGetMutableDefs().clear(); - return this; - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeDefs(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableDefs().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableDefs() { - bitField0_ |= 0x01000000; - return internalGetMutableDefs().ensureMessageMap(); - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putDefs(java.lang.String key, com.google.cloud.vertexai.api.Schema value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableDefs().ensureBuilderMap().put(key, value); - bitField0_ |= 0x01000000; - return this; - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllDefs( - java.util.Map values) { - for (java.util.Map.Entry e : - values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableDefs().ensureBuilderMap().putAll(values); - bitField0_ |= 0x01000000; - return this; - } - - /** - * - * - *
-     * Optional. A map of definitions for use by `ref`
-     * Only allowed at the root of the schema.
-     * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Schema.Builder putDefsBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = - internalGetMutableDefs().ensureBuilderMap(); - com.google.cloud.vertexai.api.SchemaOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.vertexai.api.Schema.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.vertexai.api.Schema) { - entry = ((com.google.cloud.vertexai.api.Schema) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.Schema.Builder) entry; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Schema) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Schema) - private static final com.google.cloud.vertexai.api.Schema DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Schema(); - } - - public static com.google.cloud.vertexai.api.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.vertexai.api.Schema getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java deleted file mode 100644 index 6deba0d95ebd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java +++ /dev/null @@ -1,935 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/openapi.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SchemaOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Schema) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The type of the data.
-   * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - - /** - * - * - *
-   * Optional. The type of the data.
-   * 
- * - * .google.cloud.vertexai.v1.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The type. - */ - com.google.cloud.vertexai.api.Type getType(); - - /** - * - * - *
-   * Optional. The format of the data.
-   * Supported formats:
-   * for NUMBER type: "float", "double"
-   * for INTEGER type: "int32", "int64"
-   * for STRING type: "email", "byte", etc
-   * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The format. - */ - java.lang.String getFormat(); - - /** - * - * - *
-   * Optional. The format of the data.
-   * Supported formats:
-   * for NUMBER type: "float", "double"
-   * for INTEGER type: "int32", "int64"
-   * for STRING type: "email", "byte", etc
-   * 
- * - * string format = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for format. - */ - com.google.protobuf.ByteString getFormatBytes(); - - /** - * - * - *
-   * Optional. The title of the Schema.
-   * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The title. - */ - java.lang.String getTitle(); - - /** - * - * - *
-   * Optional. The title of the Schema.
-   * 
- * - * string title = 24 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - - /** - * - * - *
-   * Optional. The description of the data.
-   * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - - /** - * - * - *
-   * Optional. The description of the data.
-   * 
- * - * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Indicates if the value may be null.
-   * 
- * - * bool nullable = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The nullable. - */ - boolean getNullable(); - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the default field is set. - */ - boolean hasDefault(); - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The default. - */ - com.google.protobuf.Value getDefault(); - - /** - * - * - *
-   * Optional. Default value of the data.
-   * 
- * - * .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.ValueOrBuilder getDefaultOrBuilder(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the items field is set. - */ - boolean hasItems(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The items. - */ - com.google.cloud.vertexai.api.Schema getItems(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE ARRAY
-   * Schema of the elements of Type.ARRAY.
-   * 
- * - * .google.cloud.vertexai.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SchemaOrBuilder getItemsOrBuilder(); - - /** - * - * - *
-   * Optional. Minimum number of the elements for Type.ARRAY.
-   * 
- * - * int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minItems. - */ - long getMinItems(); - - /** - * - * - *
-   * Optional. Maximum number of the elements for Type.ARRAY.
-   * 
- * - * int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxItems. - */ - long getMaxItems(); - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the enum. - */ - java.util.List getEnumList(); - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of enum. - */ - int getEnumCount(); - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The enum at the given index. - */ - java.lang.String getEnum(int index); - - /** - * - * - *
-   * Optional. Possible values of the element of primitive type with enum
-   * format. Examples:
-   * 1. We can define direction as :
-   * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
-   * 2. We can define apartment number as :
-   * {type:INTEGER, format:enum, enum:["101", "201", "301"]}
-   * 
- * - * repeated string enum = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the enum at the given index. - */ - com.google.protobuf.ByteString getEnumBytes(int index); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - /* nullable */ - com.google.cloud.vertexai.api.Schema getPropertiesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE OBJECT
-   * Properties of Type.OBJECT.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Schema getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the propertyOrdering. - */ - java.util.List getPropertyOrderingList(); - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of propertyOrdering. - */ - int getPropertyOrderingCount(); - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The propertyOrdering at the given index. - */ - java.lang.String getPropertyOrdering(int index); - - /** - * - * - *
-   * Optional. The order of the properties.
-   * Not a standard field in open api spec. Only used to support the order of
-   * the properties.
-   * 
- * - * repeated string property_ordering = 25 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the propertyOrdering at the given index. - */ - com.google.protobuf.ByteString getPropertyOrderingBytes(int index); - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the required. - */ - java.util.List getRequiredList(); - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of required. - */ - int getRequiredCount(); - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The required at the given index. - */ - java.lang.String getRequired(int index); - - /** - * - * - *
-   * Optional. Required properties of Type.OBJECT.
-   * 
- * - * repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the required at the given index. - */ - com.google.protobuf.ByteString getRequiredBytes(int index); - - /** - * - * - *
-   * Optional. Minimum number of the properties for Type.OBJECT.
-   * 
- * - * int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minProperties. - */ - long getMinProperties(); - - /** - * - * - *
-   * Optional. Maximum number of the properties for Type.OBJECT.
-   * 
- * - * int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxProperties. - */ - long getMaxProperties(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
-   * Minimum value of the Type.INTEGER and Type.NUMBER
-   * 
- * - * double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minimum. - */ - double getMinimum(); - - /** - * - * - *
-   * Optional. Maximum value of the Type.INTEGER and Type.NUMBER
-   * 
- * - * double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maximum. - */ - double getMaximum(); - - /** - * - * - *
-   * Optional. SCHEMA FIELDS FOR TYPE STRING
-   * Minimum length of the Type.STRING
-   * 
- * - * int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minLength. - */ - long getMinLength(); - - /** - * - * - *
-   * Optional. Maximum length of the Type.STRING
-   * 
- * - * int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxLength. - */ - long getMaxLength(); - - /** - * - * - *
-   * Optional. Pattern of the Type.STRING to restrict a string to a regular
-   * expression.
-   * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pattern. - */ - java.lang.String getPattern(); - - /** - * - * - *
-   * Optional. Pattern of the Type.STRING to restrict a string to a regular
-   * expression.
-   * 
- * - * string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString getPatternBytes(); - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the example field is set. - */ - boolean hasExample(); - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The example. - */ - com.google.protobuf.Value getExample(); - - /** - * - * - *
-   * Optional. Example of the object. Will only populated when the object is the
-   * root.
-   * 
- * - * .google.protobuf.Value example = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.ValueOrBuilder getExampleOrBuilder(); - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getAnyOfList(); - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Schema getAnyOf(int index); - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAnyOfCount(); - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getAnyOfOrBuilderList(); - - /** - * - * - *
-   * Optional. The value should be validated against any (one or more) of the
-   * subschemas in the list.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Schema any_of = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.SchemaOrBuilder getAnyOfOrBuilder(int index); - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the additionalProperties field is set. - */ - boolean hasAdditionalProperties(); - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The additionalProperties. - */ - com.google.protobuf.Value getAdditionalProperties(); - - /** - * - * - *
-   * Optional. Can either be a boolean or an object; controls the presence of
-   * additional properties.
-   * 
- * - * - * .google.protobuf.Value additional_properties = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.ValueOrBuilder getAdditionalPropertiesOrBuilder(); - - /** - * - * - *
-   * Optional. Allows indirect references between schema nodes. The value should
-   * be a valid reference to a child of the root `defs`.
-   *
-   * For example, the following schema defines a reference to a schema node
-   * named "Pet":
-   *
-   * type: object
-   * properties:
-   * pet:
-   * ref: #/defs/Pet
-   * defs:
-   * Pet:
-   * type: object
-   * properties:
-   * name:
-   * type: string
-   *
-   * The value of the "pet" property is a reference to the schema node
-   * named "Pet".
-   * See details in
-   * https://json-schema.org/understanding-json-schema/structuring
-   * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The ref. - */ - java.lang.String getRef(); - - /** - * - * - *
-   * Optional. Allows indirect references between schema nodes. The value should
-   * be a valid reference to a child of the root `defs`.
-   *
-   * For example, the following schema defines a reference to a schema node
-   * named "Pet":
-   *
-   * type: object
-   * properties:
-   * pet:
-   * ref: #/defs/Pet
-   * defs:
-   * Pet:
-   * type: object
-   * properties:
-   * name:
-   * type: string
-   *
-   * The value of the "pet" property is a reference to the schema node
-   * named "Pet".
-   * See details in
-   * https://json-schema.org/understanding-json-schema/structuring
-   * 
- * - * string ref = 27 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for ref. - */ - com.google.protobuf.ByteString getRefBytes(); - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getDefsCount(); - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsDefs(java.lang.String key); - - /** Use {@link #getDefsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getDefs(); - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getDefsMap(); - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - /* nullable */ - com.google.cloud.vertexai.api.Schema getDefsOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Schema defaultValue); - - /** - * - * - *
-   * Optional. A map of definitions for use by `ref`
-   * Only allowed at the root of the schema.
-   * 
- * - * - * map<string, .google.cloud.vertexai.v1.Schema> defs = 28 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Schema getDefsOrThrow(java.lang.String key); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPoint.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPoint.java deleted file mode 100644 index b7cb78397f87..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPoint.java +++ /dev/null @@ -1,706 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Google search entry point.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SearchEntryPoint} - */ -@com.google.protobuf.Generated -public final class SearchEntryPoint extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SearchEntryPoint) - SearchEntryPointOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchEntryPoint"); - } - - // Use SearchEntryPoint.newBuilder() to construct. - private SearchEntryPoint(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SearchEntryPoint() { - renderedContent_ = ""; - sdkBlob_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SearchEntryPoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SearchEntryPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SearchEntryPoint.class, - com.google.cloud.vertexai.api.SearchEntryPoint.Builder.class); - } - - public static final int RENDERED_CONTENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object renderedContent_ = ""; - - /** - * - * - *
-   * Optional. Web content snippet that can be embedded in a web page or an app
-   * webview.
-   * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The renderedContent. - */ - @java.lang.Override - public java.lang.String getRenderedContent() { - java.lang.Object ref = renderedContent_; - 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(); - renderedContent_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Web content snippet that can be embedded in a web page or an app
-   * webview.
-   * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for renderedContent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRenderedContentBytes() { - java.lang.Object ref = renderedContent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - renderedContent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SDK_BLOB_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString sdkBlob_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Optional. Base64 encoded JSON representing array of <search term, search
-   * url> tuple.
-   * 
- * - * bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The sdkBlob. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSdkBlob() { - return sdkBlob_; - } - - 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.GeneratedMessage.isStringEmpty(renderedContent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, renderedContent_); - } - if (!sdkBlob_.isEmpty()) { - output.writeBytes(2, sdkBlob_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(renderedContent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, renderedContent_); - } - if (!sdkBlob_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, sdkBlob_); - } - 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.vertexai.api.SearchEntryPoint)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SearchEntryPoint other = - (com.google.cloud.vertexai.api.SearchEntryPoint) obj; - - if (!getRenderedContent().equals(other.getRenderedContent())) return false; - if (!getSdkBlob().equals(other.getSdkBlob())) 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) + RENDERED_CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getRenderedContent().hashCode(); - hash = (37 * hash) + SDK_BLOB_FIELD_NUMBER; - hash = (53 * hash) + getSdkBlob().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint 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.vertexai.api.SearchEntryPoint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint 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.vertexai.api.SearchEntryPoint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SearchEntryPoint 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Google search entry point.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SearchEntryPoint} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SearchEntryPoint) - com.google.cloud.vertexai.api.SearchEntryPointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SearchEntryPoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SearchEntryPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SearchEntryPoint.class, - com.google.cloud.vertexai.api.SearchEntryPoint.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SearchEntryPoint.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - renderedContent_ = ""; - sdkBlob_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SearchEntryPoint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SearchEntryPoint getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SearchEntryPoint build() { - com.google.cloud.vertexai.api.SearchEntryPoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SearchEntryPoint buildPartial() { - com.google.cloud.vertexai.api.SearchEntryPoint result = - new com.google.cloud.vertexai.api.SearchEntryPoint(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SearchEntryPoint result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.renderedContent_ = renderedContent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.sdkBlob_ = sdkBlob_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SearchEntryPoint) { - return mergeFrom((com.google.cloud.vertexai.api.SearchEntryPoint) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SearchEntryPoint other) { - if (other == com.google.cloud.vertexai.api.SearchEntryPoint.getDefaultInstance()) return this; - if (!other.getRenderedContent().isEmpty()) { - renderedContent_ = other.renderedContent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getSdkBlob().isEmpty()) { - setSdkBlob(other.getSdkBlob()); - } - 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: - { - renderedContent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - sdkBlob_ = input.readBytes(); - 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 renderedContent_ = ""; - - /** - * - * - *
-     * Optional. Web content snippet that can be embedded in a web page or an app
-     * webview.
-     * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The renderedContent. - */ - public java.lang.String getRenderedContent() { - java.lang.Object ref = renderedContent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - renderedContent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Web content snippet that can be embedded in a web page or an app
-     * webview.
-     * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for renderedContent. - */ - public com.google.protobuf.ByteString getRenderedContentBytes() { - java.lang.Object ref = renderedContent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - renderedContent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Web content snippet that can be embedded in a web page or an app
-     * webview.
-     * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The renderedContent to set. - * @return This builder for chaining. - */ - public Builder setRenderedContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - renderedContent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web content snippet that can be embedded in a web page or an app
-     * webview.
-     * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRenderedContent() { - renderedContent_ = getDefaultInstance().getRenderedContent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Web content snippet that can be embedded in a web page or an app
-     * webview.
-     * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for renderedContent to set. - * @return This builder for chaining. - */ - public Builder setRenderedContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - renderedContent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString sdkBlob_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Optional. Base64 encoded JSON representing array of <search term, search
-     * url> tuple.
-     * 
- * - * bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The sdkBlob. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSdkBlob() { - return sdkBlob_; - } - - /** - * - * - *
-     * Optional. Base64 encoded JSON representing array of <search term, search
-     * url> tuple.
-     * 
- * - * bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The sdkBlob to set. - * @return This builder for chaining. - */ - public Builder setSdkBlob(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - sdkBlob_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Base64 encoded JSON representing array of <search term, search
-     * url> tuple.
-     * 
- * - * bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearSdkBlob() { - bitField0_ = (bitField0_ & ~0x00000002); - sdkBlob_ = getDefaultInstance().getSdkBlob(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SearchEntryPoint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SearchEntryPoint) - private static final com.google.cloud.vertexai.api.SearchEntryPoint DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SearchEntryPoint(); - } - - public static com.google.cloud.vertexai.api.SearchEntryPoint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchEntryPoint 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.vertexai.api.SearchEntryPoint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPointOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPointOrBuilder.java deleted file mode 100644 index e08432bc5447..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SearchEntryPointOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SearchEntryPointOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SearchEntryPoint) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Web content snippet that can be embedded in a web page or an app
-   * webview.
-   * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The renderedContent. - */ - java.lang.String getRenderedContent(); - - /** - * - * - *
-   * Optional. Web content snippet that can be embedded in a web page or an app
-   * webview.
-   * 
- * - * string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for renderedContent. - */ - com.google.protobuf.ByteString getRenderedContentBytes(); - - /** - * - * - *
-   * Optional. Base64 encoded JSON representing array of <search term, search
-   * url> tuple.
-   * 
- * - * bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The sdkBlob. - */ - com.google.protobuf.ByteString getSdkBlob(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Segment.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Segment.java deleted file mode 100644 index 70d610e386a1..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Segment.java +++ /dev/null @@ -1,892 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Segment of the content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Segment} - */ -@com.google.protobuf.Generated -public final class Segment extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Segment) - SegmentOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Segment"); - } - - // Use Segment.newBuilder() to construct. - private Segment(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Segment() { - text_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Segment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Segment.class, - com.google.cloud.vertexai.api.Segment.Builder.class); - } - - public static final int PART_INDEX_FIELD_NUMBER = 1; - private int partIndex_ = 0; - - /** - * - * - *
-   * Output only. The index of a Part object within its parent Content object.
-   * 
- * - * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The partIndex. - */ - @java.lang.Override - public int getPartIndex() { - return partIndex_; - } - - public static final int START_INDEX_FIELD_NUMBER = 2; - private int startIndex_ = 0; - - /** - * - * - *
-   * Output only. Start index in the given Part, measured in bytes. Offset from
-   * the start of the Part, inclusive, starting at zero.
-   * 
- * - * int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - @java.lang.Override - public int getStartIndex() { - return startIndex_; - } - - public static final int END_INDEX_FIELD_NUMBER = 3; - private int endIndex_ = 0; - - /** - * - * - *
-   * Output only. End index in the given Part, measured in bytes. Offset from
-   * the start of the Part, exclusive, starting at zero.
-   * 
- * - * int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - @java.lang.Override - public int getEndIndex() { - return endIndex_; - } - - public static final int TEXT_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object text_ = ""; - - /** - * - * - *
-   * Output only. The text corresponding to the segment from the response.
-   * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - - /** - * - * - *
-   * Output only. The text corresponding to the segment from the response.
-   * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = 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 (partIndex_ != 0) { - output.writeInt32(1, partIndex_); - } - if (startIndex_ != 0) { - output.writeInt32(2, startIndex_); - } - if (endIndex_ != 0) { - output.writeInt32(3, endIndex_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, text_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, partIndex_); - } - if (startIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, startIndex_); - } - if (endIndex_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, endIndex_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, text_); - } - 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.vertexai.api.Segment)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Segment other = (com.google.cloud.vertexai.api.Segment) obj; - - if (getPartIndex() != other.getPartIndex()) return false; - if (getStartIndex() != other.getStartIndex()) return false; - if (getEndIndex() != other.getEndIndex()) return false; - if (!getText().equals(other.getText())) 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) + PART_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getPartIndex(); - hash = (37 * hash) + START_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getStartIndex(); - hash = (37 * hash) + END_INDEX_FIELD_NUMBER; - hash = (53 * hash) + getEndIndex(); - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Segment parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Segment 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.vertexai.api.Segment parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Segment 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.vertexai.api.Segment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Segment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Segment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Segment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Segment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Segment parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Segment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Segment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Segment 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Segment of the content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Segment} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Segment) - com.google.cloud.vertexai.api.SegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Segment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Segment.class, - com.google.cloud.vertexai.api.Segment.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Segment.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - partIndex_ = 0; - startIndex_ = 0; - endIndex_ = 0; - text_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_Segment_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Segment getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Segment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Segment build() { - com.google.cloud.vertexai.api.Segment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Segment buildPartial() { - com.google.cloud.vertexai.api.Segment result = - new com.google.cloud.vertexai.api.Segment(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Segment result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.partIndex_ = partIndex_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startIndex_ = startIndex_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endIndex_ = endIndex_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.text_ = text_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Segment) { - return mergeFrom((com.google.cloud.vertexai.api.Segment) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Segment other) { - if (other == com.google.cloud.vertexai.api.Segment.getDefaultInstance()) return this; - if (other.getPartIndex() != 0) { - setPartIndex(other.getPartIndex()); - } - if (other.getStartIndex() != 0) { - setStartIndex(other.getStartIndex()); - } - if (other.getEndIndex() != 0) { - setEndIndex(other.getEndIndex()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - 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 8: - { - partIndex_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - startIndex_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - endIndex_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - text_ = 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 int partIndex_; - - /** - * - * - *
-     * Output only. The index of a Part object within its parent Content object.
-     * 
- * - * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The partIndex. - */ - @java.lang.Override - public int getPartIndex() { - return partIndex_; - } - - /** - * - * - *
-     * Output only. The index of a Part object within its parent Content object.
-     * 
- * - * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The partIndex to set. - * @return This builder for chaining. - */ - public Builder setPartIndex(int value) { - - partIndex_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The index of a Part object within its parent Content object.
-     * 
- * - * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearPartIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - partIndex_ = 0; - onChanged(); - return this; - } - - private int startIndex_; - - /** - * - * - *
-     * Output only. Start index in the given Part, measured in bytes. Offset from
-     * the start of the Part, inclusive, starting at zero.
-     * 
- * - * int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - @java.lang.Override - public int getStartIndex() { - return startIndex_; - } - - /** - * - * - *
-     * Output only. Start index in the given Part, measured in bytes. Offset from
-     * the start of the Part, inclusive, starting at zero.
-     * 
- * - * int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The startIndex to set. - * @return This builder for chaining. - */ - public Builder setStartIndex(int value) { - - startIndex_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. Start index in the given Part, measured in bytes. Offset from
-     * the start of the Part, inclusive, starting at zero.
-     * 
- * - * int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStartIndex() { - bitField0_ = (bitField0_ & ~0x00000002); - startIndex_ = 0; - onChanged(); - return this; - } - - private int endIndex_; - - /** - * - * - *
-     * Output only. End index in the given Part, measured in bytes. Offset from
-     * the start of the Part, exclusive, starting at zero.
-     * 
- * - * int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - @java.lang.Override - public int getEndIndex() { - return endIndex_; - } - - /** - * - * - *
-     * Output only. End index in the given Part, measured in bytes. Offset from
-     * the start of the Part, exclusive, starting at zero.
-     * 
- * - * int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The endIndex to set. - * @return This builder for chaining. - */ - public Builder setEndIndex(int value) { - - endIndex_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. End index in the given Part, measured in bytes. Offset from
-     * the start of the Part, exclusive, starting at zero.
-     * 
- * - * int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearEndIndex() { - bitField0_ = (bitField0_ & ~0x00000004); - endIndex_ = 0; - onChanged(); - return this; - } - - private java.lang.Object text_ = ""; - - /** - * - * - *
-     * Output only. The text corresponding to the segment from the response.
-     * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Output only. The text corresponding to the segment from the response.
-     * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for text. - */ - public com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Output only. The text corresponding to the segment from the response.
-     * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - text_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The text corresponding to the segment from the response.
-     * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearText() { - text_ = getDefaultInstance().getText(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The text corresponding to the segment from the response.
-     * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - text_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Segment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Segment) - private static final com.google.cloud.vertexai.api.Segment DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Segment(); - } - - public static com.google.cloud.vertexai.api.Segment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Segment 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.vertexai.api.Segment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SegmentOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SegmentOrBuilder.java deleted file mode 100644 index 105492943f5f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SegmentOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Segment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The index of a Part object within its parent Content object.
-   * 
- * - * int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The partIndex. - */ - int getPartIndex(); - - /** - * - * - *
-   * Output only. Start index in the given Part, measured in bytes. Offset from
-   * the start of the Part, inclusive, starting at zero.
-   * 
- * - * int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The startIndex. - */ - int getStartIndex(); - - /** - * - * - *
-   * Output only. End index in the given Part, measured in bytes. Offset from
-   * the start of the Part, exclusive, starting at zero.
-   * 
- * - * int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The endIndex. - */ - int getEndIndex(); - - /** - * - * - *
-   * Output only. The text corresponding to the segment from the response.
-   * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The text. - */ - java.lang.String getText(); - - /** - * - * - *
-   * Output only. The text corresponding to the segment from the response.
-   * 
- * - * string text = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for text. - */ - com.google.protobuf.ByteString getTextBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ServiceNetworkingProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ServiceNetworkingProto.java deleted file mode 100644 index 23c99c911ee9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ServiceNetworkingProto.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/service_networking.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ServiceNetworkingProto extends com.google.protobuf.GeneratedFile { - private ServiceNetworkingProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ServiceNetworkingProto"); - } - - 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_vertexai_v1_PSCAutomationConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_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" - + "1google/cloud/vertexai/v1/service_netwo" - + "rking.proto\022\030google.cloud.vertexai.v1\032\037g" - + "oogle/api/field_behavior.proto\032\031google/api/resource.proto\"\331\001\n" - + "\023PSCAutomationConfig\022\027\n\n" - + "project_id\030\001 \001(\tB\003\340A\002\022\024\n" - + "\007network\030\002 \001(\tB\003\340A\002\022\027\n\n" - + "ip_address\030\003 \001(\tB\003\340A\003\022\034\n" - + "\017forwarding_rule\030\004 \001(\tB\003\340A\003\022@\n" - + "\005state\030\005 \001(\0162," - + ".google.cloud.vertexai.v1.PSCAutomationStateB\003\340A\003\022\032\n\r" - + "error_message\030\006 \001(\tB\003\340A\003\"\332\001\n" - + "\033PrivateServiceConnectConfig\022+\n" - + "\036enable_private_service_connect\030\001 \001(\010B\003\340A\002\022\031\n" - + "\021project_allowlist\030\002 \003(\t\022R\n" - + "\026psc_automation_configs\030\003" - + " \003(\0132-.google.cloud.vertexai.v1.PSCAutomationConfigB\003\340A\001\022\037\n" - + "\022service_attachment\030\005 \001(\tB\003\340A\003\"S\n" - + "\025PscAutomatedEndpoints\022\022\n\n" - + "project_id\030\001 \001(\t\022\017\n" - + "\007network\030\002 \001(\t\022\025\n\r" - + "match_address\030\003 \001(\t\"\260\001\n" - + "\022PscInterfaceConfig\022L\n" - + "\022network_attachment\030\001 \001(\tB0\340A\001\372A*\n" - + "(compute.googleapis.com/NetworkAttachment\022L\n" - + "\023dns_peering_configs\030\002 \003(\0132*.goog" - + "le.cloud.vertexai.v1.DnsPeeringConfigB\003\340A\001\"a\n" - + "\020DnsPeeringConfig\022\023\n" - + "\006domain\030\001 \001(\tB\003\340A\002\022\033\n" - + "\016target_project\030\002 \001(\tB\003\340A\002\022\033\n" - + "\016target_network\030\003 \001(\tB\003\340A\002*\200\001\n" - + "\022PSCAutomationState\022$\n" - + " PSC_AUTOMATION_STATE_UNSPECIFIED\020\000\022#\n" - + "\037PSC_AUTOMATION_STATE_SUCCESSFUL\020\001\022\037\n" - + "\033PSC_AUTOMATION_STATE_FAILED\020\002B\314\002\n" - + "\035com.google.cloud.vertexai.apiB\026ServiceNetwo" - + "rkingProtoP\001Z>cloud.google.com/go/aiplat" - + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" - + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" - + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1\352Av\n" - + "(compute.googleapis.com/NetworkAttachment\022Jprojects/{project}/regions/" - + "{region}/networkAttachments/{networkattachment}b\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_cloud_vertexai_v1_PSCAutomationConfig_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PSCAutomationConfig_descriptor, - new java.lang.String[] { - "ProjectId", "Network", "IpAddress", "ForwardingRule", "State", "ErrorMessage", - }); - internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PrivateServiceConnectConfig_descriptor, - new java.lang.String[] { - "EnablePrivateServiceConnect", - "ProjectAllowlist", - "PscAutomationConfigs", - "ServiceAttachment", - }); - internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PscAutomatedEndpoints_descriptor, - new java.lang.String[] { - "ProjectId", "Network", "MatchAddress", - }); - internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PscInterfaceConfig_descriptor, - new java.lang.String[] { - "NetworkAttachment", "DnsPeeringConfigs", - }); - internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DnsPeeringConfig_descriptor, - new java.lang.String[] { - "Domain", "TargetProject", "TargetNetwork", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSources.java deleted file mode 100644 index 3761a3f2284b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSources.java +++ /dev/null @@ -1,3914 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The SharePointSources to pass to ImportRagFiles.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SharePointSources} - */ -@com.google.protobuf.Generated -public final class SharePointSources extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SharePointSources) - SharePointSourcesOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SharePointSources"); - } - - // Use SharePointSources.newBuilder() to construct. - private SharePointSources(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SharePointSources() { - sharePointSources_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SharePointSources.class, - com.google.cloud.vertexai.api.SharePointSources.Builder.class); - } - - public interface SharePointSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SharePointSources.SharePointSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return Whether the sharepointFolderPath field is set. - */ - boolean hasSharepointFolderPath(); - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return The sharepointFolderPath. - */ - java.lang.String getSharepointFolderPath(); - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return The bytes for sharepointFolderPath. - */ - com.google.protobuf.ByteString getSharepointFolderPathBytes(); - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return Whether the sharepointFolderId field is set. - */ - boolean hasSharepointFolderId(); - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return The sharepointFolderId. - */ - java.lang.String getSharepointFolderId(); - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return The bytes for sharepointFolderId. - */ - com.google.protobuf.ByteString getSharepointFolderIdBytes(); - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return Whether the driveName field is set. - */ - boolean hasDriveName(); - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return The driveName. - */ - java.lang.String getDriveName(); - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return The bytes for driveName. - */ - com.google.protobuf.ByteString getDriveNameBytes(); - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return Whether the driveId field is set. - */ - boolean hasDriveId(); - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return The driveId. - */ - java.lang.String getDriveId(); - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return The bytes for driveId. - */ - com.google.protobuf.ByteString getDriveIdBytes(); - - /** - * - * - *
-     * The Application ID for the app registered in Microsoft Azure Portal.
-     * The application must also be configured with MS Graph permissions
-     * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-     * 
- * - * string client_id = 1; - * - * @return The clientId. - */ - java.lang.String getClientId(); - - /** - * - * - *
-     * The Application ID for the app registered in Microsoft Azure Portal.
-     * The application must also be configured with MS Graph permissions
-     * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-     * 
- * - * string client_id = 1; - * - * @return The bytes for clientId. - */ - com.google.protobuf.ByteString getClientIdBytes(); - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return Whether the clientSecret field is set. - */ - boolean hasClientSecret(); - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return The clientSecret. - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getClientSecret(); - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getClientSecretOrBuilder(); - - /** - * - * - *
-     * Unique identifier of the Azure Active Directory Instance.
-     * 
- * - * string tenant_id = 3; - * - * @return The tenantId. - */ - java.lang.String getTenantId(); - - /** - * - * - *
-     * Unique identifier of the Azure Active Directory Instance.
-     * 
- * - * string tenant_id = 3; - * - * @return The bytes for tenantId. - */ - com.google.protobuf.ByteString getTenantIdBytes(); - - /** - * - * - *
-     * The name of the SharePoint site to download from. This can be the site
-     * name or the site id.
-     * 
- * - * string sharepoint_site_name = 4; - * - * @return The sharepointSiteName. - */ - java.lang.String getSharepointSiteName(); - - /** - * - * - *
-     * The name of the SharePoint site to download from. This can be the site
-     * name or the site id.
-     * 
- * - * string sharepoint_site_name = 4; - * - * @return The bytes for sharepointSiteName. - */ - com.google.protobuf.ByteString getSharepointSiteNameBytes(); - - /** - * - * - *
-     * Output only. The SharePoint file id. Output only.
-     * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The fileId. - */ - java.lang.String getFileId(); - - /** - * - * - *
-     * Output only. The SharePoint file id. Output only.
-     * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for fileId. - */ - com.google.protobuf.ByteString getFileIdBytes(); - - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.FolderSourceCase - getFolderSourceCase(); - - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.DriveSourceCase - getDriveSourceCase(); - } - - /** - * - * - *
-   * An individual SharePointSource.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SharePointSources.SharePointSource} - */ - public static final class SharePointSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SharePointSources.SharePointSource) - SharePointSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SharePointSource"); - } - - // Use SharePointSource.newBuilder() to construct. - private SharePointSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SharePointSource() { - clientId_ = ""; - tenantId_ = ""; - sharepointSiteName_ = ""; - fileId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.class, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder.class); - } - - private int bitField0_; - private int folderSourceCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object folderSource_; - - public enum FolderSourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SHAREPOINT_FOLDER_PATH(5), - SHAREPOINT_FOLDER_ID(6), - FOLDERSOURCE_NOT_SET(0); - private final int value; - - private FolderSourceCase(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 FolderSourceCase valueOf(int value) { - return forNumber(value); - } - - public static FolderSourceCase forNumber(int value) { - switch (value) { - case 5: - return SHAREPOINT_FOLDER_PATH; - case 6: - return SHAREPOINT_FOLDER_ID; - case 0: - return FOLDERSOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public FolderSourceCase getFolderSourceCase() { - return FolderSourceCase.forNumber(folderSourceCase_); - } - - private int driveSourceCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object driveSource_; - - public enum DriveSourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DRIVE_NAME(7), - DRIVE_ID(8), - DRIVESOURCE_NOT_SET(0); - private final int value; - - private DriveSourceCase(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 DriveSourceCase valueOf(int value) { - return forNumber(value); - } - - public static DriveSourceCase forNumber(int value) { - switch (value) { - case 7: - return DRIVE_NAME; - case 8: - return DRIVE_ID; - case 0: - return DRIVESOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DriveSourceCase getDriveSourceCase() { - return DriveSourceCase.forNumber(driveSourceCase_); - } - - public static final int SHAREPOINT_FOLDER_PATH_FIELD_NUMBER = 5; - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return Whether the sharepointFolderPath field is set. - */ - public boolean hasSharepointFolderPath() { - return folderSourceCase_ == 5; - } - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return The sharepointFolderPath. - */ - public java.lang.String getSharepointFolderPath() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 5) { - ref = folderSource_; - } - 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 (folderSourceCase_ == 5) { - folderSource_ = s; - } - return s; - } - } - - /** - * - * - *
-     * The path of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_path = 5; - * - * @return The bytes for sharepointFolderPath. - */ - public com.google.protobuf.ByteString getSharepointFolderPathBytes() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 5) { - ref = folderSource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (folderSourceCase_ == 5) { - folderSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHAREPOINT_FOLDER_ID_FIELD_NUMBER = 6; - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return Whether the sharepointFolderId field is set. - */ - public boolean hasSharepointFolderId() { - return folderSourceCase_ == 6; - } - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return The sharepointFolderId. - */ - public java.lang.String getSharepointFolderId() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 6) { - ref = folderSource_; - } - 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 (folderSourceCase_ == 6) { - folderSource_ = s; - } - return s; - } - } - - /** - * - * - *
-     * The ID of the SharePoint folder to download from.
-     * 
- * - * string sharepoint_folder_id = 6; - * - * @return The bytes for sharepointFolderId. - */ - public com.google.protobuf.ByteString getSharepointFolderIdBytes() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 6) { - ref = folderSource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (folderSourceCase_ == 6) { - folderSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DRIVE_NAME_FIELD_NUMBER = 7; - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return Whether the driveName field is set. - */ - public boolean hasDriveName() { - return driveSourceCase_ == 7; - } - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return The driveName. - */ - public java.lang.String getDriveName() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 7) { - ref = driveSource_; - } - 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 (driveSourceCase_ == 7) { - driveSource_ = s; - } - return s; - } - } - - /** - * - * - *
-     * The name of the drive to download from.
-     * 
- * - * string drive_name = 7; - * - * @return The bytes for driveName. - */ - public com.google.protobuf.ByteString getDriveNameBytes() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 7) { - ref = driveSource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driveSourceCase_ == 7) { - driveSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DRIVE_ID_FIELD_NUMBER = 8; - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return Whether the driveId field is set. - */ - public boolean hasDriveId() { - return driveSourceCase_ == 8; - } - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return The driveId. - */ - public java.lang.String getDriveId() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 8) { - ref = driveSource_; - } - 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 (driveSourceCase_ == 8) { - driveSource_ = s; - } - return s; - } - } - - /** - * - * - *
-     * The ID of the drive to download from.
-     * 
- * - * string drive_id = 8; - * - * @return The bytes for driveId. - */ - public com.google.protobuf.ByteString getDriveIdBytes() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 8) { - ref = driveSource_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driveSourceCase_ == 8) { - driveSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLIENT_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object clientId_ = ""; - - /** - * - * - *
-     * The Application ID for the app registered in Microsoft Azure Portal.
-     * The application must also be configured with MS Graph permissions
-     * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-     * 
- * - * string client_id = 1; - * - * @return The clientId. - */ - @java.lang.Override - public java.lang.String getClientId() { - java.lang.Object ref = clientId_; - 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(); - clientId_ = s; - return s; - } - } - - /** - * - * - *
-     * The Application ID for the app registered in Microsoft Azure Portal.
-     * The application must also be configured with MS Graph permissions
-     * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-     * 
- * - * string client_id = 1; - * - * @return The bytes for clientId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLIENT_SECRET_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig clientSecret_; - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return Whether the clientSecret field is set. - */ - @java.lang.Override - public boolean hasClientSecret() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return The clientSecret. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getClientSecret() { - return clientSecret_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : clientSecret_; - } - - /** - * - * - *
-     * The application secret for the app registered in Azure.
-     * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getClientSecretOrBuilder() { - return clientSecret_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : clientSecret_; - } - - public static final int TENANT_ID_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object tenantId_ = ""; - - /** - * - * - *
-     * Unique identifier of the Azure Active Directory Instance.
-     * 
- * - * string tenant_id = 3; - * - * @return The tenantId. - */ - @java.lang.Override - public java.lang.String getTenantId() { - java.lang.Object ref = tenantId_; - 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(); - tenantId_ = s; - return s; - } - } - - /** - * - * - *
-     * Unique identifier of the Azure Active Directory Instance.
-     * 
- * - * string tenant_id = 3; - * - * @return The bytes for tenantId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTenantIdBytes() { - java.lang.Object ref = tenantId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tenantId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHAREPOINT_SITE_NAME_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object sharepointSiteName_ = ""; - - /** - * - * - *
-     * The name of the SharePoint site to download from. This can be the site
-     * name or the site id.
-     * 
- * - * string sharepoint_site_name = 4; - * - * @return The sharepointSiteName. - */ - @java.lang.Override - public java.lang.String getSharepointSiteName() { - java.lang.Object ref = sharepointSiteName_; - 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(); - sharepointSiteName_ = s; - return s; - } - } - - /** - * - * - *
-     * The name of the SharePoint site to download from. This can be the site
-     * name or the site id.
-     * 
- * - * string sharepoint_site_name = 4; - * - * @return The bytes for sharepointSiteName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSharepointSiteNameBytes() { - java.lang.Object ref = sharepointSiteName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sharepointSiteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILE_ID_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private volatile java.lang.Object fileId_ = ""; - - /** - * - * - *
-     * Output only. The SharePoint file id. Output only.
-     * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The fileId. - */ - @java.lang.Override - public java.lang.String getFileId() { - java.lang.Object ref = fileId_; - 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(); - fileId_ = s; - return s; - } - } - - /** - * - * - *
-     * Output only. The SharePoint file id. Output only.
-     * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for fileId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFileIdBytes() { - java.lang.Object ref = fileId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileId_ = 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.GeneratedMessage.isStringEmpty(clientId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, clientId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getClientSecret()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenantId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, tenantId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sharepointSiteName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, sharepointSiteName_); - } - if (folderSourceCase_ == 5) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, folderSource_); - } - if (folderSourceCase_ == 6) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, folderSource_); - } - if (driveSourceCase_ == 7) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, driveSource_); - } - if (driveSourceCase_ == 8) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, driveSource_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 9, fileId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clientId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClientSecret()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenantId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, tenantId_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sharepointSiteName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, sharepointSiteName_); - } - if (folderSourceCase_ == 5) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, folderSource_); - } - if (folderSourceCase_ == 6) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, folderSource_); - } - if (driveSourceCase_ == 7) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, driveSource_); - } - if (driveSourceCase_ == 8) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(8, driveSource_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(9, fileId_); - } - 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.vertexai.api.SharePointSources.SharePointSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SharePointSources.SharePointSource other = - (com.google.cloud.vertexai.api.SharePointSources.SharePointSource) obj; - - if (!getClientId().equals(other.getClientId())) return false; - if (hasClientSecret() != other.hasClientSecret()) return false; - if (hasClientSecret()) { - if (!getClientSecret().equals(other.getClientSecret())) return false; - } - if (!getTenantId().equals(other.getTenantId())) return false; - if (!getSharepointSiteName().equals(other.getSharepointSiteName())) return false; - if (!getFileId().equals(other.getFileId())) return false; - if (!getFolderSourceCase().equals(other.getFolderSourceCase())) return false; - switch (folderSourceCase_) { - case 5: - if (!getSharepointFolderPath().equals(other.getSharepointFolderPath())) return false; - break; - case 6: - if (!getSharepointFolderId().equals(other.getSharepointFolderId())) return false; - break; - case 0: - default: - } - if (!getDriveSourceCase().equals(other.getDriveSourceCase())) return false; - switch (driveSourceCase_) { - case 7: - if (!getDriveName().equals(other.getDriveName())) return false; - break; - case 8: - if (!getDriveId().equals(other.getDriveId())) 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) + CLIENT_ID_FIELD_NUMBER; - hash = (53 * hash) + getClientId().hashCode(); - if (hasClientSecret()) { - hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; - hash = (53 * hash) + getClientSecret().hashCode(); - } - hash = (37 * hash) + TENANT_ID_FIELD_NUMBER; - hash = (53 * hash) + getTenantId().hashCode(); - hash = (37 * hash) + SHAREPOINT_SITE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getSharepointSiteName().hashCode(); - hash = (37 * hash) + FILE_ID_FIELD_NUMBER; - hash = (53 * hash) + getFileId().hashCode(); - switch (folderSourceCase_) { - case 5: - hash = (37 * hash) + SHAREPOINT_FOLDER_PATH_FIELD_NUMBER; - hash = (53 * hash) + getSharepointFolderPath().hashCode(); - break; - case 6: - hash = (37 * hash) + SHAREPOINT_FOLDER_ID_FIELD_NUMBER; - hash = (53 * hash) + getSharepointFolderId().hashCode(); - break; - case 0: - default: - } - switch (driveSourceCase_) { - case 7: - hash = (37 * hash) + DRIVE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDriveName().hashCode(); - break; - case 8: - hash = (37 * hash) + DRIVE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDriveId().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource 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.vertexai.api.SharePointSources.SharePointSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource 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.vertexai.api.SharePointSources.SharePointSource parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SharePointSources.SharePointSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * An individual SharePointSource.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SharePointSources.SharePointSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SharePointSources.SharePointSource) - com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.class, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder.class); - } - - // Construct using - // com.google.cloud.vertexai.api.SharePointSources.SharePointSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetClientSecretFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - clientId_ = ""; - clientSecret_ = null; - if (clientSecretBuilder_ != null) { - clientSecretBuilder_.dispose(); - clientSecretBuilder_ = null; - } - tenantId_ = ""; - sharepointSiteName_ = ""; - fileId_ = ""; - folderSourceCase_ = 0; - folderSource_ = null; - driveSourceCase_ = 0; - driveSource_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_SharePointSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SharePointSources.SharePointSource - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource build() { - com.google.cloud.vertexai.api.SharePointSources.SharePointSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource buildPartial() { - com.google.cloud.vertexai.api.SharePointSources.SharePointSource result = - new com.google.cloud.vertexai.api.SharePointSources.SharePointSource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.clientId_ = clientId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.clientSecret_ = - clientSecretBuilder_ == null ? clientSecret_ : clientSecretBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.tenantId_ = tenantId_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.sharepointSiteName_ = sharepointSiteName_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.fileId_ = fileId_; - } - result.bitField0_ |= to_bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource result) { - result.folderSourceCase_ = folderSourceCase_; - result.folderSource_ = this.folderSource_; - result.driveSourceCase_ = driveSourceCase_; - result.driveSource_ = this.driveSource_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SharePointSources.SharePointSource) { - return mergeFrom( - (com.google.cloud.vertexai.api.SharePointSources.SharePointSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource other) { - if (other - == com.google.cloud.vertexai.api.SharePointSources.SharePointSource - .getDefaultInstance()) return this; - if (!other.getClientId().isEmpty()) { - clientId_ = other.clientId_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasClientSecret()) { - mergeClientSecret(other.getClientSecret()); - } - if (!other.getTenantId().isEmpty()) { - tenantId_ = other.tenantId_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.getSharepointSiteName().isEmpty()) { - sharepointSiteName_ = other.sharepointSiteName_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (!other.getFileId().isEmpty()) { - fileId_ = other.fileId_; - bitField0_ |= 0x00000100; - onChanged(); - } - switch (other.getFolderSourceCase()) { - case SHAREPOINT_FOLDER_PATH: - { - folderSourceCase_ = 5; - folderSource_ = other.folderSource_; - onChanged(); - break; - } - case SHAREPOINT_FOLDER_ID: - { - folderSourceCase_ = 6; - folderSource_ = other.folderSource_; - onChanged(); - break; - } - case FOLDERSOURCE_NOT_SET: - { - break; - } - } - switch (other.getDriveSourceCase()) { - case DRIVE_NAME: - { - driveSourceCase_ = 7; - driveSource_ = other.driveSource_; - onChanged(); - break; - } - case DRIVE_ID: - { - driveSourceCase_ = 8; - driveSource_ = other.driveSource_; - onChanged(); - break; - } - case DRIVESOURCE_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: - { - clientId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetClientSecretFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 18 - case 26: - { - tenantId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 26 - case 34: - { - sharepointSiteName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 34 - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - folderSourceCase_ = 5; - folderSource_ = s; - break; - } // case 42 - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - folderSourceCase_ = 6; - folderSource_ = s; - break; - } // case 50 - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - driveSourceCase_ = 7; - driveSource_ = s; - break; - } // case 58 - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - driveSourceCase_ = 8; - driveSource_ = s; - break; - } // case 66 - case 74: - { - fileId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - 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 folderSourceCase_ = 0; - private java.lang.Object folderSource_; - - public FolderSourceCase getFolderSourceCase() { - return FolderSourceCase.forNumber(folderSourceCase_); - } - - public Builder clearFolderSource() { - folderSourceCase_ = 0; - folderSource_ = null; - onChanged(); - return this; - } - - private int driveSourceCase_ = 0; - private java.lang.Object driveSource_; - - public DriveSourceCase getDriveSourceCase() { - return DriveSourceCase.forNumber(driveSourceCase_); - } - - public Builder clearDriveSource() { - driveSourceCase_ = 0; - driveSource_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @return Whether the sharepointFolderPath field is set. - */ - @java.lang.Override - public boolean hasSharepointFolderPath() { - return folderSourceCase_ == 5; - } - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @return The sharepointFolderPath. - */ - @java.lang.Override - public java.lang.String getSharepointFolderPath() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 5) { - ref = folderSource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (folderSourceCase_ == 5) { - folderSource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @return The bytes for sharepointFolderPath. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSharepointFolderPathBytes() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 5) { - ref = folderSource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (folderSourceCase_ == 5) { - folderSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @param value The sharepointFolderPath to set. - * @return This builder for chaining. - */ - public Builder setSharepointFolderPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - folderSourceCase_ = 5; - folderSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @return This builder for chaining. - */ - public Builder clearSharepointFolderPath() { - if (folderSourceCase_ == 5) { - folderSourceCase_ = 0; - folderSource_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The path of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_path = 5; - * - * @param value The bytes for sharepointFolderPath to set. - * @return This builder for chaining. - */ - public Builder setSharepointFolderPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - folderSourceCase_ = 5; - folderSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @return Whether the sharepointFolderId field is set. - */ - @java.lang.Override - public boolean hasSharepointFolderId() { - return folderSourceCase_ == 6; - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @return The sharepointFolderId. - */ - @java.lang.Override - public java.lang.String getSharepointFolderId() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 6) { - ref = folderSource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (folderSourceCase_ == 6) { - folderSource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @return The bytes for sharepointFolderId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSharepointFolderIdBytes() { - java.lang.Object ref = ""; - if (folderSourceCase_ == 6) { - ref = folderSource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (folderSourceCase_ == 6) { - folderSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @param value The sharepointFolderId to set. - * @return This builder for chaining. - */ - public Builder setSharepointFolderId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - folderSourceCase_ = 6; - folderSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @return This builder for chaining. - */ - public Builder clearSharepointFolderId() { - if (folderSourceCase_ == 6) { - folderSourceCase_ = 0; - folderSource_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The ID of the SharePoint folder to download from.
-       * 
- * - * string sharepoint_folder_id = 6; - * - * @param value The bytes for sharepointFolderId to set. - * @return This builder for chaining. - */ - public Builder setSharepointFolderIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - folderSourceCase_ = 6; - folderSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @return Whether the driveName field is set. - */ - @java.lang.Override - public boolean hasDriveName() { - return driveSourceCase_ == 7; - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @return The driveName. - */ - @java.lang.Override - public java.lang.String getDriveName() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 7) { - ref = driveSource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driveSourceCase_ == 7) { - driveSource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @return The bytes for driveName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDriveNameBytes() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 7) { - ref = driveSource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driveSourceCase_ == 7) { - driveSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @param value The driveName to set. - * @return This builder for chaining. - */ - public Builder setDriveName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driveSourceCase_ = 7; - driveSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @return This builder for chaining. - */ - public Builder clearDriveName() { - if (driveSourceCase_ == 7) { - driveSourceCase_ = 0; - driveSource_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The name of the drive to download from.
-       * 
- * - * string drive_name = 7; - * - * @param value The bytes for driveName to set. - * @return This builder for chaining. - */ - public Builder setDriveNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driveSourceCase_ = 7; - driveSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @return Whether the driveId field is set. - */ - @java.lang.Override - public boolean hasDriveId() { - return driveSourceCase_ == 8; - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @return The driveId. - */ - @java.lang.Override - public java.lang.String getDriveId() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 8) { - ref = driveSource_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driveSourceCase_ == 8) { - driveSource_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @return The bytes for driveId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDriveIdBytes() { - java.lang.Object ref = ""; - if (driveSourceCase_ == 8) { - ref = driveSource_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driveSourceCase_ == 8) { - driveSource_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @param value The driveId to set. - * @return This builder for chaining. - */ - public Builder setDriveId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driveSourceCase_ = 8; - driveSource_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @return This builder for chaining. - */ - public Builder clearDriveId() { - if (driveSourceCase_ == 8) { - driveSourceCase_ = 0; - driveSource_ = null; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The ID of the drive to download from.
-       * 
- * - * string drive_id = 8; - * - * @param value The bytes for driveId to set. - * @return This builder for chaining. - */ - public Builder setDriveIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driveSourceCase_ = 8; - driveSource_ = value; - onChanged(); - return this; - } - - private java.lang.Object clientId_ = ""; - - /** - * - * - *
-       * The Application ID for the app registered in Microsoft Azure Portal.
-       * The application must also be configured with MS Graph permissions
-       * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-       * 
- * - * string client_id = 1; - * - * @return The clientId. - */ - public java.lang.String getClientId() { - java.lang.Object ref = clientId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clientId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The Application ID for the app registered in Microsoft Azure Portal.
-       * The application must also be configured with MS Graph permissions
-       * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-       * 
- * - * string client_id = 1; - * - * @return The bytes for clientId. - */ - public com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clientId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The Application ID for the app registered in Microsoft Azure Portal.
-       * The application must also be configured with MS Graph permissions
-       * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-       * 
- * - * string client_id = 1; - * - * @param value The clientId to set. - * @return This builder for chaining. - */ - public Builder setClientId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - clientId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-       * The Application ID for the app registered in Microsoft Azure Portal.
-       * The application must also be configured with MS Graph permissions
-       * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-       * 
- * - * string client_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - /** - * - * - *
-       * The Application ID for the app registered in Microsoft Azure Portal.
-       * The application must also be configured with MS Graph permissions
-       * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
-       * 
- * - * string client_id = 1; - * - * @param value The bytes for clientId to set. - * @return This builder for chaining. - */ - public Builder setClientIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - clientId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig clientSecret_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - clientSecretBuilder_; - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return Whether the clientSecret field is set. - */ - public boolean hasClientSecret() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - * - * @return The clientSecret. - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getClientSecret() { - if (clientSecretBuilder_ == null) { - return clientSecret_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : clientSecret_; - } else { - return clientSecretBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public Builder setClientSecret(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (clientSecretBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - clientSecret_ = value; - } else { - clientSecretBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public Builder setClientSecret( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder builderForValue) { - if (clientSecretBuilder_ == null) { - clientSecret_ = builderForValue.build(); - } else { - clientSecretBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public Builder mergeClientSecret(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (clientSecretBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && clientSecret_ != null - && clientSecret_ - != com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance()) { - getClientSecretBuilder().mergeFrom(value); - } else { - clientSecret_ = value; - } - } else { - clientSecretBuilder_.mergeFrom(value); - } - if (clientSecret_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public Builder clearClientSecret() { - bitField0_ = (bitField0_ & ~0x00000020); - clientSecret_ = null; - if (clientSecretBuilder_ != null) { - clientSecretBuilder_.dispose(); - clientSecretBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder getClientSecretBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetClientSecretFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder - getClientSecretOrBuilder() { - if (clientSecretBuilder_ != null) { - return clientSecretBuilder_.getMessageOrBuilder(); - } else { - return clientSecret_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : clientSecret_; - } - } - - /** - * - * - *
-       * The application secret for the app registered in Azure.
-       * 
- * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig client_secret = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - internalGetClientSecretFieldBuilder() { - if (clientSecretBuilder_ == null) { - clientSecretBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder>( - getClientSecret(), getParentForChildren(), isClean()); - clientSecret_ = null; - } - return clientSecretBuilder_; - } - - private java.lang.Object tenantId_ = ""; - - /** - * - * - *
-       * Unique identifier of the Azure Active Directory Instance.
-       * 
- * - * string tenant_id = 3; - * - * @return The tenantId. - */ - public java.lang.String getTenantId() { - java.lang.Object ref = tenantId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tenantId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Unique identifier of the Azure Active Directory Instance.
-       * 
- * - * string tenant_id = 3; - * - * @return The bytes for tenantId. - */ - public com.google.protobuf.ByteString getTenantIdBytes() { - java.lang.Object ref = tenantId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tenantId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Unique identifier of the Azure Active Directory Instance.
-       * 
- * - * string tenant_id = 3; - * - * @param value The tenantId to set. - * @return This builder for chaining. - */ - public Builder setTenantId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tenantId_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-       * Unique identifier of the Azure Active Directory Instance.
-       * 
- * - * string tenant_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearTenantId() { - tenantId_ = getDefaultInstance().getTenantId(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - /** - * - * - *
-       * Unique identifier of the Azure Active Directory Instance.
-       * 
- * - * string tenant_id = 3; - * - * @param value The bytes for tenantId to set. - * @return This builder for chaining. - */ - public Builder setTenantIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tenantId_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - private java.lang.Object sharepointSiteName_ = ""; - - /** - * - * - *
-       * The name of the SharePoint site to download from. This can be the site
-       * name or the site id.
-       * 
- * - * string sharepoint_site_name = 4; - * - * @return The sharepointSiteName. - */ - public java.lang.String getSharepointSiteName() { - java.lang.Object ref = sharepointSiteName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sharepointSiteName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * The name of the SharePoint site to download from. This can be the site
-       * name or the site id.
-       * 
- * - * string sharepoint_site_name = 4; - * - * @return The bytes for sharepointSiteName. - */ - public com.google.protobuf.ByteString getSharepointSiteNameBytes() { - java.lang.Object ref = sharepointSiteName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sharepointSiteName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * The name of the SharePoint site to download from. This can be the site
-       * name or the site id.
-       * 
- * - * string sharepoint_site_name = 4; - * - * @param value The sharepointSiteName to set. - * @return This builder for chaining. - */ - public Builder setSharepointSiteName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sharepointSiteName_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of the SharePoint site to download from. This can be the site
-       * name or the site id.
-       * 
- * - * string sharepoint_site_name = 4; - * - * @return This builder for chaining. - */ - public Builder clearSharepointSiteName() { - sharepointSiteName_ = getDefaultInstance().getSharepointSiteName(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - /** - * - * - *
-       * The name of the SharePoint site to download from. This can be the site
-       * name or the site id.
-       * 
- * - * string sharepoint_site_name = 4; - * - * @param value The bytes for sharepointSiteName to set. - * @return This builder for chaining. - */ - public Builder setSharepointSiteNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sharepointSiteName_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - private java.lang.Object fileId_ = ""; - - /** - * - * - *
-       * Output only. The SharePoint file id. Output only.
-       * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The fileId. - */ - public java.lang.String getFileId() { - java.lang.Object ref = fileId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fileId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Output only. The SharePoint file id. Output only.
-       * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for fileId. - */ - public com.google.protobuf.ByteString getFileIdBytes() { - java.lang.Object ref = fileId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fileId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Output only. The SharePoint file id. Output only.
-       * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The fileId to set. - * @return This builder for chaining. - */ - public Builder setFileId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - fileId_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The SharePoint file id. Output only.
-       * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearFileId() { - fileId_ = getDefaultInstance().getFileId(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - /** - * - * - *
-       * Output only. The SharePoint file id. Output only.
-       * 
- * - * string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for fileId to set. - * @return This builder for chaining. - */ - public Builder setFileIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - fileId_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SharePointSources.SharePointSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SharePointSources.SharePointSource) - private static final com.google.cloud.vertexai.api.SharePointSources.SharePointSource - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SharePointSources.SharePointSource(); - } - - public static com.google.cloud.vertexai.api.SharePointSources.SharePointSource - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SharePointSource 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.vertexai.api.SharePointSources.SharePointSource - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int SHARE_POINT_SOURCES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - sharePointSources_; - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - @java.lang.Override - public java.util.List - getSharePointSourcesList() { - return sharePointSources_; - } - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder> - getSharePointSourcesOrBuilderList() { - return sharePointSources_; - } - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - @java.lang.Override - public int getSharePointSourcesCount() { - return sharePointSources_.size(); - } - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource getSharePointSources( - int index) { - return sharePointSources_.get(index); - } - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder - getSharePointSourcesOrBuilder(int index) { - return sharePointSources_.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 < sharePointSources_.size(); i++) { - output.writeMessage(1, sharePointSources_.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 < sharePointSources_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, sharePointSources_.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.vertexai.api.SharePointSources)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SharePointSources other = - (com.google.cloud.vertexai.api.SharePointSources) obj; - - if (!getSharePointSourcesList().equals(other.getSharePointSourcesList())) 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 (getSharePointSourcesCount() > 0) { - hash = (37 * hash) + SHARE_POINT_SOURCES_FIELD_NUMBER; - hash = (53 * hash) + getSharePointSourcesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources 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.vertexai.api.SharePointSources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources 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.vertexai.api.SharePointSources parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SharePointSources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SharePointSources 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The SharePointSources to pass to ImportRagFiles.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SharePointSources} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SharePointSources) - com.google.cloud.vertexai.api.SharePointSourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SharePointSources.class, - com.google.cloud.vertexai.api.SharePointSources.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SharePointSources.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (sharePointSourcesBuilder_ == null) { - sharePointSources_ = java.util.Collections.emptyList(); - } else { - sharePointSources_ = null; - sharePointSourcesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SharePointSources_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources build() { - com.google.cloud.vertexai.api.SharePointSources result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SharePointSources buildPartial() { - com.google.cloud.vertexai.api.SharePointSources result = - new com.google.cloud.vertexai.api.SharePointSources(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.SharePointSources result) { - if (sharePointSourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sharePointSources_ = java.util.Collections.unmodifiableList(sharePointSources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sharePointSources_ = sharePointSources_; - } else { - result.sharePointSources_ = sharePointSourcesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.SharePointSources result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SharePointSources) { - return mergeFrom((com.google.cloud.vertexai.api.SharePointSources) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SharePointSources other) { - if (other == com.google.cloud.vertexai.api.SharePointSources.getDefaultInstance()) - return this; - if (sharePointSourcesBuilder_ == null) { - if (!other.sharePointSources_.isEmpty()) { - if (sharePointSources_.isEmpty()) { - sharePointSources_ = other.sharePointSources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSharePointSourcesIsMutable(); - sharePointSources_.addAll(other.sharePointSources_); - } - onChanged(); - } - } else { - if (!other.sharePointSources_.isEmpty()) { - if (sharePointSourcesBuilder_.isEmpty()) { - sharePointSourcesBuilder_.dispose(); - sharePointSourcesBuilder_ = null; - sharePointSources_ = other.sharePointSources_; - bitField0_ = (bitField0_ & ~0x00000001); - sharePointSourcesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSharePointSourcesFieldBuilder() - : null; - } else { - sharePointSourcesBuilder_.addAllMessages(other.sharePointSources_); - } - } - } - 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.vertexai.api.SharePointSources.SharePointSource m = - input.readMessage( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.parser(), - extensionRegistry); - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - sharePointSources_.add(m); - } else { - sharePointSourcesBuilder_.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 - sharePointSources_ = java.util.Collections.emptyList(); - - private void ensureSharePointSourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sharePointSources_ = - new java.util.ArrayList< - com.google.cloud.vertexai.api.SharePointSources.SharePointSource>( - sharePointSources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources.SharePointSource, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder, - com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder> - sharePointSourcesBuilder_; - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public java.util.List - getSharePointSourcesList() { - if (sharePointSourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(sharePointSources_); - } else { - return sharePointSourcesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public int getSharePointSourcesCount() { - if (sharePointSourcesBuilder_ == null) { - return sharePointSources_.size(); - } else { - return sharePointSourcesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource getSharePointSources( - int index) { - if (sharePointSourcesBuilder_ == null) { - return sharePointSources_.get(index); - } else { - return sharePointSourcesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder setSharePointSources( - int index, com.google.cloud.vertexai.api.SharePointSources.SharePointSource value) { - if (sharePointSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSharePointSourcesIsMutable(); - sharePointSources_.set(index, value); - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder setSharePointSources( - int index, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder builderForValue) { - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - sharePointSources_.set(index, builderForValue.build()); - onChanged(); - } else { - sharePointSourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder addSharePointSources( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource value) { - if (sharePointSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSharePointSourcesIsMutable(); - sharePointSources_.add(value); - onChanged(); - } else { - sharePointSourcesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder addSharePointSources( - int index, com.google.cloud.vertexai.api.SharePointSources.SharePointSource value) { - if (sharePointSourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSharePointSourcesIsMutable(); - sharePointSources_.add(index, value); - onChanged(); - } else { - sharePointSourcesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder addSharePointSources( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder builderForValue) { - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - sharePointSources_.add(builderForValue.build()); - onChanged(); - } else { - sharePointSourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder addSharePointSources( - int index, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder builderForValue) { - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - sharePointSources_.add(index, builderForValue.build()); - onChanged(); - } else { - sharePointSourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder addAllSharePointSources( - java.lang.Iterable< - ? extends com.google.cloud.vertexai.api.SharePointSources.SharePointSource> - values) { - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sharePointSources_); - onChanged(); - } else { - sharePointSourcesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder clearSharePointSources() { - if (sharePointSourcesBuilder_ == null) { - sharePointSources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sharePointSourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public Builder removeSharePointSources(int index) { - if (sharePointSourcesBuilder_ == null) { - ensureSharePointSourcesIsMutable(); - sharePointSources_.remove(index); - onChanged(); - } else { - sharePointSourcesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder - getSharePointSourcesBuilder(int index) { - return internalGetSharePointSourcesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder - getSharePointSourcesOrBuilder(int index) { - if (sharePointSourcesBuilder_ == null) { - return sharePointSources_.get(index); - } else { - return sharePointSourcesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder> - getSharePointSourcesOrBuilderList() { - if (sharePointSourcesBuilder_ != null) { - return sharePointSourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sharePointSources_); - } - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder - addSharePointSourcesBuilder() { - return internalGetSharePointSourcesFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.SharePointSources.SharePointSource - .getDefaultInstance()); - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder - addSharePointSourcesBuilder(int index) { - return internalGetSharePointSourcesFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource - .getDefaultInstance()); - } - - /** - * - * - *
-     * The SharePoint sources.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - public java.util.List - getSharePointSourcesBuilderList() { - return internalGetSharePointSourcesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources.SharePointSource, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder, - com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder> - internalGetSharePointSourcesFieldBuilder() { - if (sharePointSourcesBuilder_ == null) { - sharePointSourcesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SharePointSources.SharePointSource, - com.google.cloud.vertexai.api.SharePointSources.SharePointSource.Builder, - com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder>( - sharePointSources_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - sharePointSources_ = null; - } - return sharePointSourcesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SharePointSources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SharePointSources) - private static final com.google.cloud.vertexai.api.SharePointSources DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SharePointSources(); - } - - public static com.google.cloud.vertexai.api.SharePointSources getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SharePointSources 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.vertexai.api.SharePointSources getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSourcesOrBuilder.java deleted file mode 100644 index 77f845f1a923..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SharePointSourcesOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SharePointSourcesOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SharePointSources) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - java.util.List - getSharePointSourcesList(); - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - com.google.cloud.vertexai.api.SharePointSources.SharePointSource getSharePointSources(int index); - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - int getSharePointSourcesCount(); - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - java.util.List< - ? extends com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder> - getSharePointSourcesOrBuilderList(); - - /** - * - * - *
-   * The SharePoint sources.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SharePointSources.SharePointSource share_point_sources = 1; - * - */ - com.google.cloud.vertexai.api.SharePointSources.SharePointSourceOrBuilder - getSharePointSourcesOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfig.java deleted file mode 100644 index dbd58799133d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfig.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A set of Shielded Instance options.
- * See [Images using supported Shielded VM
- * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ShieldedVmConfig} - */ -@com.google.protobuf.Generated -public final class ShieldedVmConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ShieldedVmConfig) - ShieldedVmConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ShieldedVmConfig"); - } - - // Use ShieldedVmConfig.newBuilder() to construct. - private ShieldedVmConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ShieldedVmConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ShieldedVmConfig.class, - com.google.cloud.vertexai.api.ShieldedVmConfig.Builder.class); - } - - public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; - private boolean enableSecureBoot_ = false; - - /** - * - * - *
-   * Defines whether the instance has [Secure
-   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
-   * enabled.
-   *
-   * Secure Boot helps ensure that the system only runs authentic software by
-   * verifying the digital signature of all boot components, and halting the
-   * boot process if signature verification fails.
-   * 
- * - * bool enable_secure_boot = 1; - * - * @return The enableSecureBoot. - */ - @java.lang.Override - public boolean getEnableSecureBoot() { - return enableSecureBoot_; - } - - 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 (enableSecureBoot_ != false) { - output.writeBool(1, enableSecureBoot_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableSecureBoot_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); - } - 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.vertexai.api.ShieldedVmConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ShieldedVmConfig other = - (com.google.cloud.vertexai.api.ShieldedVmConfig) obj; - - if (getEnableSecureBoot() != other.getEnableSecureBoot()) 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) + ENABLE_SECURE_BOOT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig 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.vertexai.api.ShieldedVmConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig 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.vertexai.api.ShieldedVmConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ShieldedVmConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A set of Shielded Instance options.
-   * See [Images using supported Shielded VM
-   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ShieldedVmConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ShieldedVmConfig) - com.google.cloud.vertexai.api.ShieldedVmConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ShieldedVmConfig.class, - com.google.cloud.vertexai.api.ShieldedVmConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ShieldedVmConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enableSecureBoot_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.MachineResourcesProto - .internal_static_google_cloud_vertexai_v1_ShieldedVmConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ShieldedVmConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ShieldedVmConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ShieldedVmConfig build() { - com.google.cloud.vertexai.api.ShieldedVmConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ShieldedVmConfig buildPartial() { - com.google.cloud.vertexai.api.ShieldedVmConfig result = - new com.google.cloud.vertexai.api.ShieldedVmConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ShieldedVmConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enableSecureBoot_ = enableSecureBoot_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ShieldedVmConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ShieldedVmConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ShieldedVmConfig other) { - if (other == com.google.cloud.vertexai.api.ShieldedVmConfig.getDefaultInstance()) return this; - if (other.getEnableSecureBoot() != false) { - setEnableSecureBoot(other.getEnableSecureBoot()); - } - 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: - { - enableSecureBoot_ = input.readBool(); - 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 boolean enableSecureBoot_; - - /** - * - * - *
-     * Defines whether the instance has [Secure
-     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
-     * enabled.
-     *
-     * Secure Boot helps ensure that the system only runs authentic software by
-     * verifying the digital signature of all boot components, and halting the
-     * boot process if signature verification fails.
-     * 
- * - * bool enable_secure_boot = 1; - * - * @return The enableSecureBoot. - */ - @java.lang.Override - public boolean getEnableSecureBoot() { - return enableSecureBoot_; - } - - /** - * - * - *
-     * Defines whether the instance has [Secure
-     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
-     * enabled.
-     *
-     * Secure Boot helps ensure that the system only runs authentic software by
-     * verifying the digital signature of all boot components, and halting the
-     * boot process if signature verification fails.
-     * 
- * - * bool enable_secure_boot = 1; - * - * @param value The enableSecureBoot to set. - * @return This builder for chaining. - */ - public Builder setEnableSecureBoot(boolean value) { - - enableSecureBoot_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Defines whether the instance has [Secure
-     * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
-     * enabled.
-     *
-     * Secure Boot helps ensure that the system only runs authentic software by
-     * verifying the digital signature of all boot components, and halting the
-     * boot process if signature verification fails.
-     * 
- * - * bool enable_secure_boot = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnableSecureBoot() { - bitField0_ = (bitField0_ & ~0x00000001); - enableSecureBoot_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ShieldedVmConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ShieldedVmConfig) - private static final com.google.cloud.vertexai.api.ShieldedVmConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ShieldedVmConfig(); - } - - public static com.google.cloud.vertexai.api.ShieldedVmConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ShieldedVmConfig 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.vertexai.api.ShieldedVmConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfigOrBuilder.java deleted file mode 100644 index 2d5fa6686e9a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ShieldedVmConfigOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/machine_resources.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ShieldedVmConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ShieldedVmConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Defines whether the instance has [Secure
-   * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
-   * enabled.
-   *
-   * Secure Boot helps ensure that the system only runs authentic software by
-   * verifying the digital signature of all boot components, and halting the
-   * boot process if signature verification fails.
-   * 
- * - * bool enable_secure_boot = 1; - * - * @return The enableSecureBoot. - */ - boolean getEnableSecureBoot(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSource.java deleted file mode 100644 index ea80d719f586..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSource.java +++ /dev/null @@ -1,3749 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The Slack source for the ImportRagFilesRequest.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource} - */ -@com.google.protobuf.Generated -public final class SlackSource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SlackSource) - SlackSourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SlackSource"); - } - - // Use SlackSource.newBuilder() to construct. - private SlackSource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SlackSource() { - channels_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.class, - com.google.cloud.vertexai.api.SlackSource.Builder.class); - } - - public interface SlackChannelsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SlackSource.SlackChannels) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getChannelsList(); - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel getChannels(int index); - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getChannelsCount(); - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List< - ? extends com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder> - getChannelsOrBuilderList(); - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder - getChannelsOrBuilder(int index); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - boolean hasApiKeyConfig(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig(); - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder(); - } - - /** - * - * - *
-   * SlackChannels contains the Slack channels and corresponding access token.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource.SlackChannels} - */ - public static final class SlackChannels extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SlackSource.SlackChannels) - SlackChannelsOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SlackChannels"); - } - - // Use SlackChannels.newBuilder() to construct. - private SlackChannels(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SlackChannels() { - channels_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.class, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder.class); - } - - public interface SlackChannelOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Required. The Slack channel ID.
-       * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The channelId. - */ - java.lang.String getChannelId(); - - /** - * - * - *
-       * Required. The Slack channel ID.
-       * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for channelId. - */ - com.google.protobuf.ByteString getChannelIdBytes(); - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - } - - /** - * - * - *
-     * SlackChannel contains the Slack channel ID and the time range to import.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel} - */ - public static final class SlackChannel extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel) - SlackChannelOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SlackChannel"); - } - - // Use SlackChannel.newBuilder() to construct. - private SlackChannel(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SlackChannel() { - channelId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.class, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder.class); - } - - private int bitField0_; - public static final int CHANNEL_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object channelId_ = ""; - - /** - * - * - *
-       * Required. The Slack channel ID.
-       * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The channelId. - */ - @java.lang.Override - public java.lang.String getChannelId() { - java.lang.Object ref = channelId_; - 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(); - channelId_ = s; - return s; - } - } - - /** - * - * - *
-       * Required. The Slack channel ID.
-       * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for channelId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChannelIdBytes() { - java.lang.Object ref = channelId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - channelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int START_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp startTime_; - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - - /** - * - * - *
-       * Optional. The starting timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @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 = 3; - private com.google.protobuf.Timestamp endTime_; - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - /** - * - * - *
-       * Optional. The ending timestamp for messages to import.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @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.GeneratedMessage.isStringEmpty(channelId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getStartTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getEndTime()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.vertexai.api.SlackSource.SlackChannels.SlackChannel)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel other = - (com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel) obj; - - if (!getChannelId().equals(other.getChannelId())) 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) + CHANNEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getChannelId().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.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel 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.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel 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.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SlackSource.SlackChannels.SlackChannel 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-       * SlackChannel contains the Slack channel ID and the time range to import.
-       * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel) - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.class, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetStartTimeFieldBuilder(); - internalGetEndTimeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - channelId_ = ""; - 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.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_SlackChannel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel build() { - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel buildPartial() { - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel result = - new com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.channelId_ = channelId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel) { - return mergeFrom( - (com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel other) { - if (other - == com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - .getDefaultInstance()) return this; - if (!other.getChannelId().isEmpty()) { - channelId_ = other.channelId_; - bitField0_ |= 0x00000001; - onChanged(); - } - 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: - { - channelId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetEndTimeFieldBuilder().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 channelId_ = ""; - - /** - * - * - *
-         * Required. The Slack channel ID.
-         * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The channelId. - */ - public java.lang.String getChannelId() { - java.lang.Object ref = channelId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - channelId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-         * Required. The Slack channel ID.
-         * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for channelId. - */ - public com.google.protobuf.ByteString getChannelIdBytes() { - java.lang.Object ref = channelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - channelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-         * Required. The Slack channel ID.
-         * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The channelId to set. - * @return This builder for chaining. - */ - public Builder setChannelId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - channelId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-         * Required. The Slack channel ID.
-         * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearChannelId() { - channelId_ = getDefaultInstance().getChannelId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-         * Required. The Slack channel ID.
-         * 
- * - * string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for channelId to set. - * @return This builder for chaining. - */ - public Builder setChannelIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - channelId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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(); - } - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } - } else { - startTimeBuilder_.mergeFrom(value); - } - if (startTime_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000002); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetStartTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : startTime_; - } - } - - /** - * - * - *
-         * Optional. The starting timestamp for messages to import.
-         * 
- * - * - * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - 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.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @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(); - } - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); - } - if (endTime_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000004); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetEndTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - - /** - * - * - *
-         * Optional. The ending timestamp for messages to import.
-         * 
- * - * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel) - private static final com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel(); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlackChannel 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.vertexai.api.SlackSource.SlackChannels.SlackChannel - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int CHANNELS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List - channels_; - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getChannelsList() { - return channels_; - } - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder> - getChannelsOrBuilderList() { - return channels_; - } - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getChannelsCount() { - return channels_.size(); - } - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel getChannels( - int index) { - return channels_.get(index); - } - - /** - * - * - *
-     * Required. The Slack channel IDs.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder - getChannelsOrBuilder(int index) { - return channels_.get(index); - } - - public static final int API_KEY_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig apiKeyConfig_; - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - @java.lang.Override - public boolean hasApiKeyConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - - /** - * - * - *
-     * Required. The SecretManager secret version resource name (e.g.
-     * projects/{project}/secrets/{secret}/versions/{version}) storing the
-     * Slack channel access token that has access to the slack channel IDs.
-     * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-     * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder getApiKeyConfigOrBuilder() { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - - 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 < channels_.size(); i++) { - output.writeMessage(1, channels_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getApiKeyConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < channels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, channels_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getApiKeyConfig()); - } - 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.vertexai.api.SlackSource.SlackChannels)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SlackSource.SlackChannels other = - (com.google.cloud.vertexai.api.SlackSource.SlackChannels) obj; - - if (!getChannelsList().equals(other.getChannelsList())) return false; - if (hasApiKeyConfig() != other.hasApiKeyConfig()) return false; - if (hasApiKeyConfig()) { - if (!getApiKeyConfig().equals(other.getApiKeyConfig())) 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 (getChannelsCount() > 0) { - hash = (37 * hash) + CHANNELS_FIELD_NUMBER; - hash = (53 * hash) + getChannelsList().hashCode(); - } - if (hasApiKeyConfig()) { - hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getApiKeyConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels 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.vertexai.api.SlackSource.SlackChannels parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels 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.vertexai.api.SlackSource.SlackChannels parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SlackSource.SlackChannels 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * SlackChannels contains the Slack channels and corresponding access token.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource.SlackChannels} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SlackSource.SlackChannels) - com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.class, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SlackSource.SlackChannels.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetChannelsFieldBuilder(); - internalGetApiKeyConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (channelsBuilder_ == null) { - channels_ = java.util.Collections.emptyList(); - } else { - channels_ = null; - channelsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - apiKeyConfig_ = null; - if (apiKeyConfigBuilder_ != null) { - apiKeyConfigBuilder_.dispose(); - apiKeyConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_SlackChannels_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SlackSource.SlackChannels.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels build() { - com.google.cloud.vertexai.api.SlackSource.SlackChannels result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels buildPartial() { - com.google.cloud.vertexai.api.SlackSource.SlackChannels result = - new com.google.cloud.vertexai.api.SlackSource.SlackChannels(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.SlackSource.SlackChannels result) { - if (channelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - channels_ = java.util.Collections.unmodifiableList(channels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.channels_ = channels_; - } else { - result.channels_ = channelsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.SlackSource.SlackChannels result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.apiKeyConfig_ = - apiKeyConfigBuilder_ == null ? apiKeyConfig_ : apiKeyConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SlackSource.SlackChannels) { - return mergeFrom((com.google.cloud.vertexai.api.SlackSource.SlackChannels) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SlackSource.SlackChannels other) { - if (other == com.google.cloud.vertexai.api.SlackSource.SlackChannels.getDefaultInstance()) - return this; - if (channelsBuilder_ == null) { - if (!other.channels_.isEmpty()) { - if (channels_.isEmpty()) { - channels_ = other.channels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureChannelsIsMutable(); - channels_.addAll(other.channels_); - } - onChanged(); - } - } else { - if (!other.channels_.isEmpty()) { - if (channelsBuilder_.isEmpty()) { - channelsBuilder_.dispose(); - channelsBuilder_ = null; - channels_ = other.channels_; - bitField0_ = (bitField0_ & ~0x00000001); - channelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChannelsFieldBuilder() - : null; - } else { - channelsBuilder_.addAllMessages(other.channels_); - } - } - } - if (other.hasApiKeyConfig()) { - mergeApiKeyConfig(other.getApiKeyConfig()); - } - 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.vertexai.api.SlackSource.SlackChannels.SlackChannel m = - input.readMessage( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - .parser(), - extensionRegistry); - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(m); - } else { - channelsBuilder_.addMessage(m); - } - break; - } // case 10 - case 26: - { - input.readMessage( - internalGetApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - 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 - channels_ = java.util.Collections.emptyList(); - - private void ensureChannelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - channels_ = - new java.util.ArrayList< - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel>(channels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder> - channelsBuilder_; - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getChannelsList() { - if (channelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(channels_); - } else { - return channelsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getChannelsCount() { - if (channelsBuilder_ == null) { - return channels_.size(); - } else { - return channelsBuilder_.getCount(); - } - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel getChannels( - int index) { - if (channelsBuilder_ == null) { - return channels_.get(index); - } else { - return channelsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setChannels( - int index, com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.set(index, value); - onChanged(); - } else { - channelsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setChannels( - int index, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.set(index, builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.add(value); - onChanged(); - } else { - channelsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - int index, com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.add(index, value); - onChanged(); - } else { - channelsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - int index, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(index, builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllChannels( - java.lang.Iterable< - ? extends com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel> - values) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, channels_); - onChanged(); - } else { - channelsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearChannels() { - if (channelsBuilder_ == null) { - channels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - channelsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeChannels(int index) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.remove(index); - onChanged(); - } else { - channelsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - getChannelsBuilder(int index) { - return internalGetChannelsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder - getChannelsOrBuilder(int index) { - if (channelsBuilder_ == null) { - return channels_.get(index); - } else { - return channelsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder> - getChannelsOrBuilderList() { - if (channelsBuilder_ != null) { - return channelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(channels_); - } - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - addChannelsBuilder() { - return internalGetChannelsFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - .getDefaultInstance()); - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder - addChannelsBuilder(int index) { - return internalGetChannelsFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel - .getDefaultInstance()); - } - - /** - * - * - *
-       * Required. The Slack channel IDs.
-       * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder> - getChannelsBuilderList() { - return internalGetChannelsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder> - internalGetChannelsFieldBuilder() { - if (channelsBuilder_ == null) { - channelsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannel.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.SlackChannelOrBuilder>( - channels_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - channels_ = null; - } - return channelsBuilder_; - } - - private com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig apiKeyConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - apiKeyConfigBuilder_; - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the apiKeyConfig field is set. - */ - public boolean hasApiKeyConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The apiKeyConfig. - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig getApiKeyConfig() { - if (apiKeyConfigBuilder_ == null) { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } else { - return apiKeyConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - apiKeyConfig_ = value; - } else { - apiKeyConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setApiKeyConfig( - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder builderForValue) { - if (apiKeyConfigBuilder_ == null) { - apiKeyConfig_ = builderForValue.build(); - } else { - apiKeyConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeApiKeyConfig(com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig value) { - if (apiKeyConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && apiKeyConfig_ != null - && apiKeyConfig_ - != com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance()) { - getApiKeyConfigBuilder().mergeFrom(value); - } else { - apiKeyConfig_ = value; - } - } else { - apiKeyConfigBuilder_.mergeFrom(value); - } - if (apiKeyConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearApiKeyConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - apiKeyConfig_ = null; - if (apiKeyConfigBuilder_ != null) { - apiKeyConfigBuilder_.dispose(); - apiKeyConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder getApiKeyConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetApiKeyConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder - getApiKeyConfigOrBuilder() { - if (apiKeyConfigBuilder_ != null) { - return apiKeyConfigBuilder_.getMessageOrBuilder(); - } else { - return apiKeyConfig_ == null - ? com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.getDefaultInstance() - : apiKeyConfig_; - } - } - - /** - * - * - *
-       * Required. The SecretManager secret version resource name (e.g.
-       * projects/{project}/secrets/{secret}/versions/{version}) storing the
-       * Slack channel access token that has access to the slack channel IDs.
-       * See: https://api.slack.com/tutorials/tracks/getting-a-token.
-       * 
- * - * - * .google.cloud.vertexai.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder> - internalGetApiKeyConfigFieldBuilder() { - if (apiKeyConfigBuilder_ == null) { - apiKeyConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfig.Builder, - com.google.cloud.vertexai.api.ApiAuth.ApiKeyConfigOrBuilder>( - getApiKeyConfig(), getParentForChildren(), isClean()); - apiKeyConfig_ = null; - } - return apiKeyConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SlackSource.SlackChannels) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SlackSource.SlackChannels) - private static final com.google.cloud.vertexai.api.SlackSource.SlackChannels DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SlackSource.SlackChannels(); - } - - public static com.google.cloud.vertexai.api.SlackSource.SlackChannels getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlackChannels 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.vertexai.api.SlackSource.SlackChannels getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int CHANNELS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List channels_; - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getChannelsList() { - return channels_; - } - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getChannelsOrBuilderList() { - return channels_; - } - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getChannelsCount() { - return channels_.size(); - } - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannels getChannels(int index) { - return channels_.get(index); - } - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder getChannelsOrBuilder( - int index) { - return channels_.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 < channels_.size(); i++) { - output.writeMessage(1, channels_.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 < channels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, channels_.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.vertexai.api.SlackSource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SlackSource other = - (com.google.cloud.vertexai.api.SlackSource) obj; - - if (!getChannelsList().equals(other.getChannelsList())) 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 (getChannelsCount() > 0) { - hash = (37 * hash) + CHANNELS_FIELD_NUMBER; - hash = (53 * hash) + getChannelsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource 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.vertexai.api.SlackSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource 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.vertexai.api.SlackSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SlackSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SlackSource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The Slack source for the ImportRagFilesRequest.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SlackSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SlackSource) - com.google.cloud.vertexai.api.SlackSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SlackSource.class, - com.google.cloud.vertexai.api.SlackSource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SlackSource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (channelsBuilder_ == null) { - channels_ = java.util.Collections.emptyList(); - } else { - channels_ = null; - channelsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_SlackSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SlackSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource build() { - com.google.cloud.vertexai.api.SlackSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SlackSource buildPartial() { - com.google.cloud.vertexai.api.SlackSource result = - new com.google.cloud.vertexai.api.SlackSource(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.SlackSource result) { - if (channelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - channels_ = java.util.Collections.unmodifiableList(channels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.channels_ = channels_; - } else { - result.channels_ = channelsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.SlackSource result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SlackSource) { - return mergeFrom((com.google.cloud.vertexai.api.SlackSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SlackSource other) { - if (other == com.google.cloud.vertexai.api.SlackSource.getDefaultInstance()) return this; - if (channelsBuilder_ == null) { - if (!other.channels_.isEmpty()) { - if (channels_.isEmpty()) { - channels_ = other.channels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureChannelsIsMutable(); - channels_.addAll(other.channels_); - } - onChanged(); - } - } else { - if (!other.channels_.isEmpty()) { - if (channelsBuilder_.isEmpty()) { - channelsBuilder_.dispose(); - channelsBuilder_ = null; - channels_ = other.channels_; - bitField0_ = (bitField0_ & ~0x00000001); - channelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChannelsFieldBuilder() - : null; - } else { - channelsBuilder_.addAllMessages(other.channels_); - } - } - } - 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.vertexai.api.SlackSource.SlackChannels m = - input.readMessage( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.parser(), - extensionRegistry); - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(m); - } else { - channelsBuilder_.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 channels_ = - java.util.Collections.emptyList(); - - private void ensureChannelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - channels_ = - new java.util.ArrayList( - channels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder> - channelsBuilder_; - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getChannelsList() { - if (channelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(channels_); - } else { - return channelsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getChannelsCount() { - if (channelsBuilder_ == null) { - return channels_.size(); - } else { - return channelsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels getChannels(int index) { - if (channelsBuilder_ == null) { - return channels_.get(index); - } else { - return channelsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setChannels( - int index, com.google.cloud.vertexai.api.SlackSource.SlackChannels value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.set(index, value); - onChanged(); - } else { - channelsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setChannels( - int index, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.set(index, builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels(com.google.cloud.vertexai.api.SlackSource.SlackChannels value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.add(value); - onChanged(); - } else { - channelsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - int index, com.google.cloud.vertexai.api.SlackSource.SlackChannels value) { - if (channelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChannelsIsMutable(); - channels_.add(index, value); - onChanged(); - } else { - channelsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addChannels( - int index, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder builderForValue) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.add(index, builderForValue.build()); - onChanged(); - } else { - channelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllChannels( - java.lang.Iterable - values) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, channels_); - onChanged(); - } else { - channelsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearChannels() { - if (channelsBuilder_ == null) { - channels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - channelsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeChannels(int index) { - if (channelsBuilder_ == null) { - ensureChannelsIsMutable(); - channels_.remove(index); - onChanged(); - } else { - channelsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder getChannelsBuilder( - int index) { - return internalGetChannelsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder getChannelsOrBuilder( - int index) { - if (channelsBuilder_ == null) { - return channels_.get(index); - } else { - return channelsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder> - getChannelsOrBuilderList() { - if (channelsBuilder_ != null) { - return channelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(channels_); - } - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder addChannelsBuilder() { - return internalGetChannelsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.SlackSource.SlackChannels.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder addChannelsBuilder( - int index) { - return internalGetChannelsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.SlackSource.SlackChannels.getDefaultInstance()); - } - - /** - * - * - *
-     * Required. The Slack channels.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getChannelsBuilderList() { - return internalGetChannelsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder> - internalGetChannelsFieldBuilder() { - if (channelsBuilder_ == null) { - channelsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.SlackSource.SlackChannels, - com.google.cloud.vertexai.api.SlackSource.SlackChannels.Builder, - com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder>( - channels_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - channels_ = null; - } - return channelsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SlackSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SlackSource) - private static final com.google.cloud.vertexai.api.SlackSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SlackSource(); - } - - public static com.google.cloud.vertexai.api.SlackSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SlackSource 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.vertexai.api.SlackSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSourceOrBuilder.java deleted file mode 100644 index d455bcf6cb00..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SlackSourceOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SlackSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SlackSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getChannelsList(); - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SlackSource.SlackChannels getChannels(int index); - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getChannelsCount(); - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getChannelsOrBuilderList(); - - /** - * - * - *
-   * Required. The Slack channels.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.SlackSource.SlackChannelsOrBuilder getChannelsOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java deleted file mode 100644 index a394e2bfe6d7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java +++ /dev/null @@ -1,1212 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for SmoothGrad approximation of gradients.
- *
- * When enabled, the gradients are approximated by averaging the gradients from
- * noisy samples in the vicinity of the inputs. Adding noise can help improve
- * the computed gradients. Refer to this paper for more details:
- * https://arxiv.org/pdf/1706.03825.pdf
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SmoothGradConfig} - */ -@com.google.protobuf.Generated -public final class SmoothGradConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SmoothGradConfig) - SmoothGradConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SmoothGradConfig"); - } - - // Use SmoothGradConfig.newBuilder() to construct. - private SmoothGradConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SmoothGradConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SmoothGradConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SmoothGradConfig.class, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder.class); - } - - private int gradientNoiseSigmaCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object gradientNoiseSigma_; - - public enum GradientNoiseSigmaCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NOISE_SIGMA(1), - FEATURE_NOISE_SIGMA(2), - GRADIENTNOISESIGMA_NOT_SET(0); - private final int value; - - private GradientNoiseSigmaCase(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 GradientNoiseSigmaCase valueOf(int value) { - return forNumber(value); - } - - public static GradientNoiseSigmaCase forNumber(int value) { - switch (value) { - case 1: - return NOISE_SIGMA; - case 2: - return FEATURE_NOISE_SIGMA; - case 0: - return GRADIENTNOISESIGMA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public GradientNoiseSigmaCase getGradientNoiseSigmaCase() { - return GradientNoiseSigmaCase.forNumber(gradientNoiseSigmaCase_); - } - - public static final int NOISE_SIGMA_FIELD_NUMBER = 1; - - /** - * - * - *
-   * This is a single float value and will be used to add noise to all the
-   * features. Use this field when all features are normalized to have the
-   * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-   * features are normalized to have 0-mean and 1-variance. Learn more about
-   * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-   *
-   * For best results the recommended value is about 10% - 20% of the standard
-   * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-   * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-   *
-   * If the distribution is different per feature, set
-   * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-   * instead for each feature.
-   * 
- * - * float noise_sigma = 1; - * - * @return Whether the noiseSigma field is set. - */ - @java.lang.Override - public boolean hasNoiseSigma() { - return gradientNoiseSigmaCase_ == 1; - } - - /** - * - * - *
-   * This is a single float value and will be used to add noise to all the
-   * features. Use this field when all features are normalized to have the
-   * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-   * features are normalized to have 0-mean and 1-variance. Learn more about
-   * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-   *
-   * For best results the recommended value is about 10% - 20% of the standard
-   * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-   * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-   *
-   * If the distribution is different per feature, set
-   * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-   * instead for each feature.
-   * 
- * - * float noise_sigma = 1; - * - * @return The noiseSigma. - */ - @java.lang.Override - public float getNoiseSigma() { - if (gradientNoiseSigmaCase_ == 1) { - return (java.lang.Float) gradientNoiseSigma_; - } - return 0F; - } - - public static final int FEATURE_NOISE_SIGMA_FIELD_NUMBER = 2; - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return Whether the featureNoiseSigma field is set. - */ - @java.lang.Override - public boolean hasFeatureNoiseSigma() { - return gradientNoiseSigmaCase_ == 2; - } - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return The featureNoiseSigma. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma getFeatureNoiseSigma() { - if (gradientNoiseSigmaCase_ == 2) { - return (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_; - } - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder getFeatureNoiseSigmaOrBuilder() { - if (gradientNoiseSigmaCase_ == 2) { - return (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_; - } - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - - public static final int NOISY_SAMPLE_COUNT_FIELD_NUMBER = 3; - private int noisySampleCount_ = 0; - - /** - * - * - *
-   * The number of gradient samples to use for
-   * approximation. The higher this number, the more accurate the gradient
-   * is, but the runtime complexity increases by this factor as well.
-   * Valid range of its value is [1, 50]. Defaults to 3.
-   * 
- * - * int32 noisy_sample_count = 3; - * - * @return The noisySampleCount. - */ - @java.lang.Override - public int getNoisySampleCount() { - return noisySampleCount_; - } - - 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 (gradientNoiseSigmaCase_ == 1) { - output.writeFloat(1, (float) ((java.lang.Float) gradientNoiseSigma_)); - } - if (gradientNoiseSigmaCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_); - } - if (noisySampleCount_ != 0) { - output.writeInt32(3, noisySampleCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gradientNoiseSigmaCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 1, (float) ((java.lang.Float) gradientNoiseSigma_)); - } - if (gradientNoiseSigmaCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_); - } - if (noisySampleCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, noisySampleCount_); - } - 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.vertexai.api.SmoothGradConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SmoothGradConfig other = - (com.google.cloud.vertexai.api.SmoothGradConfig) obj; - - if (getNoisySampleCount() != other.getNoisySampleCount()) return false; - if (!getGradientNoiseSigmaCase().equals(other.getGradientNoiseSigmaCase())) return false; - switch (gradientNoiseSigmaCase_) { - case 1: - if (java.lang.Float.floatToIntBits(getNoiseSigma()) - != java.lang.Float.floatToIntBits(other.getNoiseSigma())) return false; - break; - case 2: - if (!getFeatureNoiseSigma().equals(other.getFeatureNoiseSigma())) 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) + NOISY_SAMPLE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getNoisySampleCount(); - switch (gradientNoiseSigmaCase_) { - case 1: - hash = (37 * hash) + NOISE_SIGMA_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getNoiseSigma()); - break; - case 2: - hash = (37 * hash) + FEATURE_NOISE_SIGMA_FIELD_NUMBER; - hash = (53 * hash) + getFeatureNoiseSigma().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig 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.vertexai.api.SmoothGradConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig 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.vertexai.api.SmoothGradConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SmoothGradConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients from
-   * noisy samples in the vicinity of the inputs. Adding noise can help improve
-   * the computed gradients. Refer to this paper for more details:
-   * https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SmoothGradConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SmoothGradConfig) - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SmoothGradConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SmoothGradConfig.class, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SmoothGradConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (featureNoiseSigmaBuilder_ != null) { - featureNoiseSigmaBuilder_.clear(); - } - noisySampleCount_ = 0; - gradientNoiseSigmaCase_ = 0; - gradientNoiseSigma_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_SmoothGradConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfig build() { - com.google.cloud.vertexai.api.SmoothGradConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfig buildPartial() { - com.google.cloud.vertexai.api.SmoothGradConfig result = - new com.google.cloud.vertexai.api.SmoothGradConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SmoothGradConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.noisySampleCount_ = noisySampleCount_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.SmoothGradConfig result) { - result.gradientNoiseSigmaCase_ = gradientNoiseSigmaCase_; - result.gradientNoiseSigma_ = this.gradientNoiseSigma_; - if (gradientNoiseSigmaCase_ == 2 && featureNoiseSigmaBuilder_ != null) { - result.gradientNoiseSigma_ = featureNoiseSigmaBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SmoothGradConfig) { - return mergeFrom((com.google.cloud.vertexai.api.SmoothGradConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SmoothGradConfig other) { - if (other == com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance()) return this; - if (other.getNoisySampleCount() != 0) { - setNoisySampleCount(other.getNoisySampleCount()); - } - switch (other.getGradientNoiseSigmaCase()) { - case NOISE_SIGMA: - { - setNoiseSigma(other.getNoiseSigma()); - break; - } - case FEATURE_NOISE_SIGMA: - { - mergeFeatureNoiseSigma(other.getFeatureNoiseSigma()); - break; - } - case GRADIENTNOISESIGMA_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 13: - { - gradientNoiseSigma_ = input.readFloat(); - gradientNoiseSigmaCase_ = 1; - break; - } // case 13 - case 18: - { - input.readMessage( - internalGetFeatureNoiseSigmaFieldBuilder().getBuilder(), extensionRegistry); - gradientNoiseSigmaCase_ = 2; - break; - } // case 18 - case 24: - { - noisySampleCount_ = 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 gradientNoiseSigmaCase_ = 0; - private java.lang.Object gradientNoiseSigma_; - - public GradientNoiseSigmaCase getGradientNoiseSigmaCase() { - return GradientNoiseSigmaCase.forNumber(gradientNoiseSigmaCase_); - } - - public Builder clearGradientNoiseSigma() { - gradientNoiseSigmaCase_ = 0; - gradientNoiseSigma_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * This is a single float value and will be used to add noise to all the
-     * features. Use this field when all features are normalized to have the
-     * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-     * features are normalized to have 0-mean and 1-variance. Learn more about
-     * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-     *
-     * For best results the recommended value is about 10% - 20% of the standard
-     * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-     * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-     *
-     * If the distribution is different per feature, set
-     * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-     * instead for each feature.
-     * 
- * - * float noise_sigma = 1; - * - * @return Whether the noiseSigma field is set. - */ - public boolean hasNoiseSigma() { - return gradientNoiseSigmaCase_ == 1; - } - - /** - * - * - *
-     * This is a single float value and will be used to add noise to all the
-     * features. Use this field when all features are normalized to have the
-     * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-     * features are normalized to have 0-mean and 1-variance. Learn more about
-     * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-     *
-     * For best results the recommended value is about 10% - 20% of the standard
-     * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-     * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-     *
-     * If the distribution is different per feature, set
-     * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-     * instead for each feature.
-     * 
- * - * float noise_sigma = 1; - * - * @return The noiseSigma. - */ - public float getNoiseSigma() { - if (gradientNoiseSigmaCase_ == 1) { - return (java.lang.Float) gradientNoiseSigma_; - } - return 0F; - } - - /** - * - * - *
-     * This is a single float value and will be used to add noise to all the
-     * features. Use this field when all features are normalized to have the
-     * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-     * features are normalized to have 0-mean and 1-variance. Learn more about
-     * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-     *
-     * For best results the recommended value is about 10% - 20% of the standard
-     * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-     * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-     *
-     * If the distribution is different per feature, set
-     * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-     * instead for each feature.
-     * 
- * - * float noise_sigma = 1; - * - * @param value The noiseSigma to set. - * @return This builder for chaining. - */ - public Builder setNoiseSigma(float value) { - - gradientNoiseSigmaCase_ = 1; - gradientNoiseSigma_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * This is a single float value and will be used to add noise to all the
-     * features. Use this field when all features are normalized to have the
-     * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-     * features are normalized to have 0-mean and 1-variance. Learn more about
-     * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-     *
-     * For best results the recommended value is about 10% - 20% of the standard
-     * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-     * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-     *
-     * If the distribution is different per feature, set
-     * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-     * instead for each feature.
-     * 
- * - * float noise_sigma = 1; - * - * @return This builder for chaining. - */ - public Builder clearNoiseSigma() { - if (gradientNoiseSigmaCase_ == 1) { - gradientNoiseSigmaCase_ = 0; - gradientNoiseSigma_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma, - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder> - featureNoiseSigmaBuilder_; - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return Whether the featureNoiseSigma field is set. - */ - @java.lang.Override - public boolean hasFeatureNoiseSigma() { - return gradientNoiseSigmaCase_ == 2; - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return The featureNoiseSigma. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigma getFeatureNoiseSigma() { - if (featureNoiseSigmaBuilder_ == null) { - if (gradientNoiseSigmaCase_ == 2) { - return (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_; - } - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } else { - if (gradientNoiseSigmaCase_ == 2) { - return featureNoiseSigmaBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - public Builder setFeatureNoiseSigma(com.google.cloud.vertexai.api.FeatureNoiseSigma value) { - if (featureNoiseSigmaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gradientNoiseSigma_ = value; - onChanged(); - } else { - featureNoiseSigmaBuilder_.setMessage(value); - } - gradientNoiseSigmaCase_ = 2; - return this; - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - public Builder setFeatureNoiseSigma( - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder builderForValue) { - if (featureNoiseSigmaBuilder_ == null) { - gradientNoiseSigma_ = builderForValue.build(); - onChanged(); - } else { - featureNoiseSigmaBuilder_.setMessage(builderForValue.build()); - } - gradientNoiseSigmaCase_ = 2; - return this; - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - public Builder mergeFeatureNoiseSigma(com.google.cloud.vertexai.api.FeatureNoiseSigma value) { - if (featureNoiseSigmaBuilder_ == null) { - if (gradientNoiseSigmaCase_ == 2 - && gradientNoiseSigma_ - != com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance()) { - gradientNoiseSigma_ = - com.google.cloud.vertexai.api.FeatureNoiseSigma.newBuilder( - (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_) - .mergeFrom(value) - .buildPartial(); - } else { - gradientNoiseSigma_ = value; - } - onChanged(); - } else { - if (gradientNoiseSigmaCase_ == 2) { - featureNoiseSigmaBuilder_.mergeFrom(value); - } else { - featureNoiseSigmaBuilder_.setMessage(value); - } - } - gradientNoiseSigmaCase_ = 2; - return this; - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - public Builder clearFeatureNoiseSigma() { - if (featureNoiseSigmaBuilder_ == null) { - if (gradientNoiseSigmaCase_ == 2) { - gradientNoiseSigmaCase_ = 0; - gradientNoiseSigma_ = null; - onChanged(); - } - } else { - if (gradientNoiseSigmaCase_ == 2) { - gradientNoiseSigmaCase_ = 0; - gradientNoiseSigma_ = null; - } - featureNoiseSigmaBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - public com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder getFeatureNoiseSigmaBuilder() { - return internalGetFeatureNoiseSigmaFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder - getFeatureNoiseSigmaOrBuilder() { - if ((gradientNoiseSigmaCase_ == 2) && (featureNoiseSigmaBuilder_ != null)) { - return featureNoiseSigmaBuilder_.getMessageOrBuilder(); - } else { - if (gradientNoiseSigmaCase_ == 2) { - return (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_; - } - return com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - } - - /** - * - * - *
-     * This is similar to
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-     * but provides additional flexibility. A separate noise sigma can be
-     * provided for each feature, which is useful if their distributions are
-     * different. No noise is added to features that are not set. If this field
-     * is unset,
-     * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-     * will be used for all features.
-     * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma, - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder> - internalGetFeatureNoiseSigmaFieldBuilder() { - if (featureNoiseSigmaBuilder_ == null) { - if (!(gradientNoiseSigmaCase_ == 2)) { - gradientNoiseSigma_ = - com.google.cloud.vertexai.api.FeatureNoiseSigma.getDefaultInstance(); - } - featureNoiseSigmaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FeatureNoiseSigma, - com.google.cloud.vertexai.api.FeatureNoiseSigma.Builder, - com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder>( - (com.google.cloud.vertexai.api.FeatureNoiseSigma) gradientNoiseSigma_, - getParentForChildren(), - isClean()); - gradientNoiseSigma_ = null; - } - gradientNoiseSigmaCase_ = 2; - onChanged(); - return featureNoiseSigmaBuilder_; - } - - private int noisySampleCount_; - - /** - * - * - *
-     * The number of gradient samples to use for
-     * approximation. The higher this number, the more accurate the gradient
-     * is, but the runtime complexity increases by this factor as well.
-     * Valid range of its value is [1, 50]. Defaults to 3.
-     * 
- * - * int32 noisy_sample_count = 3; - * - * @return The noisySampleCount. - */ - @java.lang.Override - public int getNoisySampleCount() { - return noisySampleCount_; - } - - /** - * - * - *
-     * The number of gradient samples to use for
-     * approximation. The higher this number, the more accurate the gradient
-     * is, but the runtime complexity increases by this factor as well.
-     * Valid range of its value is [1, 50]. Defaults to 3.
-     * 
- * - * int32 noisy_sample_count = 3; - * - * @param value The noisySampleCount to set. - * @return This builder for chaining. - */ - public Builder setNoisySampleCount(int value) { - - noisySampleCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of gradient samples to use for
-     * approximation. The higher this number, the more accurate the gradient
-     * is, but the runtime complexity increases by this factor as well.
-     * Valid range of its value is [1, 50]. Defaults to 3.
-     * 
- * - * int32 noisy_sample_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearNoisySampleCount() { - bitField0_ = (bitField0_ & ~0x00000004); - noisySampleCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SmoothGradConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SmoothGradConfig) - private static final com.google.cloud.vertexai.api.SmoothGradConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SmoothGradConfig(); - } - - public static com.google.cloud.vertexai.api.SmoothGradConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SmoothGradConfig 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.vertexai.api.SmoothGradConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java deleted file mode 100644 index 50fee80a8a95..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SmoothGradConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SmoothGradConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * This is a single float value and will be used to add noise to all the
-   * features. Use this field when all features are normalized to have the
-   * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-   * features are normalized to have 0-mean and 1-variance. Learn more about
-   * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-   *
-   * For best results the recommended value is about 10% - 20% of the standard
-   * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-   * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-   *
-   * If the distribution is different per feature, set
-   * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-   * instead for each feature.
-   * 
- * - * float noise_sigma = 1; - * - * @return Whether the noiseSigma field is set. - */ - boolean hasNoiseSigma(); - - /** - * - * - *
-   * This is a single float value and will be used to add noise to all the
-   * features. Use this field when all features are normalized to have the
-   * same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
-   * features are normalized to have 0-mean and 1-variance. Learn more about
-   * [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
-   *
-   * For best results the recommended value is about 10% - 20% of the standard
-   * deviation of the input feature. Refer to section 3.2 of the SmoothGrad
-   * paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1.
-   *
-   * If the distribution is different per feature, set
-   * [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
-   * instead for each feature.
-   * 
- * - * float noise_sigma = 1; - * - * @return The noiseSigma. - */ - float getNoiseSigma(); - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return Whether the featureNoiseSigma field is set. - */ - boolean hasFeatureNoiseSigma(); - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - * - * @return The featureNoiseSigma. - */ - com.google.cloud.vertexai.api.FeatureNoiseSigma getFeatureNoiseSigma(); - - /** - * - * - *
-   * This is similar to
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
-   * but provides additional flexibility. A separate noise sigma can be
-   * provided for each feature, which is useful if their distributions are
-   * different. No noise is added to features that are not set. If this field
-   * is unset,
-   * [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
-   * will be used for all features.
-   * 
- * - * .google.cloud.vertexai.v1.FeatureNoiseSigma feature_noise_sigma = 2; - */ - com.google.cloud.vertexai.api.FeatureNoiseSigmaOrBuilder getFeatureNoiseSigmaOrBuilder(); - - /** - * - * - *
-   * The number of gradient samples to use for
-   * approximation. The higher this number, the more accurate the gradient
-   * is, but the runtime complexity increases by this factor as well.
-   * Valid range of its value is [1, 50]. Defaults to 3.
-   * 
- * - * int32 noisy_sample_count = 3; - * - * @return The noisySampleCount. - */ - int getNoisySampleCount(); - - com.google.cloud.vertexai.api.SmoothGradConfig.GradientNoiseSigmaCase getGradientNoiseSigmaCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfig.java deleted file mode 100644 index 6ee9c0cd76eb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfig.java +++ /dev/null @@ -1,921 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for a single speaker in a multi-speaker setup.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeakerVoiceConfig} - */ -@com.google.protobuf.Generated -public final class SpeakerVoiceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SpeakerVoiceConfig) - SpeakerVoiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SpeakerVoiceConfig"); - } - - // Use SpeakerVoiceConfig.newBuilder() to construct. - private SpeakerVoiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SpeakerVoiceConfig() { - speaker_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeakerVoiceConfig.class, - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder.class); - } - - private int bitField0_; - public static final int SPEAKER_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object speaker_ = ""; - - /** - * - * - *
-   * Required. The name of the speaker. This should be the same as the speaker
-   * name used in the prompt.
-   * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The speaker. - */ - @java.lang.Override - public java.lang.String getSpeaker() { - java.lang.Object ref = speaker_; - 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(); - speaker_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the speaker. This should be the same as the speaker
-   * name used in the prompt.
-   * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for speaker. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSpeakerBytes() { - java.lang.Object ref = speaker_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - speaker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VOICE_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.VoiceConfig voiceConfig_; - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the voiceConfig field is set. - */ - @java.lang.Override - public boolean hasVoiceConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The voiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig() { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder() { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - - 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.GeneratedMessage.isStringEmpty(speaker_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, speaker_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getVoiceConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(speaker_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, speaker_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVoiceConfig()); - } - 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.vertexai.api.SpeakerVoiceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SpeakerVoiceConfig other = - (com.google.cloud.vertexai.api.SpeakerVoiceConfig) obj; - - if (!getSpeaker().equals(other.getSpeaker())) return false; - if (hasVoiceConfig() != other.hasVoiceConfig()) return false; - if (hasVoiceConfig()) { - if (!getVoiceConfig().equals(other.getVoiceConfig())) 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) + SPEAKER_FIELD_NUMBER; - hash = (53 * hash) + getSpeaker().hashCode(); - if (hasVoiceConfig()) { - hash = (37 * hash) + VOICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getVoiceConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig 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.vertexai.api.SpeakerVoiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig 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.vertexai.api.SpeakerVoiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SpeakerVoiceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for a single speaker in a multi-speaker setup.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeakerVoiceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SpeakerVoiceConfig) - com.google.cloud.vertexai.api.SpeakerVoiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeakerVoiceConfig.class, - com.google.cloud.vertexai.api.SpeakerVoiceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SpeakerVoiceConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetVoiceConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - speaker_ = ""; - voiceConfig_ = null; - if (voiceConfigBuilder_ != null) { - voiceConfigBuilder_.dispose(); - voiceConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeakerVoiceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeakerVoiceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SpeakerVoiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeakerVoiceConfig build() { - com.google.cloud.vertexai.api.SpeakerVoiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeakerVoiceConfig buildPartial() { - com.google.cloud.vertexai.api.SpeakerVoiceConfig result = - new com.google.cloud.vertexai.api.SpeakerVoiceConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SpeakerVoiceConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.speaker_ = speaker_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.voiceConfig_ = - voiceConfigBuilder_ == null ? voiceConfig_ : voiceConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SpeakerVoiceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.SpeakerVoiceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SpeakerVoiceConfig other) { - if (other == com.google.cloud.vertexai.api.SpeakerVoiceConfig.getDefaultInstance()) - return this; - if (!other.getSpeaker().isEmpty()) { - speaker_ = other.speaker_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasVoiceConfig()) { - mergeVoiceConfig(other.getVoiceConfig()); - } - 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: - { - speaker_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetVoiceConfigFieldBuilder().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 speaker_ = ""; - - /** - * - * - *
-     * Required. The name of the speaker. This should be the same as the speaker
-     * name used in the prompt.
-     * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The speaker. - */ - public java.lang.String getSpeaker() { - java.lang.Object ref = speaker_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - speaker_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the speaker. This should be the same as the speaker
-     * name used in the prompt.
-     * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for speaker. - */ - public com.google.protobuf.ByteString getSpeakerBytes() { - java.lang.Object ref = speaker_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - speaker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the speaker. This should be the same as the speaker
-     * name used in the prompt.
-     * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The speaker to set. - * @return This builder for chaining. - */ - public Builder setSpeaker(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - speaker_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the speaker. This should be the same as the speaker
-     * name used in the prompt.
-     * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearSpeaker() { - speaker_ = getDefaultInstance().getSpeaker(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the speaker. This should be the same as the speaker
-     * name used in the prompt.
-     * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for speaker to set. - * @return This builder for chaining. - */ - public Builder setSpeakerBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - speaker_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.VoiceConfig voiceConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder> - voiceConfigBuilder_; - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the voiceConfig field is set. - */ - public boolean hasVoiceConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The voiceConfig. - */ - public com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig() { - if (voiceConfigBuilder_ == null) { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } else { - return voiceConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setVoiceConfig(com.google.cloud.vertexai.api.VoiceConfig value) { - if (voiceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - voiceConfig_ = value; - } else { - voiceConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setVoiceConfig( - com.google.cloud.vertexai.api.VoiceConfig.Builder builderForValue) { - if (voiceConfigBuilder_ == null) { - voiceConfig_ = builderForValue.build(); - } else { - voiceConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeVoiceConfig(com.google.cloud.vertexai.api.VoiceConfig value) { - if (voiceConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && voiceConfig_ != null - && voiceConfig_ != com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance()) { - getVoiceConfigBuilder().mergeFrom(value); - } else { - voiceConfig_ = value; - } - } else { - voiceConfigBuilder_.mergeFrom(value); - } - if (voiceConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearVoiceConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - voiceConfig_ = null; - if (voiceConfigBuilder_ != null) { - voiceConfigBuilder_.dispose(); - voiceConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.VoiceConfig.Builder getVoiceConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetVoiceConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder() { - if (voiceConfigBuilder_ != null) { - return voiceConfigBuilder_.getMessageOrBuilder(); - } else { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - } - - /** - * - * - *
-     * Required. The configuration for the voice of this speaker.
-     * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder> - internalGetVoiceConfigFieldBuilder() { - if (voiceConfigBuilder_ == null) { - voiceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder>( - getVoiceConfig(), getParentForChildren(), isClean()); - voiceConfig_ = null; - } - return voiceConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SpeakerVoiceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SpeakerVoiceConfig) - private static final com.google.cloud.vertexai.api.SpeakerVoiceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SpeakerVoiceConfig(); - } - - public static com.google.cloud.vertexai.api.SpeakerVoiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SpeakerVoiceConfig 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.vertexai.api.SpeakerVoiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfigOrBuilder.java deleted file mode 100644 index ebd36c4761f4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeakerVoiceConfigOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SpeakerVoiceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SpeakerVoiceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the speaker. This should be the same as the speaker
-   * name used in the prompt.
-   * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The speaker. - */ - java.lang.String getSpeaker(); - - /** - * - * - *
-   * Required. The name of the speaker. This should be the same as the speaker
-   * name used in the prompt.
-   * 
- * - * string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for speaker. - */ - com.google.protobuf.ByteString getSpeakerBytes(); - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the voiceConfig field is set. - */ - boolean hasVoiceConfig(); - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The voiceConfig. - */ - com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig(); - - /** - * - * - *
-   * Required. The configuration for the voice of this speaker.
-   * 
- * - * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpec.java deleted file mode 100644 index 0131bfae97b3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpec.java +++ /dev/null @@ -1,2489 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for Speculative Decoding.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec} - */ -@com.google.protobuf.Generated -public final class SpeculativeDecodingSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec) - SpeculativeDecodingSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SpeculativeDecodingSpec"); - } - - // Use SpeculativeDecodingSpec.newBuilder() to construct. - private SpeculativeDecodingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SpeculativeDecodingSpec() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder.class); - } - - public interface DraftModelSpeculationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name of the draft model.
-     * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The draftModel. - */ - java.lang.String getDraftModel(); - - /** - * - * - *
-     * Required. The resource name of the draft model.
-     * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for draftModel. - */ - com.google.protobuf.ByteString getDraftModelBytes(); - } - - /** - * - * - *
-   * Draft model speculation works by using the smaller model to generate
-   * candidate tokens for speculative decoding.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation} - */ - public static final class DraftModelSpeculation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation) - DraftModelSpeculationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DraftModelSpeculation"); - } - - // Use DraftModelSpeculation.newBuilder() to construct. - private DraftModelSpeculation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DraftModelSpeculation() { - draftModel_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder - .class); - } - - public static final int DRAFT_MODEL_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object draftModel_ = ""; - - /** - * - * - *
-     * Required. The resource name of the draft model.
-     * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The draftModel. - */ - @java.lang.Override - public java.lang.String getDraftModel() { - java.lang.Object ref = draftModel_; - 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(); - draftModel_ = s; - return s; - } - } - - /** - * - * - *
-     * Required. The resource name of the draft model.
-     * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for draftModel. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDraftModelBytes() { - java.lang.Object ref = draftModel_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - draftModel_ = 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.GeneratedMessage.isStringEmpty(draftModel_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, draftModel_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(draftModel_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, draftModel_); - } - 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.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation other = - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) obj; - - if (!getDraftModel().equals(other.getDraftModel())) 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) + DRAFT_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getDraftModel().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - 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.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - 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.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Draft model speculation works by using the smaller model to generate
-     * candidate tokens for speculative decoding.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation) - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - draftModel_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_DraftModelSpeculation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation build() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - buildPartial() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation result = - new com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.draftModel_ = draftModel_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) { - return mergeFrom( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation other) { - if (other - == com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance()) return this; - if (!other.getDraftModel().isEmpty()) { - draftModel_ = other.draftModel_; - 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: - { - draftModel_ = 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 draftModel_ = ""; - - /** - * - * - *
-       * Required. The resource name of the draft model.
-       * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The draftModel. - */ - public java.lang.String getDraftModel() { - java.lang.Object ref = draftModel_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - draftModel_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Required. The resource name of the draft model.
-       * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for draftModel. - */ - public com.google.protobuf.ByteString getDraftModelBytes() { - java.lang.Object ref = draftModel_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - draftModel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Required. The resource name of the draft model.
-       * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The draftModel to set. - * @return This builder for chaining. - */ - public Builder setDraftModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - draftModel_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The resource name of the draft model.
-       * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearDraftModel() { - draftModel_ = getDefaultInstance().getDraftModel(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The resource name of the draft model.
-       * 
- * - * - * string draft_model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for draftModel to set. - * @return This builder for chaining. - */ - public Builder setDraftModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - draftModel_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation) - private static final com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation(); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DraftModelSpeculation 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.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface NgramSpeculationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The number of last N input tokens used as ngram to search/match
-     * against the previous prompt sequence.
-     * This is equal to the N in N-Gram.
-     * The default value is 3 if not specified.
-     * 
- * - * int32 ngram_size = 1; - * - * @return The ngramSize. - */ - int getNgramSize(); - } - - /** - * - * - *
-   * N-Gram speculation works by trying to find matching tokens in the
-   * previous prompt sequence and use those as speculation for generating
-   * new tokens.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation} - */ - public static final class NgramSpeculation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation) - NgramSpeculationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "NgramSpeculation"); - } - - // Use NgramSpeculation.newBuilder() to construct. - private NgramSpeculation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private NgramSpeculation() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder.class); - } - - public static final int NGRAM_SIZE_FIELD_NUMBER = 1; - private int ngramSize_ = 0; - - /** - * - * - *
-     * The number of last N input tokens used as ngram to search/match
-     * against the previous prompt sequence.
-     * This is equal to the N in N-Gram.
-     * The default value is 3 if not specified.
-     * 
- * - * int32 ngram_size = 1; - * - * @return The ngramSize. - */ - @java.lang.Override - public int getNgramSize() { - return ngramSize_; - } - - 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 (ngramSize_ != 0) { - output.writeInt32(1, ngramSize_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (ngramSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, ngramSize_); - } - 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.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation other = - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) obj; - - if (getNgramSize() != other.getNgramSize()) 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) + NGRAM_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getNgramSize(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation 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.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation 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.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * N-Gram speculation works by trying to find matching tokens in the
-     * previous prompt sequence and use those as speculation for generating
-     * new tokens.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation) - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder - .class); - } - - // Construct using - // com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ngramSize_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_NgramSpeculation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation build() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation buildPartial() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation result = - new com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ngramSize_ = ngramSize_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) { - return mergeFrom( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation other) { - if (other - == com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance()) return this; - if (other.getNgramSize() != 0) { - setNgramSize(other.getNgramSize()); - } - 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: - { - ngramSize_ = input.readInt32(); - 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 ngramSize_; - - /** - * - * - *
-       * The number of last N input tokens used as ngram to search/match
-       * against the previous prompt sequence.
-       * This is equal to the N in N-Gram.
-       * The default value is 3 if not specified.
-       * 
- * - * int32 ngram_size = 1; - * - * @return The ngramSize. - */ - @java.lang.Override - public int getNgramSize() { - return ngramSize_; - } - - /** - * - * - *
-       * The number of last N input tokens used as ngram to search/match
-       * against the previous prompt sequence.
-       * This is equal to the N in N-Gram.
-       * The default value is 3 if not specified.
-       * 
- * - * int32 ngram_size = 1; - * - * @param value The ngramSize to set. - * @return This builder for chaining. - */ - public Builder setNgramSize(int value) { - - ngramSize_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * The number of last N input tokens used as ngram to search/match
-       * against the previous prompt sequence.
-       * This is equal to the N in N-Gram.
-       * The default value is 3 if not specified.
-       * 
- * - * int32 ngram_size = 1; - * - * @return This builder for chaining. - */ - public Builder clearNgramSize() { - bitField0_ = (bitField0_ & ~0x00000001); - ngramSize_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation) - private static final com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation(); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NgramSpeculation 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.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int speculationCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object speculation_; - - public enum SpeculationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DRAFT_MODEL_SPECULATION(2), - NGRAM_SPECULATION(3), - SPECULATION_NOT_SET(0); - private final int value; - - private SpeculationCase(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 SpeculationCase valueOf(int value) { - return forNumber(value); - } - - public static SpeculationCase forNumber(int value) { - switch (value) { - case 2: - return DRAFT_MODEL_SPECULATION; - case 3: - return NGRAM_SPECULATION; - case 0: - return SPECULATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SpeculationCase getSpeculationCase() { - return SpeculationCase.forNumber(speculationCase_); - } - - public static final int DRAFT_MODEL_SPECULATION_FIELD_NUMBER = 2; - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return Whether the draftModelSpeculation field is set. - */ - @java.lang.Override - public boolean hasDraftModelSpeculation() { - return speculationCase_ == 2; - } - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return The draftModelSpeculation. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDraftModelSpeculation() { - if (speculationCase_ == 2) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder - getDraftModelSpeculationOrBuilder() { - if (speculationCase_ == 2) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - - public static final int NGRAM_SPECULATION_FIELD_NUMBER = 3; - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return Whether the ngramSpeculation field is set. - */ - @java.lang.Override - public boolean hasNgramSpeculation() { - return speculationCase_ == 3; - } - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return The ngramSpeculation. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - getNgramSpeculation() { - if (speculationCase_ == 3) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder - getNgramSpeculationOrBuilder() { - if (speculationCase_ == 3) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - - public static final int SPECULATIVE_TOKEN_COUNT_FIELD_NUMBER = 1; - private int speculativeTokenCount_ = 0; - - /** - * - * - *
-   * The number of speculative tokens to generate at each step.
-   * 
- * - * int32 speculative_token_count = 1; - * - * @return The speculativeTokenCount. - */ - @java.lang.Override - public int getSpeculativeTokenCount() { - return speculativeTokenCount_; - } - - 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 (speculativeTokenCount_ != 0) { - output.writeInt32(1, speculativeTokenCount_); - } - if (speculationCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_); - } - if (speculationCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) speculation_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (speculativeTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, speculativeTokenCount_); - } - if (speculationCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_); - } - if (speculationCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) - speculation_); - } - 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.vertexai.api.SpeculativeDecodingSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SpeculativeDecodingSpec other = - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec) obj; - - if (getSpeculativeTokenCount() != other.getSpeculativeTokenCount()) return false; - if (!getSpeculationCase().equals(other.getSpeculationCase())) return false; - switch (speculationCase_) { - case 2: - if (!getDraftModelSpeculation().equals(other.getDraftModelSpeculation())) return false; - break; - case 3: - if (!getNgramSpeculation().equals(other.getNgramSpeculation())) 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) + SPECULATIVE_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSpeculativeTokenCount(); - switch (speculationCase_) { - case 2: - hash = (37 * hash) + DRAFT_MODEL_SPECULATION_FIELD_NUMBER; - hash = (53 * hash) + getDraftModelSpeculation().hashCode(); - break; - case 3: - hash = (37 * hash) + NGRAM_SPECULATION_FIELD_NUMBER; - hash = (53 * hash) + getNgramSpeculation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec 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.vertexai.api.SpeculativeDecodingSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec 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.vertexai.api.SpeculativeDecodingSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SpeculativeDecodingSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for Speculative Decoding.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeculativeDecodingSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SpeculativeDecodingSpec) - com.google.cloud.vertexai.api.SpeculativeDecodingSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.class, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SpeculativeDecodingSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (draftModelSpeculationBuilder_ != null) { - draftModelSpeculationBuilder_.clear(); - } - if (ngramSpeculationBuilder_ != null) { - ngramSpeculationBuilder_.clear(); - } - speculativeTokenCount_ = 0; - speculationCase_ = 0; - speculation_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointProto - .internal_static_google_cloud_vertexai_v1_SpeculativeDecodingSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec build() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec buildPartial() { - com.google.cloud.vertexai.api.SpeculativeDecodingSpec result = - new com.google.cloud.vertexai.api.SpeculativeDecodingSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SpeculativeDecodingSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.speculativeTokenCount_ = speculativeTokenCount_; - } - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.SpeculativeDecodingSpec result) { - result.speculationCase_ = speculationCase_; - result.speculation_ = this.speculation_; - if (speculationCase_ == 2 && draftModelSpeculationBuilder_ != null) { - result.speculation_ = draftModelSpeculationBuilder_.build(); - } - if (speculationCase_ == 3 && ngramSpeculationBuilder_ != null) { - result.speculation_ = ngramSpeculationBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SpeculativeDecodingSpec) { - return mergeFrom((com.google.cloud.vertexai.api.SpeculativeDecodingSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SpeculativeDecodingSpec other) { - if (other == com.google.cloud.vertexai.api.SpeculativeDecodingSpec.getDefaultInstance()) - return this; - if (other.getSpeculativeTokenCount() != 0) { - setSpeculativeTokenCount(other.getSpeculativeTokenCount()); - } - switch (other.getSpeculationCase()) { - case DRAFT_MODEL_SPECULATION: - { - mergeDraftModelSpeculation(other.getDraftModelSpeculation()); - break; - } - case NGRAM_SPECULATION: - { - mergeNgramSpeculation(other.getNgramSpeculation()); - break; - } - case SPECULATION_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 8: - { - speculativeTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 8 - case 18: - { - input.readMessage( - internalGetDraftModelSpeculationFieldBuilder().getBuilder(), extensionRegistry); - speculationCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetNgramSpeculationFieldBuilder().getBuilder(), extensionRegistry); - speculationCase_ = 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 speculationCase_ = 0; - private java.lang.Object speculation_; - - public SpeculationCase getSpeculationCase() { - return SpeculationCase.forNumber(speculationCase_); - } - - public Builder clearSpeculation() { - speculationCase_ = 0; - speculation_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder> - draftModelSpeculationBuilder_; - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return Whether the draftModelSpeculation field is set. - */ - @java.lang.Override - public boolean hasDraftModelSpeculation() { - return speculationCase_ == 2; - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return The draftModelSpeculation. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDraftModelSpeculation() { - if (draftModelSpeculationBuilder_ == null) { - if (speculationCase_ == 2) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } else { - if (speculationCase_ == 2) { - return draftModelSpeculationBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - public Builder setDraftModelSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation value) { - if (draftModelSpeculationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - speculation_ = value; - onChanged(); - } else { - draftModelSpeculationBuilder_.setMessage(value); - } - speculationCase_ = 2; - return this; - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - public Builder setDraftModelSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder - builderForValue) { - if (draftModelSpeculationBuilder_ == null) { - speculation_ = builderForValue.build(); - onChanged(); - } else { - draftModelSpeculationBuilder_.setMessage(builderForValue.build()); - } - speculationCase_ = 2; - return this; - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - public Builder mergeDraftModelSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation value) { - if (draftModelSpeculationBuilder_ == null) { - if (speculationCase_ == 2 - && speculation_ - != com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance()) { - speculation_ = - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .newBuilder( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_) - .mergeFrom(value) - .buildPartial(); - } else { - speculation_ = value; - } - onChanged(); - } else { - if (speculationCase_ == 2) { - draftModelSpeculationBuilder_.mergeFrom(value); - } else { - draftModelSpeculationBuilder_.setMessage(value); - } - } - speculationCase_ = 2; - return this; - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - public Builder clearDraftModelSpeculation() { - if (draftModelSpeculationBuilder_ == null) { - if (speculationCase_ == 2) { - speculationCase_ = 0; - speculation_ = null; - onChanged(); - } - } else { - if (speculationCase_ == 2) { - speculationCase_ = 0; - speculation_ = null; - } - draftModelSpeculationBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder - getDraftModelSpeculationBuilder() { - return internalGetDraftModelSpeculationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder - getDraftModelSpeculationOrBuilder() { - if ((speculationCase_ == 2) && (draftModelSpeculationBuilder_ != null)) { - return draftModelSpeculationBuilder_.getMessageOrBuilder(); - } else { - if (speculationCase_ == 2) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * draft model speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder> - internalGetDraftModelSpeculationFieldBuilder() { - if (draftModelSpeculationBuilder_ == null) { - if (!(speculationCase_ == 2)) { - speculation_ = - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - .getDefaultInstance(); - } - draftModelSpeculationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec - .DraftModelSpeculationOrBuilder>( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation) - speculation_, - getParentForChildren(), - isClean()); - speculation_ = null; - } - speculationCase_ = 2; - onChanged(); - return draftModelSpeculationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder> - ngramSpeculationBuilder_; - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return Whether the ngramSpeculation field is set. - */ - @java.lang.Override - public boolean hasNgramSpeculation() { - return speculationCase_ == 3; - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return The ngramSpeculation. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - getNgramSpeculation() { - if (ngramSpeculationBuilder_ == null) { - if (speculationCase_ == 3) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } else { - if (speculationCase_ == 3) { - return ngramSpeculationBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - public Builder setNgramSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation value) { - if (ngramSpeculationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - speculation_ = value; - onChanged(); - } else { - ngramSpeculationBuilder_.setMessage(value); - } - speculationCase_ = 3; - return this; - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - public Builder setNgramSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder - builderForValue) { - if (ngramSpeculationBuilder_ == null) { - speculation_ = builderForValue.build(); - onChanged(); - } else { - ngramSpeculationBuilder_.setMessage(builderForValue.build()); - } - speculationCase_ = 3; - return this; - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - public Builder mergeNgramSpeculation( - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation value) { - if (ngramSpeculationBuilder_ == null) { - if (speculationCase_ == 3 - && speculation_ - != com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance()) { - speculation_ = - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.newBuilder( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) - speculation_) - .mergeFrom(value) - .buildPartial(); - } else { - speculation_ = value; - } - onChanged(); - } else { - if (speculationCase_ == 3) { - ngramSpeculationBuilder_.mergeFrom(value); - } else { - ngramSpeculationBuilder_.setMessage(value); - } - } - speculationCase_ = 3; - return this; - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - public Builder clearNgramSpeculation() { - if (ngramSpeculationBuilder_ == null) { - if (speculationCase_ == 3) { - speculationCase_ = 0; - speculation_ = null; - onChanged(); - } - } else { - if (speculationCase_ == 3) { - speculationCase_ = 0; - speculation_ = null; - } - ngramSpeculationBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder - getNgramSpeculationBuilder() { - return internalGetNgramSpeculationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder - getNgramSpeculationOrBuilder() { - if ((speculationCase_ == 3) && (ngramSpeculationBuilder_ != null)) { - return ngramSpeculationBuilder_.getMessageOrBuilder(); - } else { - if (speculationCase_ == 3) { - return (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) - speculation_; - } - return com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - } - - /** - * - * - *
-     * N-Gram speculation.
-     * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder> - internalGetNgramSpeculationFieldBuilder() { - if (ngramSpeculationBuilder_ == null) { - if (!(speculationCase_ == 3)) { - speculation_ = - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation - .getDefaultInstance(); - } - ngramSpeculationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation.Builder, - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder>( - (com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation) - speculation_, - getParentForChildren(), - isClean()); - speculation_ = null; - } - speculationCase_ = 3; - onChanged(); - return ngramSpeculationBuilder_; - } - - private int speculativeTokenCount_; - - /** - * - * - *
-     * The number of speculative tokens to generate at each step.
-     * 
- * - * int32 speculative_token_count = 1; - * - * @return The speculativeTokenCount. - */ - @java.lang.Override - public int getSpeculativeTokenCount() { - return speculativeTokenCount_; - } - - /** - * - * - *
-     * The number of speculative tokens to generate at each step.
-     * 
- * - * int32 speculative_token_count = 1; - * - * @param value The speculativeTokenCount to set. - * @return This builder for chaining. - */ - public Builder setSpeculativeTokenCount(int value) { - - speculativeTokenCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The number of speculative tokens to generate at each step.
-     * 
- * - * int32 speculative_token_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearSpeculativeTokenCount() { - bitField0_ = (bitField0_ & ~0x00000004); - speculativeTokenCount_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SpeculativeDecodingSpec) - private static final com.google.cloud.vertexai.api.SpeculativeDecodingSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SpeculativeDecodingSpec(); - } - - public static com.google.cloud.vertexai.api.SpeculativeDecodingSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SpeculativeDecodingSpec 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.vertexai.api.SpeculativeDecodingSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpecOrBuilder.java deleted file mode 100644 index bbe788050b58..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeculativeDecodingSpecOrBuilder.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SpeculativeDecodingSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SpeculativeDecodingSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return Whether the draftModelSpeculation field is set. - */ - boolean hasDraftModelSpeculation(); - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - * - * @return The draftModelSpeculation. - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculation - getDraftModelSpeculation(); - - /** - * - * - *
-   * draft model speculation.
-   * 
- * - * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.DraftModelSpeculation draft_model_speculation = 2; - * - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.DraftModelSpeculationOrBuilder - getDraftModelSpeculationOrBuilder(); - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return Whether the ngramSpeculation field is set. - */ - boolean hasNgramSpeculation(); - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - * - * @return The ngramSpeculation. - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculation getNgramSpeculation(); - - /** - * - * - *
-   * N-Gram speculation.
-   * 
- * - * .google.cloud.vertexai.v1.SpeculativeDecodingSpec.NgramSpeculation ngram_speculation = 3; - * - */ - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.NgramSpeculationOrBuilder - getNgramSpeculationOrBuilder(); - - /** - * - * - *
-   * The number of speculative tokens to generate at each step.
-   * 
- * - * int32 speculative_token_count = 1; - * - * @return The speculativeTokenCount. - */ - int getSpeculativeTokenCount(); - - com.google.cloud.vertexai.api.SpeculativeDecodingSpec.SpeculationCase getSpeculationCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfig.java deleted file mode 100644 index c5fe46a3d406..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfig.java +++ /dev/null @@ -1,1203 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for speech generation.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeechConfig} - */ -@com.google.protobuf.Generated -public final class SpeechConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.SpeechConfig) - SpeechConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SpeechConfig"); - } - - // Use SpeechConfig.newBuilder() to construct. - private SpeechConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SpeechConfig() { - languageCode_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeechConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeechConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeechConfig.class, - com.google.cloud.vertexai.api.SpeechConfig.Builder.class); - } - - private int bitField0_; - public static final int VOICE_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.VoiceConfig voiceConfig_; - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return Whether the voiceConfig field is set. - */ - @java.lang.Override - public boolean hasVoiceConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return The voiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig() { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder() { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; - - /** - * - * - *
-   * Optional. The language code (ISO 639-1) for the speech synthesis.
-   * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. The language code (ISO 639-1) for the speech synthesis.
-   * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - public static final int MULTI_SPEAKER_VOICE_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig multiSpeakerVoiceConfig_; - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * @return Whether the multiSpeakerVoiceConfig field is set. - */ - @java.lang.Override - public boolean hasMultiSpeakerVoiceConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * @return The multiSpeakerVoiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig getMultiSpeakerVoiceConfig() { - return multiSpeakerVoiceConfig_ == null - ? com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance() - : multiSpeakerVoiceConfig_; - } - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder - getMultiSpeakerVoiceConfigOrBuilder() { - return multiSpeakerVoiceConfig_ == null - ? com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance() - : multiSpeakerVoiceConfig_; - } - - 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.writeMessage(1, getVoiceConfig()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, languageCode_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getMultiSpeakerVoiceConfig()); - } - 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.computeMessageSize(1, getVoiceConfig()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, languageCode_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMultiSpeakerVoiceConfig()); - } - 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.vertexai.api.SpeechConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.SpeechConfig other = - (com.google.cloud.vertexai.api.SpeechConfig) obj; - - if (hasVoiceConfig() != other.hasVoiceConfig()) return false; - if (hasVoiceConfig()) { - if (!getVoiceConfig().equals(other.getVoiceConfig())) return false; - } - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (hasMultiSpeakerVoiceConfig() != other.hasMultiSpeakerVoiceConfig()) return false; - if (hasMultiSpeakerVoiceConfig()) { - if (!getMultiSpeakerVoiceConfig().equals(other.getMultiSpeakerVoiceConfig())) 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 (hasVoiceConfig()) { - hash = (37 * hash) + VOICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getVoiceConfig().hashCode(); - } - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - if (hasMultiSpeakerVoiceConfig()) { - hash = (37 * hash) + MULTI_SPEAKER_VOICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMultiSpeakerVoiceConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeechConfig 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.vertexai.api.SpeechConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeechConfig 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.vertexai.api.SpeechConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.SpeechConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.SpeechConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for speech generation.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.SpeechConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.SpeechConfig) - com.google.cloud.vertexai.api.SpeechConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeechConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeechConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.SpeechConfig.class, - com.google.cloud.vertexai.api.SpeechConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.SpeechConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetVoiceConfigFieldBuilder(); - internalGetMultiSpeakerVoiceConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - voiceConfig_ = null; - if (voiceConfigBuilder_ != null) { - voiceConfigBuilder_.dispose(); - voiceConfigBuilder_ = null; - } - languageCode_ = ""; - multiSpeakerVoiceConfig_ = null; - if (multiSpeakerVoiceConfigBuilder_ != null) { - multiSpeakerVoiceConfigBuilder_.dispose(); - multiSpeakerVoiceConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_SpeechConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeechConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeechConfig build() { - com.google.cloud.vertexai.api.SpeechConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.SpeechConfig buildPartial() { - com.google.cloud.vertexai.api.SpeechConfig result = - new com.google.cloud.vertexai.api.SpeechConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.SpeechConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.voiceConfig_ = - voiceConfigBuilder_ == null ? voiceConfig_ : voiceConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.languageCode_ = languageCode_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.multiSpeakerVoiceConfig_ = - multiSpeakerVoiceConfigBuilder_ == null - ? multiSpeakerVoiceConfig_ - : multiSpeakerVoiceConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.SpeechConfig) { - return mergeFrom((com.google.cloud.vertexai.api.SpeechConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.SpeechConfig other) { - if (other == com.google.cloud.vertexai.api.SpeechConfig.getDefaultInstance()) return this; - if (other.hasVoiceConfig()) { - mergeVoiceConfig(other.getVoiceConfig()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMultiSpeakerVoiceConfig()) { - mergeMultiSpeakerVoiceConfig(other.getMultiSpeakerVoiceConfig()); - } - 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( - internalGetVoiceConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetMultiSpeakerVoiceConfigFieldBuilder().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.vertexai.api.VoiceConfig voiceConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder> - voiceConfigBuilder_; - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return Whether the voiceConfig field is set. - */ - public boolean hasVoiceConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return The voiceConfig. - */ - public com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig() { - if (voiceConfigBuilder_ == null) { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } else { - return voiceConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public Builder setVoiceConfig(com.google.cloud.vertexai.api.VoiceConfig value) { - if (voiceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - voiceConfig_ = value; - } else { - voiceConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public Builder setVoiceConfig( - com.google.cloud.vertexai.api.VoiceConfig.Builder builderForValue) { - if (voiceConfigBuilder_ == null) { - voiceConfig_ = builderForValue.build(); - } else { - voiceConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public Builder mergeVoiceConfig(com.google.cloud.vertexai.api.VoiceConfig value) { - if (voiceConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && voiceConfig_ != null - && voiceConfig_ != com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance()) { - getVoiceConfigBuilder().mergeFrom(value); - } else { - voiceConfig_ = value; - } - } else { - voiceConfigBuilder_.mergeFrom(value); - } - if (voiceConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public Builder clearVoiceConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - voiceConfig_ = null; - if (voiceConfigBuilder_ != null) { - voiceConfigBuilder_.dispose(); - voiceConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public com.google.cloud.vertexai.api.VoiceConfig.Builder getVoiceConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetVoiceConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - public com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder() { - if (voiceConfigBuilder_ != null) { - return voiceConfigBuilder_.getMessageOrBuilder(); - } else { - return voiceConfig_ == null - ? com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance() - : voiceConfig_; - } - } - - /** - * - * - *
-     * The configuration for the voice to use.
-     * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder> - internalGetVoiceConfigFieldBuilder() { - if (voiceConfigBuilder_ == null) { - voiceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.VoiceConfig, - com.google.cloud.vertexai.api.VoiceConfig.Builder, - com.google.cloud.vertexai.api.VoiceConfigOrBuilder>( - getVoiceConfig(), getParentForChildren(), isClean()); - voiceConfig_ = null; - } - return voiceConfigBuilder_; - } - - private java.lang.Object languageCode_ = ""; - - /** - * - * - *
-     * Optional. The language code (ISO 639-1) for the speech synthesis.
-     * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The language code (ISO 639-1) for the speech synthesis.
-     * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. The language code (ISO 639-1) for the speech synthesis.
-     * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The language code (ISO 639-1) for the speech synthesis.
-     * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The language code (ISO 639-1) for the speech synthesis.
-     * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig multiSpeakerVoiceConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder> - multiSpeakerVoiceConfigBuilder_; - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * - * @return Whether the multiSpeakerVoiceConfig field is set. - */ - public boolean hasMultiSpeakerVoiceConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * - * @return The multiSpeakerVoiceConfig. - */ - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig getMultiSpeakerVoiceConfig() { - if (multiSpeakerVoiceConfigBuilder_ == null) { - return multiSpeakerVoiceConfig_ == null - ? com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance() - : multiSpeakerVoiceConfig_; - } else { - return multiSpeakerVoiceConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public Builder setMultiSpeakerVoiceConfig( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig value) { - if (multiSpeakerVoiceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - multiSpeakerVoiceConfig_ = value; - } else { - multiSpeakerVoiceConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public Builder setMultiSpeakerVoiceConfig( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder builderForValue) { - if (multiSpeakerVoiceConfigBuilder_ == null) { - multiSpeakerVoiceConfig_ = builderForValue.build(); - } else { - multiSpeakerVoiceConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public Builder mergeMultiSpeakerVoiceConfig( - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig value) { - if (multiSpeakerVoiceConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && multiSpeakerVoiceConfig_ != null - && multiSpeakerVoiceConfig_ - != com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance()) { - getMultiSpeakerVoiceConfigBuilder().mergeFrom(value); - } else { - multiSpeakerVoiceConfig_ = value; - } - } else { - multiSpeakerVoiceConfigBuilder_.mergeFrom(value); - } - if (multiSpeakerVoiceConfig_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public Builder clearMultiSpeakerVoiceConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - multiSpeakerVoiceConfig_ = null; - if (multiSpeakerVoiceConfigBuilder_ != null) { - multiSpeakerVoiceConfigBuilder_.dispose(); - multiSpeakerVoiceConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder - getMultiSpeakerVoiceConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetMultiSpeakerVoiceConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - public com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder - getMultiSpeakerVoiceConfigOrBuilder() { - if (multiSpeakerVoiceConfigBuilder_ != null) { - return multiSpeakerVoiceConfigBuilder_.getMessageOrBuilder(); - } else { - return multiSpeakerVoiceConfig_ == null - ? com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.getDefaultInstance() - : multiSpeakerVoiceConfig_; - } - } - - /** - * - * - *
-     * The configuration for a multi-speaker text-to-speech request.
-     * This field is mutually exclusive with `voice_config`.
-     * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder> - internalGetMultiSpeakerVoiceConfigFieldBuilder() { - if (multiSpeakerVoiceConfigBuilder_ == null) { - multiSpeakerVoiceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig.Builder, - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder>( - getMultiSpeakerVoiceConfig(), getParentForChildren(), isClean()); - multiSpeakerVoiceConfig_ = null; - } - return multiSpeakerVoiceConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.SpeechConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.SpeechConfig) - private static final com.google.cloud.vertexai.api.SpeechConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.SpeechConfig(); - } - - public static com.google.cloud.vertexai.api.SpeechConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SpeechConfig 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.vertexai.api.SpeechConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfigOrBuilder.java deleted file mode 100644 index 17968ccf6997..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SpeechConfigOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface SpeechConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.SpeechConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return Whether the voiceConfig field is set. - */ - boolean hasVoiceConfig(); - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - * - * @return The voiceConfig. - */ - com.google.cloud.vertexai.api.VoiceConfig getVoiceConfig(); - - /** - * - * - *
-   * The configuration for the voice to use.
-   * 
- * - * .google.cloud.vertexai.v1.VoiceConfig voice_config = 1; - */ - com.google.cloud.vertexai.api.VoiceConfigOrBuilder getVoiceConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The language code (ISO 639-1) for the speech synthesis.
-   * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - - /** - * - * - *
-   * Optional. The language code (ISO 639-1) for the speech synthesis.
-   * 
- * - * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString getLanguageCodeBytes(); - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * @return Whether the multiSpeakerVoiceConfig field is set. - */ - boolean hasMultiSpeakerVoiceConfig(); - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - * - * @return The multiSpeakerVoiceConfig. - */ - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfig getMultiSpeakerVoiceConfig(); - - /** - * - * - *
-   * The configuration for a multi-speaker text-to-speech request.
-   * This field is mutually exclusive with `voice_config`.
-   * 
- * - * .google.cloud.vertexai.v1.MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; - */ - com.google.cloud.vertexai.api.MultiSpeakerVoiceConfigOrBuilder - getMultiSpeakerVoiceConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java deleted file mode 100644 index 77592111d108..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java +++ /dev/null @@ -1,1514 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
- *
- * The first message must contain
- * [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]
- * field and optionally [input][]. The subsequent messages must contain
- * [input][].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectPredictRequest} - */ -@com.google.protobuf.Generated -public final class StreamDirectPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamDirectPredictRequest) - StreamDirectPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamDirectPredictRequest"); - } - - // Use StreamDirectPredictRequest.newBuilder() to construct. - private StreamDirectPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamDirectPredictRequest() { - endpoint_ = ""; - inputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, - com.google.cloud.vertexai.api.StreamDirectPredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List inputs_; - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getInputsList() { - return inputs_; - } - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getInputsOrBuilderList() { - return inputs_; - } - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getInputsCount() { - return inputs_.size(); - } - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - return inputs_.get(index); - } - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - return inputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - output.writeMessage(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); - } - 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.vertexai.api.StreamDirectPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamDirectPredictRequest other = - (com.google.cloud.vertexai.api.StreamDirectPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInputsList().equals(other.getInputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInputsCount() > 0) { - hash = (37 * hash) + INPUTS_FIELD_NUMBER; - hash = (53 * hash) + getInputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest 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.vertexai.api.StreamDirectPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest 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.vertexai.api.StreamDirectPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamDirectPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
-   *
-   * The first message must contain
-   * [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]
-   * field and optionally [input][]. The subsequent messages must contain
-   * [input][].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectPredictRequest) - com.google.cloud.vertexai.api.StreamDirectPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, - com.google.cloud.vertexai.api.StreamDirectPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamDirectPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - } else { - inputs_ = null; - inputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamDirectPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictRequest build() { - com.google.cloud.vertexai.api.StreamDirectPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictRequest buildPartial() { - com.google.cloud.vertexai.api.StreamDirectPredictRequest result = - new com.google.cloud.vertexai.api.StreamDirectPredictRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.StreamDirectPredictRequest result) { - if (inputsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - inputs_ = java.util.Collections.unmodifiableList(inputs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inputs_ = inputs_; - } else { - result.inputs_ = inputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamDirectPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.StreamDirectPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectPredictRequest other) { - if (other == com.google.cloud.vertexai.api.StreamDirectPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (inputsBuilder_ == null) { - if (!other.inputs_.isEmpty()) { - if (inputs_.isEmpty()) { - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInputsIsMutable(); - inputs_.addAll(other.inputs_); - } - onChanged(); - } - } else { - if (!other.inputs_.isEmpty()) { - if (inputsBuilder_.isEmpty()) { - inputsBuilder_.dispose(); - inputsBuilder_ = null; - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - inputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInputsFieldBuilder() - : null; - } else { - inputsBuilder_.addAllMessages(other.inputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(m); - } else { - inputsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetParametersFieldBuilder().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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List inputs_ = - java.util.Collections.emptyList(); - - private void ensureInputsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inputs_ = new java.util.ArrayList(inputs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - inputsBuilder_; - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInputsList() { - if (inputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputs_); - } else { - return inputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getInputsCount() { - if (inputsBuilder_ == null) { - return inputs_.size(); - } else { - return inputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.set(index, value); - onChanged(); - } else { - inputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.set(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(value); - onChanged(); - } else { - inputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(index, value); - onChanged(); - } else { - inputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllInputs( - java.lang.Iterable values) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_); - onChanged(); - } else { - inputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearInputs() { - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - inputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeInputs(int index) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.remove(index); - onChanged(); - } else { - inputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tensor.Builder getInputsBuilder(int index) { - return internalGetInputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInputsOrBuilderList() { - if (inputsBuilder_ != null) { - return inputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputs_); - } - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder() { - return internalGetInputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder(int index) { - return internalGetInputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getInputsBuilderList() { - return internalGetInputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetInputsFieldBuilder() { - if (inputsBuilder_ == null) { - inputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - inputs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - inputs_ = null; - } - return inputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * Optional. The parameters that govern the prediction.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamDirectPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectPredictRequest) - private static final com.google.cloud.vertexai.api.StreamDirectPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectPredictRequest(); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamDirectPredictRequest 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.vertexai.api.StreamDirectPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java deleted file mode 100644 index 50fadcc3e0dd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamDirectPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInputsList(); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tensor getInputs(int index); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getInputsCount(); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getInputsOrBuilderList(); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index); - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * Optional. The parameters that govern the prediction.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponse.java deleted file mode 100644 index 3072e04cd46a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponse.java +++ /dev/null @@ -1,1217 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectPredictResponse} - */ -@com.google.protobuf.Generated -public final class StreamDirectPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamDirectPredictResponse) - StreamDirectPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamDirectPredictResponse"); - } - - // Use StreamDirectPredictResponse.newBuilder() to construct. - private StreamDirectPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamDirectPredictResponse() { - outputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, - com.google.cloud.vertexai.api.StreamDirectPredictResponse.Builder.class); - } - - private int bitField0_; - public static final int OUTPUTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List outputs_; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List getOutputsList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List - getOutputsOrBuilderList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public int getOutputsCount() { - return outputs_.size(); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - return outputs_.get(index); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - return outputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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 < outputs_.size(); i++) { - output.writeMessage(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < outputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); - } - 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.vertexai.api.StreamDirectPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamDirectPredictResponse other = - (com.google.cloud.vertexai.api.StreamDirectPredictResponse) obj; - - if (!getOutputsList().equals(other.getOutputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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 (getOutputsCount() > 0) { - hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; - hash = (53 * hash) + getOutputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse 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.vertexai.api.StreamDirectPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse 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.vertexai.api.StreamDirectPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamDirectPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectPredictResponse) - com.google.cloud.vertexai.api.StreamDirectPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, - com.google.cloud.vertexai.api.StreamDirectPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamDirectPredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetOutputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - } else { - outputs_ = null; - outputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamDirectPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictResponse build() { - com.google.cloud.vertexai.api.StreamDirectPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectPredictResponse buildPartial() { - com.google.cloud.vertexai.api.StreamDirectPredictResponse result = - new com.google.cloud.vertexai.api.StreamDirectPredictResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.StreamDirectPredictResponse result) { - if (outputsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - outputs_ = java.util.Collections.unmodifiableList(outputs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.outputs_ = outputs_; - } else { - result.outputs_ = outputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectPredictResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamDirectPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.StreamDirectPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectPredictResponse other) { - if (other == com.google.cloud.vertexai.api.StreamDirectPredictResponse.getDefaultInstance()) - return this; - if (outputsBuilder_ == null) { - if (!other.outputs_.isEmpty()) { - if (outputs_.isEmpty()) { - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOutputsIsMutable(); - outputs_.addAll(other.outputs_); - } - onChanged(); - } - } else { - if (!other.outputs_.isEmpty()) { - if (outputsBuilder_.isEmpty()) { - outputsBuilder_.dispose(); - outputsBuilder_ = null; - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - outputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetOutputsFieldBuilder() - : null; - } else { - outputsBuilder_.addAllMessages(other.outputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(m); - } else { - outputsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetParametersFieldBuilder().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 outputs_ = - java.util.Collections.emptyList(); - - private void ensureOutputsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - outputs_ = new java.util.ArrayList(outputs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - outputsBuilder_; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsList() { - if (outputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputs_); - } else { - return outputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public int getOutputsCount() { - if (outputsBuilder_ == null) { - return outputs_.size(); - } else { - return outputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.set(index, value); - onChanged(); - } else { - outputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.set(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(value); - onChanged(); - } else { - outputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(index, value); - onChanged(); - } else { - outputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addAllOutputs( - java.lang.Iterable values) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputs_); - onChanged(); - } else { - outputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder clearOutputs() { - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - outputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder removeOutputs(int index) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.remove(index); - onChanged(); - } else { - outputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List - getOutputsOrBuilderList() { - if (outputsBuilder_ != null) { - return outputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(outputs_); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder() { - return internalGetOutputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsBuilderList() { - return internalGetOutputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetOutputsFieldBuilder() { - if (outputsBuilder_ == null) { - outputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - outputs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - outputs_ = null; - } - return outputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamDirectPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectPredictResponse) - private static final com.google.cloud.vertexai.api.StreamDirectPredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectPredictResponse(); - } - - public static com.google.cloud.vertexai.api.StreamDirectPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamDirectPredictResponse 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.vertexai.api.StreamDirectPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java deleted file mode 100644 index faa23a768ccd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamDirectPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.Tensor getOutputs(int index); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - int getOutputsCount(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsOrBuilderList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java deleted file mode 100644 index f59017d8f5d5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
- *
- * The first message must contain
- * [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
- * and
- * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
- * fields and optionally
- * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
- * subsequent messages must contain
- * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
- * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
- * in the subsequent messages have no effect.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectRawPredictRequest} - */ -@com.google.protobuf.Generated -public final class StreamDirectRawPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) - StreamDirectRawPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamDirectRawPredictRequest"); - } - - // Use StreamDirectRawPredictRequest.newBuilder() to construct. - private StreamDirectRawPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamDirectRawPredictRequest() { - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.Builder.class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METHOD_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object methodName_ = ""; - - /** - * - * - *
-   * Optional. Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The methodName. - */ - @java.lang.Override - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - 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(); - methodName_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for methodName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, methodName_); - } - if (!input_.isEmpty()) { - output.writeBytes(3, input_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, methodName_); - } - if (!input_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, input_); - } - 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.vertexai.api.StreamDirectRawPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest other = - (com.google.cloud.vertexai.api.StreamDirectRawPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getMethodName().equals(other.getMethodName())) return false; - if (!getInput().equals(other.getInput())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMethodName().hashCode(); - hash = (37 * hash) + INPUT_FIELD_NUMBER; - hash = (53 * hash) + getInput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest 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.vertexai.api.StreamDirectRawPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest 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.vertexai.api.StreamDirectRawPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamDirectRawPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
-   *
-   * The first message must contain
-   * [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
-   * and
-   * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
-   * fields and optionally
-   * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
-   * subsequent messages must contain
-   * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
-   * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
-   * in the subsequent messages have no effect.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectRawPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) - com.google.cloud.vertexai.api.StreamDirectRawPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest build() { - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest buildPartial() { - com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result = - new com.google.cloud.vertexai.api.StreamDirectRawPredictRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.methodName_ = methodName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.input_ = input_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamDirectRawPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.StreamDirectRawPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectRawPredictRequest other) { - if (other == com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMethodName().isEmpty()) { - methodName_ = other.methodName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getInput().isEmpty()) { - setInput(other.getInput()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - methodName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input_ = input.readBytes(); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object methodName_ = ""; - - /** - * - * - *
-     * Optional. Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The methodName. - */ - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - methodName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for methodName. - */ - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMethodName() { - methodName_ = getDefaultInstance().getMethodName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The input to set. - * @return This builder for chaining. - */ - public Builder setInput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - input_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The prediction input.
-     * 
- * - * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearInput() { - bitField0_ = (bitField0_ & ~0x00000004); - input_ = getDefaultInstance().getInput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) - private static final com.google.cloud.vertexai.api.StreamDirectRawPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectRawPredictRequest(); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamDirectRawPredictRequest 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.vertexai.api.StreamDirectRawPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java deleted file mode 100644 index a98990e9e2e0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamDirectRawPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Optional. Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The methodName. - */ - java.lang.String getMethodName(); - - /** - * - * - *
-   * Optional. Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for methodName. - */ - com.google.protobuf.ByteString getMethodNameBytes(); - - /** - * - * - *
-   * Optional. The prediction input.
-   * 
- * - * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The input. - */ - com.google.protobuf.ByteString getInput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponse.java deleted file mode 100644 index decd47fa1d8d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponse.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectRawPredictResponse} - */ -@com.google.protobuf.Generated -public final class StreamDirectRawPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) - StreamDirectRawPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamDirectRawPredictResponse"); - } - - // Use StreamDirectRawPredictResponse.newBuilder() to construct. - private StreamDirectRawPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamDirectRawPredictResponse() { - output_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.Builder.class); - } - - public static final int OUTPUT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - 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 (!output_.isEmpty()) { - output.writeBytes(1, output_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!output_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, output_); - } - 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.vertexai.api.StreamDirectRawPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse other = - (com.google.cloud.vertexai.api.StreamDirectRawPredictResponse) obj; - - if (!getOutput().equals(other.getOutput())) 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) + OUTPUT_FIELD_NUMBER; - hash = (53 * hash) + getOutput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse 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.vertexai.api.StreamDirectRawPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse 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.vertexai.api.StreamDirectRawPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamDirectRawPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectRawPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) - com.google.cloud.vertexai.api.StreamDirectRawPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - output_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse build() { - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse buildPartial() { - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result = - new com.google.cloud.vertexai.api.StreamDirectRawPredictResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.output_ = output_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamDirectRawPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.StreamDirectRawPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectRawPredictResponse other) { - if (other - == com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.getDefaultInstance()) - return this; - if (!other.getOutput().isEmpty()) { - setOutput(other.getOutput()); - } - 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: - { - output_ = input.readBytes(); - 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.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @param value The output to set. - * @return This builder for chaining. - */ - public Builder setOutput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - output_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - output_ = getDefaultInstance().getOutput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) - private static final com.google.cloud.vertexai.api.StreamDirectRawPredictResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectRawPredictResponse(); - } - - public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamDirectRawPredictResponse 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.vertexai.api.StreamDirectRawPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java deleted file mode 100644 index 2cb1b4bfe937..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamDirectRawPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - com.google.protobuf.ByteString getOutput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java deleted file mode 100644 index e7ceb284a2fb..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java +++ /dev/null @@ -1,910 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamRawPredictRequest} - */ -@com.google.protobuf.Generated -public final class StreamRawPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamRawPredictRequest) - StreamRawPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamRawPredictRequest"); - } - - // Use StreamRawPredictRequest.newBuilder() to construct. - private StreamRawPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamRawPredictRequest() { - endpoint_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamRawPredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HTTP_BODY_FIELD_NUMBER = 2; - private com.google.api.HttpBody httpBody_; - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - @java.lang.Override - public boolean hasHttpBody() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - @java.lang.Override - public com.google.api.HttpBody getHttpBody() { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - */ - @java.lang.Override - public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getHttpBody()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); - } - 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.vertexai.api.StreamRawPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamRawPredictRequest other = - (com.google.cloud.vertexai.api.StreamRawPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (hasHttpBody() != other.hasHttpBody()) return false; - if (hasHttpBody()) { - if (!getHttpBody().equals(other.getHttpBody())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (hasHttpBody()) { - hash = (37 * hash) + HTTP_BODY_FIELD_NUMBER; - hash = (53 * hash) + getHttpBody().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamRawPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamRawPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamRawPredictRequest) - com.google.cloud.vertexai.api.StreamRawPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamRawPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamRawPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetHttpBodyFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - httpBody_ = null; - if (httpBodyBuilder_ != null) { - httpBodyBuilder_.dispose(); - httpBodyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamRawPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamRawPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamRawPredictRequest build() { - com.google.cloud.vertexai.api.StreamRawPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamRawPredictRequest buildPartial() { - com.google.cloud.vertexai.api.StreamRawPredictRequest result = - new com.google.cloud.vertexai.api.StreamRawPredictRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamRawPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamRawPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.StreamRawPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamRawPredictRequest other) { - if (other == com.google.cloud.vertexai.api.StreamRawPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasHttpBody()) { - mergeHttpBody(other.getHttpBody()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetHttpBodyFieldBuilder().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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.api.HttpBody httpBody_; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder> - httpBodyBuilder_; - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - public boolean hasHttpBody() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - public com.google.api.HttpBody getHttpBody() { - if (httpBodyBuilder_ == null) { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } else { - return httpBodyBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder setHttpBody(com.google.api.HttpBody value) { - if (httpBodyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - httpBody_ = value; - } else { - httpBodyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder setHttpBody(com.google.api.HttpBody.Builder builderForValue) { - if (httpBodyBuilder_ == null) { - httpBody_ = builderForValue.build(); - } else { - httpBodyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder mergeHttpBody(com.google.api.HttpBody value) { - if (httpBodyBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && httpBody_ != null - && httpBody_ != com.google.api.HttpBody.getDefaultInstance()) { - getHttpBodyBuilder().mergeFrom(value); - } else { - httpBody_ = value; - } - } else { - httpBodyBuilder_.mergeFrom(value); - } - if (httpBody_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public Builder clearHttpBody() { - bitField0_ = (bitField0_ & ~0x00000002); - httpBody_ = null; - if (httpBodyBuilder_ != null) { - httpBodyBuilder_.dispose(); - httpBodyBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public com.google.api.HttpBody.Builder getHttpBodyBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetHttpBodyFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { - if (httpBodyBuilder_ != null) { - return httpBodyBuilder_.getMessageOrBuilder(); - } else { - return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; - } - } - - /** - * - * - *
-     * The prediction input. Supports HTTP headers and arbitrary data payload.
-     * 
- * - * .google.api.HttpBody http_body = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder> - internalGetHttpBodyFieldBuilder() { - if (httpBodyBuilder_ == null) { - httpBodyBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.api.HttpBody, - com.google.api.HttpBody.Builder, - com.google.api.HttpBodyOrBuilder>(getHttpBody(), getParentForChildren(), isClean()); - httpBody_ = null; - } - return httpBodyBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamRawPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamRawPredictRequest) - private static final com.google.cloud.vertexai.api.StreamRawPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamRawPredictRequest(); - } - - public static com.google.cloud.vertexai.api.StreamRawPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java deleted file mode 100644 index 6fb17a5dfdd8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamRawPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamRawPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return Whether the httpBody field is set. - */ - boolean hasHttpBody(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - * - * @return The httpBody. - */ - com.google.api.HttpBody getHttpBody(); - - /** - * - * - *
-   * The prediction input. Supports HTTP headers and arbitrary data payload.
-   * 
- * - * .google.api.HttpBody http_body = 2; - */ - com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java deleted file mode 100644 index c27af47426c3..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java +++ /dev/null @@ -1,1442 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
- *
- * The first message must contain
- * [endpoint][google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint] field
- * and optionally [input][]. The subsequent messages must contain [input][].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingPredictRequest} - */ -@com.google.protobuf.Generated -public final class StreamingPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamingPredictRequest) - StreamingPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamingPredictRequest"); - } - - // Use StreamingPredictRequest.newBuilder() to construct. - private StreamingPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamingPredictRequest() { - endpoint_ = ""; - inputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingPredictRequest.class, - com.google.cloud.vertexai.api.StreamingPredictRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List inputs_; - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public java.util.List getInputsList() { - return inputs_; - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public java.util.List - getInputsOrBuilderList() { - return inputs_; - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public int getInputsCount() { - return inputs_.size(); - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - return inputs_.get(index); - } - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - return inputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - output.writeMessage(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - for (int i = 0; i < inputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); - } - 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.vertexai.api.StreamingPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamingPredictRequest other = - (com.google.cloud.vertexai.api.StreamingPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getInputsList().equals(other.getInputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - if (getInputsCount() > 0) { - hash = (37 * hash) + INPUTS_FIELD_NUMBER; - hash = (53 * hash) + getInputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest 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.vertexai.api.StreamingPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest 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.vertexai.api.StreamingPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamingPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
-   *
-   * The first message must contain
-   * [endpoint][google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint] field
-   * and optionally [input][]. The subsequent messages must contain [input][].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamingPredictRequest) - com.google.cloud.vertexai.api.StreamingPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingPredictRequest.class, - com.google.cloud.vertexai.api.StreamingPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamingPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetInputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - } else { - inputs_ = null; - inputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamingPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictRequest build() { - com.google.cloud.vertexai.api.StreamingPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictRequest buildPartial() { - com.google.cloud.vertexai.api.StreamingPredictRequest result = - new com.google.cloud.vertexai.api.StreamingPredictRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.StreamingPredictRequest result) { - if (inputsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - inputs_ = java.util.Collections.unmodifiableList(inputs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inputs_ = inputs_; - } else { - result.inputs_ = inputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamingPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamingPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.StreamingPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamingPredictRequest other) { - if (other == com.google.cloud.vertexai.api.StreamingPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (inputsBuilder_ == null) { - if (!other.inputs_.isEmpty()) { - if (inputs_.isEmpty()) { - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInputsIsMutable(); - inputs_.addAll(other.inputs_); - } - onChanged(); - } - } else { - if (!other.inputs_.isEmpty()) { - if (inputsBuilder_.isEmpty()) { - inputsBuilder_.dispose(); - inputsBuilder_ = null; - inputs_ = other.inputs_; - bitField0_ = (bitField0_ & ~0x00000002); - inputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetInputsFieldBuilder() - : null; - } else { - inputsBuilder_.addAllMessages(other.inputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.cloud.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(m); - } else { - inputsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetParametersFieldBuilder().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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List inputs_ = - java.util.Collections.emptyList(); - - private void ensureInputsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inputs_ = new java.util.ArrayList(inputs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - inputsBuilder_; - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List getInputsList() { - if (inputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputs_); - } else { - return inputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public int getInputsCount() { - if (inputsBuilder_ == null) { - return inputs_.size(); - } else { - return inputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor getInputs(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder setInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.set(index, value); - onChanged(); - } else { - inputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder setInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.set(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(value); - onChanged(); - } else { - inputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (inputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputsIsMutable(); - inputs_.add(index, value); - onChanged(); - } else { - inputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addInputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.add(index, builderForValue.build()); - onChanged(); - } else { - inputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder addAllInputs( - java.lang.Iterable values) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_); - onChanged(); - } else { - inputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder clearInputs() { - if (inputsBuilder_ == null) { - inputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - inputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public Builder removeInputs(int index) { - if (inputsBuilder_ == null) { - ensureInputsIsMutable(); - inputs_.remove(index); - onChanged(); - } else { - inputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getInputsBuilder(int index) { - return internalGetInputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { - if (inputsBuilder_ == null) { - return inputs_.get(index); - } else { - return inputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List - getInputsOrBuilderList() { - if (inputsBuilder_ != null) { - return inputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputs_); - } - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder() { - return internalGetInputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder(int index) { - return internalGetInputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - public java.util.List getInputsBuilderList() { - return internalGetInputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetInputsFieldBuilder() { - if (inputsBuilder_ == null) { - inputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - inputs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - inputs_ = null; - } - return inputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000004); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamingPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamingPredictRequest) - private static final com.google.cloud.vertexai.api.StreamingPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamingPredictRequest(); - } - - public static com.google.cloud.vertexai.api.StreamingPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamingPredictRequest 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.vertexai.api.StreamingPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java deleted file mode 100644 index 5179a3cddb3d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamingPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamingPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - java.util.List getInputsList(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - com.google.cloud.vertexai.api.Tensor getInputs(int index); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - int getInputsCount(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - java.util.List getInputsOrBuilderList(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor inputs = 2; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 3; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java deleted file mode 100644 index 2e10ce081a76..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java +++ /dev/null @@ -1,1217 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingPredictResponse} - */ -@com.google.protobuf.Generated -public final class StreamingPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamingPredictResponse) - StreamingPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamingPredictResponse"); - } - - // Use StreamingPredictResponse.newBuilder() to construct. - private StreamingPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamingPredictResponse() { - outputs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingPredictResponse.class, - com.google.cloud.vertexai.api.StreamingPredictResponse.Builder.class); - } - - private int bitField0_; - public static final int OUTPUTS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List outputs_; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List getOutputsList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public java.util.List - getOutputsOrBuilderList() { - return outputs_; - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public int getOutputsCount() { - return outputs_.size(); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - return outputs_.get(index); - } - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - return outputs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Tensor parameters_; - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - @java.lang.Override - public boolean hasParameters() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getParameters() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - - 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 < outputs_.size(); i++) { - output.writeMessage(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getParameters()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < outputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); - } - 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.vertexai.api.StreamingPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamingPredictResponse other = - (com.google.cloud.vertexai.api.StreamingPredictResponse) obj; - - if (!getOutputsList().equals(other.getOutputsList())) return false; - if (hasParameters() != other.hasParameters()) return false; - if (hasParameters()) { - if (!getParameters().equals(other.getParameters())) 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 (getOutputsCount() > 0) { - hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; - hash = (53 * hash) + getOutputsList().hashCode(); - } - if (hasParameters()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParameters().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse 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.vertexai.api.StreamingPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse 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.vertexai.api.StreamingPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamingPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamingPredictResponse) - com.google.cloud.vertexai.api.StreamingPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingPredictResponse.class, - com.google.cloud.vertexai.api.StreamingPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamingPredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetOutputsFieldBuilder(); - internalGetParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - } else { - outputs_ = null; - outputsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamingPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictResponse build() { - com.google.cloud.vertexai.api.StreamingPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingPredictResponse buildPartial() { - com.google.cloud.vertexai.api.StreamingPredictResponse result = - new com.google.cloud.vertexai.api.StreamingPredictResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.StreamingPredictResponse result) { - if (outputsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - outputs_ = java.util.Collections.unmodifiableList(outputs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.outputs_ = outputs_; - } else { - result.outputs_ = outputsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamingPredictResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamingPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.StreamingPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamingPredictResponse other) { - if (other == com.google.cloud.vertexai.api.StreamingPredictResponse.getDefaultInstance()) - return this; - if (outputsBuilder_ == null) { - if (!other.outputs_.isEmpty()) { - if (outputs_.isEmpty()) { - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOutputsIsMutable(); - outputs_.addAll(other.outputs_); - } - onChanged(); - } - } else { - if (!other.outputs_.isEmpty()) { - if (outputsBuilder_.isEmpty()) { - outputsBuilder_.dispose(); - outputsBuilder_ = null; - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000001); - outputsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetOutputsFieldBuilder() - : null; - } else { - outputsBuilder_.addAllMessages(other.outputs_); - } - } - } - if (other.hasParameters()) { - mergeParameters(other.getParameters()); - } - 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.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(m); - } else { - outputsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetParametersFieldBuilder().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 outputs_ = - java.util.Collections.emptyList(); - - private void ensureOutputsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - outputs_ = new java.util.ArrayList(outputs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - outputsBuilder_; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsList() { - if (outputsBuilder_ == null) { - return java.util.Collections.unmodifiableList(outputs_); - } else { - return outputsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public int getOutputsCount() { - if (outputsBuilder_ == null) { - return outputs_.size(); - } else { - return outputsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.set(index, value); - onChanged(); - } else { - outputsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder setOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.set(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(value); - onChanged(); - } else { - outputsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(int index, com.google.cloud.vertexai.api.Tensor value) { - if (outputsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOutputsIsMutable(); - outputs_.add(index, value); - onChanged(); - } else { - outputsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addOutputs( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.add(index, builderForValue.build()); - onChanged(); - } else { - outputsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder addAllOutputs( - java.lang.Iterable values) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputs_); - onChanged(); - } else { - outputsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder clearOutputs() { - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - outputsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public Builder removeOutputs(int index) { - if (outputsBuilder_ == null) { - ensureOutputsIsMutable(); - outputs_.remove(index); - onChanged(); - } else { - outputsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List - getOutputsOrBuilderList() { - if (outputsBuilder_ != null) { - return outputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(outputs_); - } - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder() { - return internalGetOutputsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder(int index) { - return internalGetOutputsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - public java.util.List getOutputsBuilderList() { - return internalGetOutputsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetOutputsFieldBuilder() { - if (outputsBuilder_ == null) { - outputsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - outputs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - outputs_ = null; - } - return outputsBuilder_; - } - - private com.google.cloud.vertexai.api.Tensor parameters_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - public boolean hasParameters() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - public com.google.cloud.vertexai.api.Tensor getParameters() { - if (parametersBuilder_ == null) { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } else { - return parametersBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parameters_ = value; - } else { - parametersBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder setParameters(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (parametersBuilder_ == null) { - parameters_ = builderForValue.build(); - } else { - parametersBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && parameters_ != null - && parameters_ != com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) { - getParametersBuilder().mergeFrom(value); - } else { - parameters_ = value; - } - } else { - parametersBuilder_.mergeFrom(value); - } - if (parameters_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public Builder clearParameters() { - bitField0_ = (bitField0_ & ~0x00000002); - parameters_ = null; - if (parametersBuilder_ != null) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetParametersFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilder(); - } else { - return parameters_ == null - ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() - : parameters_; - } - } - - /** - * - * - *
-     * The parameters that govern the prediction.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - getParameters(), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamingPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamingPredictResponse) - private static final com.google.cloud.vertexai.api.StreamingPredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamingPredictResponse(); - } - - public static com.google.cloud.vertexai.api.StreamingPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamingPredictResponse 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.vertexai.api.StreamingPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java deleted file mode 100644 index 1ca6c72bfa13..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamingPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamingPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.Tensor getOutputs(int index); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - int getOutputsCount(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - java.util.List getOutputsOrBuilderList(); - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return Whether the parameters field is set. - */ - boolean hasParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - * - * @return The parameters. - */ - com.google.cloud.vertexai.api.Tensor getParameters(); - - /** - * - * - *
-   * The parameters that govern the prediction.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor parameters = 2; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java deleted file mode 100644 index 8849bd852f8e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
- *
- * The first message must contain
- * [endpoint][google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint]
- * and
- * [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
- * fields and optionally
- * [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. The
- * subsequent messages must contain
- * [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input].
- * [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
- * in the subsequent messages have no effect.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingRawPredictRequest} - */ -@com.google.protobuf.Generated -public final class StreamingRawPredictRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamingRawPredictRequest) - StreamingRawPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamingRawPredictRequest"); - } - - // Use StreamingRawPredictRequest.newBuilder() to construct. - private StreamingRawPredictRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamingRawPredictRequest() { - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamingRawPredictRequest.Builder.class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METHOD_NAME_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object methodName_ = ""; - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - @java.lang.Override - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - 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(); - methodName_ = s; - return s; - } - } - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * bytes input = 3; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - 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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, methodName_); - } - if (!input_.isEmpty()) { - output.writeBytes(3, input_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, methodName_); - } - if (!input_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, input_); - } - 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.vertexai.api.StreamingRawPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamingRawPredictRequest other = - (com.google.cloud.vertexai.api.StreamingRawPredictRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getMethodName().equals(other.getMethodName())) return false; - if (!getInput().equals(other.getInput())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMethodName().hashCode(); - hash = (37 * hash) + INPUT_FIELD_NUMBER; - hash = (53 * hash) + getInput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest 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.vertexai.api.StreamingRawPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest 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.vertexai.api.StreamingRawPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamingRawPredictRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
-   *
-   * The first message must contain
-   * [endpoint][google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint]
-   * and
-   * [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
-   * fields and optionally
-   * [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. The
-   * subsequent messages must contain
-   * [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input].
-   * [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
-   * in the subsequent messages have no effect.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingRawPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamingRawPredictRequest) - com.google.cloud.vertexai.api.StreamingRawPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingRawPredictRequest.class, - com.google.cloud.vertexai.api.StreamingRawPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamingRawPredictRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - methodName_ = ""; - input_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamingRawPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictRequest build() { - com.google.cloud.vertexai.api.StreamingRawPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictRequest buildPartial() { - com.google.cloud.vertexai.api.StreamingRawPredictRequest result = - new com.google.cloud.vertexai.api.StreamingRawPredictRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamingRawPredictRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.methodName_ = methodName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.input_ = input_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamingRawPredictRequest) { - return mergeFrom((com.google.cloud.vertexai.api.StreamingRawPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamingRawPredictRequest other) { - if (other == com.google.cloud.vertexai.api.StreamingRawPredictRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getMethodName().isEmpty()) { - methodName_ = other.methodName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getInput().isEmpty()) { - setInput(other.getInput()); - } - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - methodName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input_ = input.readBytes(); - 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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint requested to serve the prediction.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object methodName_ = ""; - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - public java.lang.String getMethodName() { - java.lang.Object ref = methodName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - methodName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - public com.google.protobuf.ByteString getMethodNameBytes() { - java.lang.Object ref = methodName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - methodName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @param value The methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearMethodName() { - methodName_ = getDefaultInstance().getMethodName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Fully qualified name of the API method being invoked to perform
-     * predictions.
-     *
-     * Format:
-     * `/namespace.Service/Method/`
-     * Example:
-     * `/tensorflow.serving.PredictionService/Predict`
-     * 
- * - * string method_name = 2; - * - * @param value The bytes for methodName to set. - * @return This builder for chaining. - */ - public Builder setMethodNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - methodName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @return The input. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInput() { - return input_; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @param value The input to set. - * @return This builder for chaining. - */ - public Builder setInput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - input_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction input.
-     * 
- * - * bytes input = 3; - * - * @return This builder for chaining. - */ - public Builder clearInput() { - bitField0_ = (bitField0_ & ~0x00000004); - input_ = getDefaultInstance().getInput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamingRawPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamingRawPredictRequest) - private static final com.google.cloud.vertexai.api.StreamingRawPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamingRawPredictRequest(); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamingRawPredictRequest 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.vertexai.api.StreamingRawPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java deleted file mode 100644 index 01d73bbb747f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamingRawPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamingRawPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint requested to serve the prediction.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The methodName. - */ - java.lang.String getMethodName(); - - /** - * - * - *
-   * Fully qualified name of the API method being invoked to perform
-   * predictions.
-   *
-   * Format:
-   * `/namespace.Service/Method/`
-   * Example:
-   * `/tensorflow.serving.PredictionService/Predict`
-   * 
- * - * string method_name = 2; - * - * @return The bytes for methodName. - */ - com.google.protobuf.ByteString getMethodNameBytes(); - - /** - * - * - *
-   * The prediction input.
-   * 
- * - * bytes input = 3; - * - * @return The input. - */ - com.google.protobuf.ByteString getInput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java deleted file mode 100644 index e926d7fd56a6..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingRawPredictResponse} - */ -@com.google.protobuf.Generated -public final class StreamingRawPredictResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamingRawPredictResponse) - StreamingRawPredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StreamingRawPredictResponse"); - } - - // Use StreamingRawPredictResponse.newBuilder() to construct. - private StreamingRawPredictResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StreamingRawPredictResponse() { - output_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingRawPredictResponse.class, - com.google.cloud.vertexai.api.StreamingRawPredictResponse.Builder.class); - } - - public static final int OUTPUT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - 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 (!output_.isEmpty()) { - output.writeBytes(1, output_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!output_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, output_); - } - 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.vertexai.api.StreamingRawPredictResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StreamingRawPredictResponse other = - (com.google.cloud.vertexai.api.StreamingRawPredictResponse) obj; - - if (!getOutput().equals(other.getOutput())) 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) + OUTPUT_FIELD_NUMBER; - hash = (53 * hash) + getOutput().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse 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.vertexai.api.StreamingRawPredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse 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.vertexai.api.StreamingRawPredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StreamingRawPredictResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StreamingRawPredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamingRawPredictResponse) - com.google.cloud.vertexai.api.StreamingRawPredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StreamingRawPredictResponse.class, - com.google.cloud.vertexai.api.StreamingRawPredictResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StreamingRawPredictResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - output_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.PredictionServiceProto - .internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StreamingRawPredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictResponse build() { - com.google.cloud.vertexai.api.StreamingRawPredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StreamingRawPredictResponse buildPartial() { - com.google.cloud.vertexai.api.StreamingRawPredictResponse result = - new com.google.cloud.vertexai.api.StreamingRawPredictResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.StreamingRawPredictResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.output_ = output_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StreamingRawPredictResponse) { - return mergeFrom((com.google.cloud.vertexai.api.StreamingRawPredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StreamingRawPredictResponse other) { - if (other == com.google.cloud.vertexai.api.StreamingRawPredictResponse.getDefaultInstance()) - return this; - if (!other.getOutput().isEmpty()) { - setOutput(other.getOutput()); - } - 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: - { - output_ = input.readBytes(); - 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.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return The output. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutput() { - return output_; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @param value The output to set. - * @return This builder for chaining. - */ - public Builder setOutput(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - output_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The prediction output.
-     * 
- * - * bytes output = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutput() { - bitField0_ = (bitField0_ & ~0x00000001); - output_ = getDefaultInstance().getOutput(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamingRawPredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamingRawPredictResponse) - private static final com.google.cloud.vertexai.api.StreamingRawPredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamingRawPredictResponse(); - } - - public static com.google.cloud.vertexai.api.StreamingRawPredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StreamingRawPredictResponse 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.vertexai.api.StreamingRawPredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java deleted file mode 100644 index 834f3353075f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/prediction_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StreamingRawPredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamingRawPredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The prediction output.
-   * 
- * - * bytes output = 1; - * - * @return The output. - */ - com.google.protobuf.ByteString getOutput(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java deleted file mode 100644 index e2bfd6f2a196..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java +++ /dev/null @@ -1,696 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A list of string values.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StringArray} - */ -@com.google.protobuf.Generated -public final class StringArray extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StringArray) - StringArrayOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StringArray"); - } - - // Use StringArray.newBuilder() to construct. - private StringArray(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StringArray() { - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_StringArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_StringArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StringArray.class, - com.google.cloud.vertexai.api.StringArray.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList values_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_; - } - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.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 < values_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, values_.getRaw(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 < values_.size(); i++) { - dataSize += computeStringSizeNoTag(values_.getRaw(i)); - } - size += dataSize; - size += 1 * getValuesList().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.vertexai.api.StringArray)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.StringArray other = - (com.google.cloud.vertexai.api.StringArray) 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.vertexai.api.StringArray parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StringArray 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.vertexai.api.StringArray parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StringArray 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.vertexai.api.StringArray parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.StringArray parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StringArray parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StringArray parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StringArray parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StringArray parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.StringArray parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.StringArray parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.StringArray 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.StringArray} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StringArray) - com.google.cloud.vertexai.api.StringArrayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_StringArray_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_StringArray_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.StringArray.class, - com.google.cloud.vertexai.api.StringArray.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.StringArray.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_StringArray_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StringArray getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.StringArray.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StringArray build() { - com.google.cloud.vertexai.api.StringArray result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.StringArray buildPartial() { - com.google.cloud.vertexai.api.StringArray result = - new com.google.cloud.vertexai.api.StringArray(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.StringArray result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - result.values_ = values_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.StringArray) { - return mergeFrom((com.google.cloud.vertexai.api.StringArray) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.StringArray other) { - if (other == com.google.cloud.vertexai.api.StringArray.getDefaultInstance()) return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - 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 10: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureValuesIsMutable(); - values_.add(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 bitField0_; - - private com.google.protobuf.LazyStringArrayList values_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureValuesIsMutable() { - if (!values_.isModifiable()) { - values_ = new com.google.protobuf.LazyStringArrayList(values_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - values_.makeImmutable(); - return values_; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.getByteString(index); - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string 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, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string 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_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of string values.
-     * 
- * - * repeated string values = 1; - * - * @param value The bytes of the values to add. - * @return This builder for chaining. - */ - public Builder addValuesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureValuesIsMutable(); - values_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StringArray) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StringArray) - private static final com.google.cloud.vertexai.api.StringArray DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StringArray(); - } - - public static com.google.cloud.vertexai.api.StringArray getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringArray 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.vertexai.api.StringArray getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java deleted file mode 100644 index a1f8b33820d9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface StringArrayOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StringArray) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - java.lang.String getValues(int index); - - /** - * - * - *
-   * A list of string values.
-   * 
- * - * repeated string values = 1; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - com.google.protobuf.ByteString getValuesBytes(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java deleted file mode 100644 index 5fa108162d27..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java +++ /dev/null @@ -1,725 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * The storage details for TFRecord output content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.TFRecordDestination} - */ -@com.google.protobuf.Generated -public final class TFRecordDestination extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.TFRecordDestination) - TFRecordDestinationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "TFRecordDestination"); - } - - // Use TFRecordDestination.newBuilder() to construct. - private TFRecordDestination(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private TFRecordDestination() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_TFRecordDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.TFRecordDestination.class, - com.google.cloud.vertexai.api.TFRecordDestination.Builder.class); - } - - private int bitField0_; - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GcsDestination gcsDestination_; - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestination getGcsDestination() { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - - 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.writeMessage(1, getGcsDestination()); - } - 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.computeMessageSize(1, getGcsDestination()); - } - 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.vertexai.api.TFRecordDestination)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.TFRecordDestination other = - (com.google.cloud.vertexai.api.TFRecordDestination) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination().equals(other.getGcsDestination())) 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 (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination 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.vertexai.api.TFRecordDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination 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.vertexai.api.TFRecordDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.TFRecordDestination 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * The storage details for TFRecord output content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.TFRecordDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.TFRecordDestination) - com.google.cloud.vertexai.api.TFRecordDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_TFRecordDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.TFRecordDestination.class, - com.google.cloud.vertexai.api.TFRecordDestination.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.TFRecordDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGcsDestinationFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - gcsDestination_ = null; - if (gcsDestinationBuilder_ != null) { - gcsDestinationBuilder_.dispose(); - gcsDestinationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.IoProto - .internal_static_google_cloud_vertexai_v1_TFRecordDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TFRecordDestination getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.TFRecordDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TFRecordDestination build() { - com.google.cloud.vertexai.api.TFRecordDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TFRecordDestination buildPartial() { - com.google.cloud.vertexai.api.TFRecordDestination result = - new com.google.cloud.vertexai.api.TFRecordDestination(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.TFRecordDestination result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.gcsDestination_ = - gcsDestinationBuilder_ == null ? gcsDestination_ : gcsDestinationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.TFRecordDestination) { - return mergeFrom((com.google.cloud.vertexai.api.TFRecordDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.TFRecordDestination other) { - if (other == com.google.cloud.vertexai.api.TFRecordDestination.getDefaultInstance()) - return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - 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( - internalGetGcsDestinationFieldBuilder().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.vertexai.api.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - public com.google.cloud.vertexai.api.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsDestination(com.google.cloud.vertexai.api.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - } else { - gcsDestinationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGcsDestination( - com.google.cloud.vertexai.api.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGcsDestination(com.google.cloud.vertexai.api.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && gcsDestination_ != null - && gcsDestination_ - != com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance()) { - getGcsDestinationBuilder().mergeFrom(value); - } else { - gcsDestination_ = value; - } - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - if (gcsDestination_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGcsDestination() { - bitField0_ = (bitField0_ & ~0x00000001); - gcsDestination_ = null; - if (gcsDestinationBuilder_ != null) { - gcsDestinationBuilder_.dispose(); - gcsDestinationBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsDestination.Builder getGcsDestinationBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGcsDestinationFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null - ? com.google.cloud.vertexai.api.GcsDestination.getDefaultInstance() - : gcsDestination_; - } - } - - /** - * - * - *
-     * Required. Google Cloud Storage location.
-     * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder> - internalGetGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GcsDestination, - com.google.cloud.vertexai.api.GcsDestination.Builder, - com.google.cloud.vertexai.api.GcsDestinationOrBuilder>( - getGcsDestination(), getParentForChildren(), isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.TFRecordDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.TFRecordDestination) - private static final com.google.cloud.vertexai.api.TFRecordDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.TFRecordDestination(); - } - - public static com.google.cloud.vertexai.api.TFRecordDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TFRecordDestination 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.vertexai.api.TFRecordDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java deleted file mode 100644 index a20a26565e68..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/io.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface TFRecordDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.TFRecordDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gcsDestination. - */ - com.google.cloud.vertexai.api.GcsDestination getGcsDestination(); - - /** - * - * - *
-   * Required. Google Cloud Storage location.
-   * 
- * - * - * .google.cloud.vertexai.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java deleted file mode 100644 index e9b12aeea862..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java +++ /dev/null @@ -1,4463 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * A tensor value type.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tensor} - */ -@com.google.protobuf.Generated -public final class Tensor extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Tensor) - TensorOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Tensor"); - } - - // Use Tensor.newBuilder() to construct. - private Tensor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Tensor() { - dtype_ = 0; - shape_ = emptyLongList(); - boolVal_ = emptyBooleanList(); - stringVal_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bytesVal_ = emptyList(com.google.protobuf.ByteString.class); - floatVal_ = emptyFloatList(); - doubleVal_ = emptyDoubleList(); - intVal_ = emptyIntList(); - int64Val_ = emptyLongList(); - uintVal_ = emptyIntList(); - uint64Val_ = emptyLongList(); - listVal_ = java.util.Collections.emptyList(); - tensorVal_ = com.google.protobuf.ByteString.EMPTY; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 12: - return internalGetStructVal(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tensor.class, - com.google.cloud.vertexai.api.Tensor.Builder.class); - } - - /** - * - * - *
-   * Data type of the tensor.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Tensor.DataType} - */ - public enum DataType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Not a legal value for DataType. Used to indicate a DataType field has not
-     * been set.
-     * 
- * - * DATA_TYPE_UNSPECIFIED = 0; - */ - DATA_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Data types that all computation devices are expected to be
-     * capable to support.
-     * 
- * - * BOOL = 1; - */ - BOOL(1), - /** STRING = 2; */ - STRING(2), - /** FLOAT = 3; */ - FLOAT(3), - /** DOUBLE = 4; */ - DOUBLE(4), - /** INT8 = 5; */ - INT8(5), - /** INT16 = 6; */ - INT16(6), - /** INT32 = 7; */ - INT32(7), - /** INT64 = 8; */ - INT64(8), - /** UINT8 = 9; */ - UINT8(9), - /** UINT16 = 10; */ - UINT16(10), - /** UINT32 = 11; */ - UINT32(11), - /** UINT64 = 12; */ - UINT64(12), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DataType"); - } - - /** - * - * - *
-     * Not a legal value for DataType. Used to indicate a DataType field has not
-     * been set.
-     * 
- * - * DATA_TYPE_UNSPECIFIED = 0; - */ - public static final int DATA_TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Data types that all computation devices are expected to be
-     * capable to support.
-     * 
- * - * BOOL = 1; - */ - public static final int BOOL_VALUE = 1; - - /** STRING = 2; */ - public static final int STRING_VALUE = 2; - - /** FLOAT = 3; */ - public static final int FLOAT_VALUE = 3; - - /** DOUBLE = 4; */ - public static final int DOUBLE_VALUE = 4; - - /** INT8 = 5; */ - public static final int INT8_VALUE = 5; - - /** INT16 = 6; */ - public static final int INT16_VALUE = 6; - - /** INT32 = 7; */ - public static final int INT32_VALUE = 7; - - /** INT64 = 8; */ - public static final int INT64_VALUE = 8; - - /** UINT8 = 9; */ - public static final int UINT8_VALUE = 9; - - /** UINT16 = 10; */ - public static final int UINT16_VALUE = 10; - - /** UINT32 = 11; */ - public static final int UINT32_VALUE = 11; - - /** UINT64 = 12; */ - public static final int UINT64_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 DataType 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 DataType forNumber(int value) { - switch (value) { - case 0: - return DATA_TYPE_UNSPECIFIED; - case 1: - return BOOL; - case 2: - return STRING; - case 3: - return FLOAT; - case 4: - return DOUBLE; - case 5: - return INT8; - case 6: - return INT16; - case 7: - return INT32; - case 8: - return INT64; - case 9: - return UINT8; - case 10: - return UINT16; - case 11: - return UINT32; - case 12: - return UINT64; - 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 DataType findValueByNumber(int number) { - return DataType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Tensor.getDescriptor().getEnumTypes().get(0); - } - - private static final DataType[] VALUES = values(); - - public static DataType 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 DataType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Tensor.DataType) - } - - public static final int DTYPE_FIELD_NUMBER = 1; - private int dtype_ = 0; - - /** - * - * - *
-   * The data type of tensor.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The enum numeric value on the wire for dtype. - */ - @java.lang.Override - public int getDtypeValue() { - return dtype_; - } - - /** - * - * - *
-   * The data type of tensor.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The dtype. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor.DataType getDtype() { - com.google.cloud.vertexai.api.Tensor.DataType result = - com.google.cloud.vertexai.api.Tensor.DataType.forNumber(dtype_); - return result == null ? com.google.cloud.vertexai.api.Tensor.DataType.UNRECOGNIZED : result; - } - - public static final int SHAPE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList shape_ = emptyLongList(); - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @return A list containing the shape. - */ - @java.lang.Override - public java.util.List getShapeList() { - return shape_; - } - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @return The count of shape. - */ - public int getShapeCount() { - return shape_.size(); - } - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @param index The index of the element to return. - * @return The shape at the given index. - */ - public long getShape(int index) { - return shape_.getLong(index); - } - - private int shapeMemoizedSerializedSize = -1; - - public static final int BOOL_VAL_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.BooleanList boolVal_ = emptyBooleanList(); - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @return A list containing the boolVal. - */ - @java.lang.Override - public java.util.List getBoolValList() { - return boolVal_; - } - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @return The count of boolVal. - */ - public int getBoolValCount() { - return boolVal_.size(); - } - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @param index The index of the element to return. - * @return The boolVal at the given index. - */ - public boolean getBoolVal(int index) { - return boolVal_.getBoolean(index); - } - - private int boolValMemoizedSerializedSize = -1; - - public static final int STRING_VAL_FIELD_NUMBER = 14; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList stringVal_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @return A list containing the stringVal. - */ - public com.google.protobuf.ProtocolStringList getStringValList() { - return stringVal_; - } - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @return The count of stringVal. - */ - public int getStringValCount() { - return stringVal_.size(); - } - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @param index The index of the element to return. - * @return The stringVal at the given index. - */ - public java.lang.String getStringVal(int index) { - return stringVal_.get(index); - } - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @param index The index of the value to return. - * @return The bytes of the stringVal at the given index. - */ - public com.google.protobuf.ByteString getStringValBytes(int index) { - return stringVal_.getByteString(index); - } - - public static final int BYTES_VAL_FIELD_NUMBER = 15; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.ProtobufList bytesVal_ = - emptyList(com.google.protobuf.ByteString.class); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @return A list containing the bytesVal. - */ - @java.lang.Override - public java.util.List getBytesValList() { - return bytesVal_; - } - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @return The count of bytesVal. - */ - public int getBytesValCount() { - return bytesVal_.size(); - } - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @param index The index of the element to return. - * @return The bytesVal at the given index. - */ - public com.google.protobuf.ByteString getBytesVal(int index) { - return bytesVal_.get(index); - } - - public static final int FLOAT_VAL_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList floatVal_ = emptyFloatList(); - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @return A list containing the floatVal. - */ - @java.lang.Override - public java.util.List getFloatValList() { - return floatVal_; - } - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @return The count of floatVal. - */ - public int getFloatValCount() { - return floatVal_.size(); - } - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @param index The index of the element to return. - * @return The floatVal at the given index. - */ - public float getFloatVal(int index) { - return floatVal_.getFloat(index); - } - - private int floatValMemoizedSerializedSize = -1; - - public static final int DOUBLE_VAL_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList doubleVal_ = emptyDoubleList(); - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @return A list containing the doubleVal. - */ - @java.lang.Override - public java.util.List getDoubleValList() { - return doubleVal_; - } - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @return The count of doubleVal. - */ - public int getDoubleValCount() { - return doubleVal_.size(); - } - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @param index The index of the element to return. - * @return The doubleVal at the given index. - */ - public double getDoubleVal(int index) { - return doubleVal_.getDouble(index); - } - - private int doubleValMemoizedSerializedSize = -1; - - public static final int INT_VAL_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList intVal_ = emptyIntList(); - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @return A list containing the intVal. - */ - @java.lang.Override - public java.util.List getIntValList() { - return intVal_; - } - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @return The count of intVal. - */ - public int getIntValCount() { - return intVal_.size(); - } - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @param index The index of the element to return. - * @return The intVal at the given index. - */ - public int getIntVal(int index) { - return intVal_.getInt(index); - } - - private int intValMemoizedSerializedSize = -1; - - public static final int INT64_VAL_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList int64Val_ = emptyLongList(); - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @return A list containing the int64Val. - */ - @java.lang.Override - public java.util.List getInt64ValList() { - return int64Val_; - } - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @return The count of int64Val. - */ - public int getInt64ValCount() { - return int64Val_.size(); - } - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @param index The index of the element to return. - * @return The int64Val at the given index. - */ - public long getInt64Val(int index) { - return int64Val_.getLong(index); - } - - private int int64ValMemoizedSerializedSize = -1; - - public static final int UINT_VAL_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList uintVal_ = emptyIntList(); - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @return A list containing the uintVal. - */ - @java.lang.Override - public java.util.List getUintValList() { - return uintVal_; - } - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @return The count of uintVal. - */ - public int getUintValCount() { - return uintVal_.size(); - } - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @param index The index of the element to return. - * @return The uintVal at the given index. - */ - public int getUintVal(int index) { - return uintVal_.getInt(index); - } - - private int uintValMemoizedSerializedSize = -1; - - public static final int UINT64_VAL_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList uint64Val_ = emptyLongList(); - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @return A list containing the uint64Val. - */ - @java.lang.Override - public java.util.List getUint64ValList() { - return uint64Val_; - } - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @return The count of uint64Val. - */ - public int getUint64ValCount() { - return uint64Val_.size(); - } - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @param index The index of the element to return. - * @return The uint64Val at the given index. - */ - public long getUint64Val(int index) { - return uint64Val_.getLong(index); - } - - private int uint64ValMemoizedSerializedSize = -1; - - public static final int LIST_VAL_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private java.util.List listVal_; - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - @java.lang.Override - public java.util.List getListValList() { - return listVal_; - } - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - @java.lang.Override - public java.util.List - getListValOrBuilderList() { - return listVal_; - } - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - @java.lang.Override - public int getListValCount() { - return listVal_.size(); - } - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getListVal(int index) { - return listVal_.get(index); - } - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.TensorOrBuilder getListValOrBuilder(int index) { - return listVal_.get(index); - } - - public static final int STRUCT_VAL_FIELD_NUMBER = 12; - - private static final class StructValDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.vertexai.api.Tensor> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField - structVal_; - - private com.google.protobuf.MapField - internalGetStructVal() { - if (structVal_ == null) { - return com.google.protobuf.MapField.emptyMapField(StructValDefaultEntryHolder.defaultEntry); - } - return structVal_; - } - - public int getStructValCount() { - return internalGetStructVal().getMap().size(); - } - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public boolean containsStructVal(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetStructVal().getMap().containsKey(key); - } - - /** Use {@link #getStructValMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getStructVal() { - return getStructValMap(); - } - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public java.util.Map getStructValMap() { - return internalGetStructVal().getMap(); - } - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Tensor getStructValOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Tensor defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetStructVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getStructValOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetStructVal().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int TENSOR_VAL_FIELD_NUMBER = 13; - private com.google.protobuf.ByteString tensorVal_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-   * Serialized raw tensor content.
-   * 
- * - * bytes tensor_val = 13; - * - * @return The tensorVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTensorVal() { - return tensorVal_; - } - - 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 (dtype_ != com.google.cloud.vertexai.api.Tensor.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, dtype_); - } - if (getShapeList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(shapeMemoizedSerializedSize); - } - for (int i = 0; i < shape_.size(); i++) { - output.writeInt64NoTag(shape_.getLong(i)); - } - if (getBoolValList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(boolValMemoizedSerializedSize); - } - for (int i = 0; i < boolVal_.size(); i++) { - output.writeBoolNoTag(boolVal_.getBoolean(i)); - } - if (getFloatValList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(floatValMemoizedSerializedSize); - } - for (int i = 0; i < floatVal_.size(); i++) { - output.writeFloatNoTag(floatVal_.getFloat(i)); - } - if (getDoubleValList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(doubleValMemoizedSerializedSize); - } - for (int i = 0; i < doubleVal_.size(); i++) { - output.writeDoubleNoTag(doubleVal_.getDouble(i)); - } - if (getIntValList().size() > 0) { - output.writeUInt32NoTag(58); - output.writeUInt32NoTag(intValMemoizedSerializedSize); - } - for (int i = 0; i < intVal_.size(); i++) { - output.writeInt32NoTag(intVal_.getInt(i)); - } - if (getInt64ValList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(int64ValMemoizedSerializedSize); - } - for (int i = 0; i < int64Val_.size(); i++) { - output.writeInt64NoTag(int64Val_.getLong(i)); - } - if (getUintValList().size() > 0) { - output.writeUInt32NoTag(74); - output.writeUInt32NoTag(uintValMemoizedSerializedSize); - } - for (int i = 0; i < uintVal_.size(); i++) { - output.writeUInt32NoTag(uintVal_.getInt(i)); - } - if (getUint64ValList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(uint64ValMemoizedSerializedSize); - } - for (int i = 0; i < uint64Val_.size(); i++) { - output.writeUInt64NoTag(uint64Val_.getLong(i)); - } - for (int i = 0; i < listVal_.size(); i++) { - output.writeMessage(11, listVal_.get(i)); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetStructVal(), StructValDefaultEntryHolder.defaultEntry, 12); - if (!tensorVal_.isEmpty()) { - output.writeBytes(13, tensorVal_); - } - for (int i = 0; i < stringVal_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 14, stringVal_.getRaw(i)); - } - for (int i = 0; i < bytesVal_.size(); i++) { - output.writeBytes(15, bytesVal_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dtype_ != com.google.cloud.vertexai.api.Tensor.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dtype_); - } - { - int dataSize = 0; - for (int i = 0; i < shape_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(shape_.getLong(i)); - } - size += dataSize; - if (!getShapeList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - shapeMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 1 * getBoolValList().size(); - size += dataSize; - if (!getBoolValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - boolValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * getFloatValList().size(); - size += dataSize; - if (!getFloatValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - floatValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * getDoubleValList().size(); - size += dataSize; - if (!getDoubleValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - doubleValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < intVal_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(intVal_.getInt(i)); - } - size += dataSize; - if (!getIntValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - intValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < int64Val_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(int64Val_.getLong(i)); - } - size += dataSize; - if (!getInt64ValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - int64ValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < uintVal_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(uintVal_.getInt(i)); - } - size += dataSize; - if (!getUintValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - uintValMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < uint64Val_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeUInt64SizeNoTag(uint64Val_.getLong(i)); - } - size += dataSize; - if (!getUint64ValList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - uint64ValMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < listVal_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, listVal_.get(i)); - } - for (java.util.Map.Entry entry : - internalGetStructVal().getMap().entrySet()) { - com.google.protobuf.MapEntry - structVal__ = - StructValDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, structVal__); - } - if (!tensorVal_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(13, tensorVal_); - } - { - int dataSize = 0; - for (int i = 0; i < stringVal_.size(); i++) { - dataSize += computeStringSizeNoTag(stringVal_.getRaw(i)); - } - size += dataSize; - size += 1 * getStringValList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < bytesVal_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(bytesVal_.get(i)); - } - size += dataSize; - size += 1 * getBytesValList().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.vertexai.api.Tensor)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Tensor other = (com.google.cloud.vertexai.api.Tensor) obj; - - if (dtype_ != other.dtype_) return false; - if (!getShapeList().equals(other.getShapeList())) return false; - if (!getBoolValList().equals(other.getBoolValList())) return false; - if (!getStringValList().equals(other.getStringValList())) return false; - if (!getBytesValList().equals(other.getBytesValList())) return false; - if (!getFloatValList().equals(other.getFloatValList())) return false; - if (!getDoubleValList().equals(other.getDoubleValList())) return false; - if (!getIntValList().equals(other.getIntValList())) return false; - if (!getInt64ValList().equals(other.getInt64ValList())) return false; - if (!getUintValList().equals(other.getUintValList())) return false; - if (!getUint64ValList().equals(other.getUint64ValList())) return false; - if (!getListValList().equals(other.getListValList())) return false; - if (!internalGetStructVal().equals(other.internalGetStructVal())) return false; - if (!getTensorVal().equals(other.getTensorVal())) 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) + DTYPE_FIELD_NUMBER; - hash = (53 * hash) + dtype_; - if (getShapeCount() > 0) { - hash = (37 * hash) + SHAPE_FIELD_NUMBER; - hash = (53 * hash) + getShapeList().hashCode(); - } - if (getBoolValCount() > 0) { - hash = (37 * hash) + BOOL_VAL_FIELD_NUMBER; - hash = (53 * hash) + getBoolValList().hashCode(); - } - if (getStringValCount() > 0) { - hash = (37 * hash) + STRING_VAL_FIELD_NUMBER; - hash = (53 * hash) + getStringValList().hashCode(); - } - if (getBytesValCount() > 0) { - hash = (37 * hash) + BYTES_VAL_FIELD_NUMBER; - hash = (53 * hash) + getBytesValList().hashCode(); - } - if (getFloatValCount() > 0) { - hash = (37 * hash) + FLOAT_VAL_FIELD_NUMBER; - hash = (53 * hash) + getFloatValList().hashCode(); - } - if (getDoubleValCount() > 0) { - hash = (37 * hash) + DOUBLE_VAL_FIELD_NUMBER; - hash = (53 * hash) + getDoubleValList().hashCode(); - } - if (getIntValCount() > 0) { - hash = (37 * hash) + INT_VAL_FIELD_NUMBER; - hash = (53 * hash) + getIntValList().hashCode(); - } - if (getInt64ValCount() > 0) { - hash = (37 * hash) + INT64_VAL_FIELD_NUMBER; - hash = (53 * hash) + getInt64ValList().hashCode(); - } - if (getUintValCount() > 0) { - hash = (37 * hash) + UINT_VAL_FIELD_NUMBER; - hash = (53 * hash) + getUintValList().hashCode(); - } - if (getUint64ValCount() > 0) { - hash = (37 * hash) + UINT64_VAL_FIELD_NUMBER; - hash = (53 * hash) + getUint64ValList().hashCode(); - } - if (getListValCount() > 0) { - hash = (37 * hash) + LIST_VAL_FIELD_NUMBER; - hash = (53 * hash) + getListValList().hashCode(); - } - if (!internalGetStructVal().getMap().isEmpty()) { - hash = (37 * hash) + STRUCT_VAL_FIELD_NUMBER; - hash = (53 * hash) + internalGetStructVal().hashCode(); - } - hash = (37 * hash) + TENSOR_VAL_FIELD_NUMBER; - hash = (53 * hash) + getTensorVal().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tensor 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.vertexai.api.Tensor parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tensor 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.vertexai.api.Tensor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tensor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tensor parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tensor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Tensor 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * A tensor value type.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tensor} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Tensor) - com.google.cloud.vertexai.api.TensorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 12: - return internalGetStructVal(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 12: - return internalGetMutableStructVal(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tensor.class, - com.google.cloud.vertexai.api.Tensor.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Tensor.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dtype_ = 0; - shape_ = emptyLongList(); - boolVal_ = emptyBooleanList(); - stringVal_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bytesVal_ = emptyList(com.google.protobuf.ByteString.class); - floatVal_ = emptyFloatList(); - doubleVal_ = emptyDoubleList(); - intVal_ = emptyIntList(); - int64Val_ = emptyLongList(); - uintVal_ = emptyIntList(); - uint64Val_ = emptyLongList(); - if (listValBuilder_ == null) { - listVal_ = java.util.Collections.emptyList(); - } else { - listVal_ = null; - listValBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000800); - internalGetMutableStructVal().clear(); - tensorVal_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.TypesProto - .internal_static_google_cloud_vertexai_v1_Tensor_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Tensor.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor build() { - com.google.cloud.vertexai.api.Tensor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor buildPartial() { - com.google.cloud.vertexai.api.Tensor result = new com.google.cloud.vertexai.api.Tensor(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Tensor result) { - if (listValBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0)) { - listVal_ = java.util.Collections.unmodifiableList(listVal_); - bitField0_ = (bitField0_ & ~0x00000800); - } - result.listVal_ = listVal_; - } else { - result.listVal_ = listValBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Tensor result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dtype_ = dtype_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - shape_.makeImmutable(); - result.shape_ = shape_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - boolVal_.makeImmutable(); - result.boolVal_ = boolVal_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - stringVal_.makeImmutable(); - result.stringVal_ = stringVal_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - bytesVal_.makeImmutable(); - result.bytesVal_ = bytesVal_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - floatVal_.makeImmutable(); - result.floatVal_ = floatVal_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - doubleVal_.makeImmutable(); - result.doubleVal_ = doubleVal_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - intVal_.makeImmutable(); - result.intVal_ = intVal_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - int64Val_.makeImmutable(); - result.int64Val_ = int64Val_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - uintVal_.makeImmutable(); - result.uintVal_ = uintVal_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - uint64Val_.makeImmutable(); - result.uint64Val_ = uint64Val_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.structVal_ = internalGetStructVal().build(StructValDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.tensorVal_ = tensorVal_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Tensor) { - return mergeFrom((com.google.cloud.vertexai.api.Tensor) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { - if (other == com.google.cloud.vertexai.api.Tensor.getDefaultInstance()) return this; - if (other.dtype_ != 0) { - setDtypeValue(other.getDtypeValue()); - } - if (!other.shape_.isEmpty()) { - if (shape_.isEmpty()) { - shape_ = other.shape_; - shape_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureShapeIsMutable(); - shape_.addAll(other.shape_); - } - onChanged(); - } - if (!other.boolVal_.isEmpty()) { - if (boolVal_.isEmpty()) { - boolVal_ = other.boolVal_; - boolVal_.makeImmutable(); - bitField0_ |= 0x00000004; - } else { - ensureBoolValIsMutable(); - boolVal_.addAll(other.boolVal_); - } - onChanged(); - } - if (!other.stringVal_.isEmpty()) { - if (stringVal_.isEmpty()) { - stringVal_ = other.stringVal_; - bitField0_ |= 0x00000008; - } else { - ensureStringValIsMutable(); - stringVal_.addAll(other.stringVal_); - } - onChanged(); - } - if (!other.bytesVal_.isEmpty()) { - if (bytesVal_.isEmpty()) { - bytesVal_ = other.bytesVal_; - bytesVal_.makeImmutable(); - bitField0_ |= 0x00000010; - } else { - ensureBytesValIsMutable(); - bytesVal_.addAll(other.bytesVal_); - } - onChanged(); - } - if (!other.floatVal_.isEmpty()) { - if (floatVal_.isEmpty()) { - floatVal_ = other.floatVal_; - floatVal_.makeImmutable(); - bitField0_ |= 0x00000020; - } else { - ensureFloatValIsMutable(); - floatVal_.addAll(other.floatVal_); - } - onChanged(); - } - if (!other.doubleVal_.isEmpty()) { - if (doubleVal_.isEmpty()) { - doubleVal_ = other.doubleVal_; - doubleVal_.makeImmutable(); - bitField0_ |= 0x00000040; - } else { - ensureDoubleValIsMutable(); - doubleVal_.addAll(other.doubleVal_); - } - onChanged(); - } - if (!other.intVal_.isEmpty()) { - if (intVal_.isEmpty()) { - intVal_ = other.intVal_; - intVal_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureIntValIsMutable(); - intVal_.addAll(other.intVal_); - } - onChanged(); - } - if (!other.int64Val_.isEmpty()) { - if (int64Val_.isEmpty()) { - int64Val_ = other.int64Val_; - int64Val_.makeImmutable(); - bitField0_ |= 0x00000100; - } else { - ensureInt64ValIsMutable(); - int64Val_.addAll(other.int64Val_); - } - onChanged(); - } - if (!other.uintVal_.isEmpty()) { - if (uintVal_.isEmpty()) { - uintVal_ = other.uintVal_; - uintVal_.makeImmutable(); - bitField0_ |= 0x00000200; - } else { - ensureUintValIsMutable(); - uintVal_.addAll(other.uintVal_); - } - onChanged(); - } - if (!other.uint64Val_.isEmpty()) { - if (uint64Val_.isEmpty()) { - uint64Val_ = other.uint64Val_; - uint64Val_.makeImmutable(); - bitField0_ |= 0x00000400; - } else { - ensureUint64ValIsMutable(); - uint64Val_.addAll(other.uint64Val_); - } - onChanged(); - } - if (listValBuilder_ == null) { - if (!other.listVal_.isEmpty()) { - if (listVal_.isEmpty()) { - listVal_ = other.listVal_; - bitField0_ = (bitField0_ & ~0x00000800); - } else { - ensureListValIsMutable(); - listVal_.addAll(other.listVal_); - } - onChanged(); - } - } else { - if (!other.listVal_.isEmpty()) { - if (listValBuilder_.isEmpty()) { - listValBuilder_.dispose(); - listValBuilder_ = null; - listVal_ = other.listVal_; - bitField0_ = (bitField0_ & ~0x00000800); - listValBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetListValFieldBuilder() - : null; - } else { - listValBuilder_.addAllMessages(other.listVal_); - } - } - } - internalGetMutableStructVal().mergeFrom(other.internalGetStructVal()); - bitField0_ |= 0x00001000; - if (!other.getTensorVal().isEmpty()) { - setTensorVal(other.getTensorVal()); - } - 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: - { - dtype_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - long v = input.readInt64(); - ensureShapeIsMutable(); - shape_.addLong(v); - break; - } // case 16 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureShapeIsMutable(); - while (input.getBytesUntilLimit() > 0) { - shape_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 18 - case 24: - { - boolean v = input.readBool(); - ensureBoolValIsMutable(); - boolVal_.addBoolean(v); - break; - } // case 24 - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureBoolValIsMutable(alloc / 1); - while (input.getBytesUntilLimit() > 0) { - boolVal_.addBoolean(input.readBool()); - } - input.popLimit(limit); - break; - } // case 26 - case 45: - { - float v = input.readFloat(); - ensureFloatValIsMutable(); - floatVal_.addFloat(v); - break; - } // case 45 - case 42: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureFloatValIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - floatVal_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 42 - case 49: - { - double v = input.readDouble(); - ensureDoubleValIsMutable(); - doubleVal_.addDouble(v); - break; - } // case 49 - case 50: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureDoubleValIsMutable(alloc / 8); - while (input.getBytesUntilLimit() > 0) { - doubleVal_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: - { - int v = input.readInt32(); - ensureIntValIsMutable(); - intVal_.addInt(v); - break; - } // case 56 - case 58: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureIntValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - intVal_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: - { - long v = input.readInt64(); - ensureInt64ValIsMutable(); - int64Val_.addLong(v); - break; - } // case 64 - case 66: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureInt64ValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - int64Val_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 66 - case 72: - { - int v = input.readUInt32(); - ensureUintValIsMutable(); - uintVal_.addInt(v); - break; - } // case 72 - case 74: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureUintValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - uintVal_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 74 - case 80: - { - long v = input.readUInt64(); - ensureUint64ValIsMutable(); - uint64Val_.addLong(v); - break; - } // case 80 - case 82: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureUint64ValIsMutable(); - while (input.getBytesUntilLimit() > 0) { - uint64Val_.addLong(input.readUInt64()); - } - input.popLimit(limit); - break; - } // case 82 - case 90: - { - com.google.cloud.vertexai.api.Tensor m = - input.readMessage( - com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); - if (listValBuilder_ == null) { - ensureListValIsMutable(); - listVal_.add(m); - } else { - listValBuilder_.addMessage(m); - } - break; - } // case 90 - case 98: - { - com.google.protobuf.MapEntry - structVal__ = - input.readMessage( - StructValDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableStructVal() - .ensureBuilderMap() - .put(structVal__.getKey(), structVal__.getValue()); - bitField0_ |= 0x00001000; - break; - } // case 98 - case 106: - { - tensorVal_ = input.readBytes(); - bitField0_ |= 0x00002000; - break; - } // case 106 - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureStringValIsMutable(); - stringVal_.add(s); - break; - } // case 114 - case 122: - { - com.google.protobuf.ByteString v = input.readBytes(); - ensureBytesValIsMutable(); - bytesVal_.add(v); - break; - } // case 122 - 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 dtype_ = 0; - - /** - * - * - *
-     * The data type of tensor.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The enum numeric value on the wire for dtype. - */ - @java.lang.Override - public int getDtypeValue() { - return dtype_; - } - - /** - * - * - *
-     * The data type of tensor.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @param value The enum numeric value on the wire for dtype to set. - * @return This builder for chaining. - */ - public Builder setDtypeValue(int value) { - dtype_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The data type of tensor.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The dtype. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor.DataType getDtype() { - com.google.cloud.vertexai.api.Tensor.DataType result = - com.google.cloud.vertexai.api.Tensor.DataType.forNumber(dtype_); - return result == null ? com.google.cloud.vertexai.api.Tensor.DataType.UNRECOGNIZED : result; - } - - /** - * - * - *
-     * The data type of tensor.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @param value The dtype to set. - * @return This builder for chaining. - */ - public Builder setDtype(com.google.cloud.vertexai.api.Tensor.DataType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - dtype_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * The data type of tensor.
-     * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return This builder for chaining. - */ - public Builder clearDtype() { - bitField0_ = (bitField0_ & ~0x00000001); - dtype_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList shape_ = emptyLongList(); - - private void ensureShapeIsMutable() { - if (!shape_.isModifiable()) { - shape_ = makeMutableCopy(shape_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @return A list containing the shape. - */ - public java.util.List getShapeList() { - shape_.makeImmutable(); - return shape_; - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @return The count of shape. - */ - public int getShapeCount() { - return shape_.size(); - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @param index The index of the element to return. - * @return The shape at the given index. - */ - public long getShape(int index) { - return shape_.getLong(index); - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @param index The index to set the value at. - * @param value The shape to set. - * @return This builder for chaining. - */ - public Builder setShape(int index, long value) { - - ensureShapeIsMutable(); - shape_.setLong(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @param value The shape to add. - * @return This builder for chaining. - */ - public Builder addShape(long value) { - - ensureShapeIsMutable(); - shape_.addLong(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @param values The shape to add. - * @return This builder for chaining. - */ - public Builder addAllShape(java.lang.Iterable values) { - ensureShapeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shape_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Shape of the tensor.
-     * 
- * - * repeated int64 shape = 2; - * - * @return This builder for chaining. - */ - public Builder clearShape() { - shape_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.BooleanList boolVal_ = emptyBooleanList(); - - private void ensureBoolValIsMutable() { - if (!boolVal_.isModifiable()) { - boolVal_ = makeMutableCopy(boolVal_); - } - bitField0_ |= 0x00000004; - } - - private void ensureBoolValIsMutable(int capacity) { - if (!boolVal_.isModifiable()) { - boolVal_ = makeMutableCopy(boolVal_, capacity); - } - bitField0_ |= 0x00000004; - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @return A list containing the boolVal. - */ - public java.util.List getBoolValList() { - boolVal_.makeImmutable(); - return boolVal_; - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @return The count of boolVal. - */ - public int getBoolValCount() { - return boolVal_.size(); - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @param index The index of the element to return. - * @return The boolVal at the given index. - */ - public boolean getBoolVal(int index) { - return boolVal_.getBoolean(index); - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @param index The index to set the value at. - * @param value The boolVal to set. - * @return This builder for chaining. - */ - public Builder setBoolVal(int index, boolean value) { - - ensureBoolValIsMutable(); - boolVal_.setBoolean(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @param value The boolVal to add. - * @return This builder for chaining. - */ - public Builder addBoolVal(boolean value) { - - ensureBoolValIsMutable(); - boolVal_.addBoolean(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @param values The boolVal to add. - * @return This builder for chaining. - */ - public Builder addAllBoolVal(java.lang.Iterable values) { - ensureBoolValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boolVal_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Type specific representations that make it easy to create tensor protos in
-     * all languages.  Only the representation corresponding to "dtype" can
-     * be set.  The values hold the flattened representation of the tensor in
-     * row major order.
-     *
-     * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-     * 
- * - * repeated bool bool_val = 3; - * - * @return This builder for chaining. - */ - public Builder clearBoolVal() { - boolVal_ = emptyBooleanList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList stringVal_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureStringValIsMutable() { - if (!stringVal_.isModifiable()) { - stringVal_ = new com.google.protobuf.LazyStringArrayList(stringVal_); - } - bitField0_ |= 0x00000008; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @return A list containing the stringVal. - */ - public com.google.protobuf.ProtocolStringList getStringValList() { - stringVal_.makeImmutable(); - return stringVal_; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @return The count of stringVal. - */ - public int getStringValCount() { - return stringVal_.size(); - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param index The index of the element to return. - * @return The stringVal at the given index. - */ - public java.lang.String getStringVal(int index) { - return stringVal_.get(index); - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param index The index of the value to return. - * @return The bytes of the stringVal at the given index. - */ - public com.google.protobuf.ByteString getStringValBytes(int index) { - return stringVal_.getByteString(index); - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param index The index to set the value at. - * @param value The stringVal to set. - * @return This builder for chaining. - */ - public Builder setStringVal(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStringValIsMutable(); - stringVal_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param value The stringVal to add. - * @return This builder for chaining. - */ - public Builder addStringVal(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStringValIsMutable(); - stringVal_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param values The stringVal to add. - * @return This builder for chaining. - */ - public Builder addAllStringVal(java.lang.Iterable values) { - ensureStringValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stringVal_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @return This builder for chaining. - */ - public Builder clearStringVal() { - stringVal_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated string string_val = 14; - * - * @param value The bytes of the stringVal to add. - * @return This builder for chaining. - */ - public Builder addStringValBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureStringValIsMutable(); - stringVal_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.ProtobufList bytesVal_ = - emptyList(com.google.protobuf.ByteString.class); - - private void ensureBytesValIsMutable() { - if (!bytesVal_.isModifiable()) { - bytesVal_ = makeMutableCopy(bytesVal_); - } - bitField0_ |= 0x00000010; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @return A list containing the bytesVal. - */ - public java.util.List getBytesValList() { - bytesVal_.makeImmutable(); - return bytesVal_; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @return The count of bytesVal. - */ - public int getBytesValCount() { - return bytesVal_.size(); - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @param index The index of the element to return. - * @return The bytesVal at the given index. - */ - public com.google.protobuf.ByteString getBytesVal(int index) { - return bytesVal_.get(index); - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @param index The index to set the value at. - * @param value The bytesVal to set. - * @return This builder for chaining. - */ - public Builder setBytesVal(int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBytesValIsMutable(); - bytesVal_.set(index, value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @param value The bytesVal to add. - * @return This builder for chaining. - */ - public Builder addBytesVal(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBytesValIsMutable(); - bytesVal_.add(value); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @param values The bytesVal to add. - * @return This builder for chaining. - */ - public Builder addAllBytesVal( - java.lang.Iterable values) { - ensureBytesValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bytesVal_); - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-     * 
- * - * repeated bytes bytes_val = 15; - * - * @return This builder for chaining. - */ - public Builder clearBytesVal() { - bytesVal_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.FloatList floatVal_ = emptyFloatList(); - - private void ensureFloatValIsMutable() { - if (!floatVal_.isModifiable()) { - floatVal_ = makeMutableCopy(floatVal_); - } - bitField0_ |= 0x00000020; - } - - private void ensureFloatValIsMutable(int capacity) { - if (!floatVal_.isModifiable()) { - floatVal_ = makeMutableCopy(floatVal_, capacity); - } - bitField0_ |= 0x00000020; - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @return A list containing the floatVal. - */ - public java.util.List getFloatValList() { - floatVal_.makeImmutable(); - return floatVal_; - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @return The count of floatVal. - */ - public int getFloatValCount() { - return floatVal_.size(); - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @param index The index of the element to return. - * @return The floatVal at the given index. - */ - public float getFloatVal(int index) { - return floatVal_.getFloat(index); - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @param index The index to set the value at. - * @param value The floatVal to set. - * @return This builder for chaining. - */ - public Builder setFloatVal(int index, float value) { - - ensureFloatValIsMutable(); - floatVal_.setFloat(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @param value The floatVal to add. - * @return This builder for chaining. - */ - public Builder addFloatVal(float value) { - - ensureFloatValIsMutable(); - floatVal_.addFloat(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @param values The floatVal to add. - * @return This builder for chaining. - */ - public Builder addAllFloatVal(java.lang.Iterable values) { - ensureFloatValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, floatVal_); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-     * 
- * - * repeated float float_val = 5; - * - * @return This builder for chaining. - */ - public Builder clearFloatVal() { - floatVal_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.DoubleList doubleVal_ = emptyDoubleList(); - - private void ensureDoubleValIsMutable() { - if (!doubleVal_.isModifiable()) { - doubleVal_ = makeMutableCopy(doubleVal_); - } - bitField0_ |= 0x00000040; - } - - private void ensureDoubleValIsMutable(int capacity) { - if (!doubleVal_.isModifiable()) { - doubleVal_ = makeMutableCopy(doubleVal_, capacity); - } - bitField0_ |= 0x00000040; - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @return A list containing the doubleVal. - */ - public java.util.List getDoubleValList() { - doubleVal_.makeImmutable(); - return doubleVal_; - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @return The count of doubleVal. - */ - public int getDoubleValCount() { - return doubleVal_.size(); - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @param index The index of the element to return. - * @return The doubleVal at the given index. - */ - public double getDoubleVal(int index) { - return doubleVal_.getDouble(index); - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @param index The index to set the value at. - * @param value The doubleVal to set. - * @return This builder for chaining. - */ - public Builder setDoubleVal(int index, double value) { - - ensureDoubleValIsMutable(); - doubleVal_.setDouble(index, value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @param value The doubleVal to add. - * @return This builder for chaining. - */ - public Builder addDoubleVal(double value) { - - ensureDoubleValIsMutable(); - doubleVal_.addDouble(value); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @param values The doubleVal to add. - * @return This builder for chaining. - */ - public Builder addAllDoubleVal(java.lang.Iterable values) { - ensureDoubleValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, doubleVal_); - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-     * 
- * - * repeated double double_val = 6; - * - * @return This builder for chaining. - */ - public Builder clearDoubleVal() { - doubleVal_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList intVal_ = emptyIntList(); - - private void ensureIntValIsMutable() { - if (!intVal_.isModifiable()) { - intVal_ = makeMutableCopy(intVal_); - } - bitField0_ |= 0x00000080; - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @return A list containing the intVal. - */ - public java.util.List getIntValList() { - intVal_.makeImmutable(); - return intVal_; - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @return The count of intVal. - */ - public int getIntValCount() { - return intVal_.size(); - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @param index The index of the element to return. - * @return The intVal at the given index. - */ - public int getIntVal(int index) { - return intVal_.getInt(index); - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @param index The index to set the value at. - * @param value The intVal to set. - * @return This builder for chaining. - */ - public Builder setIntVal(int index, int value) { - - ensureIntValIsMutable(); - intVal_.setInt(index, value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @param value The intVal to add. - * @return This builder for chaining. - */ - public Builder addIntVal(int value) { - - ensureIntValIsMutable(); - intVal_.addInt(value); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @param values The intVal to add. - * @return This builder for chaining. - */ - public Builder addAllIntVal(java.lang.Iterable values) { - ensureIntValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intVal_); - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-     * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-     * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-     * 
- * - * repeated int32 int_val = 7; - * - * @return This builder for chaining. - */ - public Builder clearIntVal() { - intVal_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList int64Val_ = emptyLongList(); - - private void ensureInt64ValIsMutable() { - if (!int64Val_.isModifiable()) { - int64Val_ = makeMutableCopy(int64Val_); - } - bitField0_ |= 0x00000100; - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @return A list containing the int64Val. - */ - public java.util.List getInt64ValList() { - int64Val_.makeImmutable(); - return int64Val_; - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @return The count of int64Val. - */ - public int getInt64ValCount() { - return int64Val_.size(); - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @param index The index of the element to return. - * @return The int64Val at the given index. - */ - public long getInt64Val(int index) { - return int64Val_.getLong(index); - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @param index The index to set the value at. - * @param value The int64Val to set. - * @return This builder for chaining. - */ - public Builder setInt64Val(int index, long value) { - - ensureInt64ValIsMutable(); - int64Val_.setLong(index, value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @param value The int64Val to add. - * @return This builder for chaining. - */ - public Builder addInt64Val(long value) { - - ensureInt64ValIsMutable(); - int64Val_.addLong(value); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @param values The int64Val to add. - * @return This builder for chaining. - */ - public Builder addAllInt64Val(java.lang.Iterable values) { - ensureInt64ValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, int64Val_); - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-     * 
- * - * repeated int64 int64_val = 8; - * - * @return This builder for chaining. - */ - public Builder clearInt64Val() { - int64Val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList uintVal_ = emptyIntList(); - - private void ensureUintValIsMutable() { - if (!uintVal_.isModifiable()) { - uintVal_ = makeMutableCopy(uintVal_); - } - bitField0_ |= 0x00000200; - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @return A list containing the uintVal. - */ - public java.util.List getUintValList() { - uintVal_.makeImmutable(); - return uintVal_; - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @return The count of uintVal. - */ - public int getUintValCount() { - return uintVal_.size(); - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @param index The index of the element to return. - * @return The uintVal at the given index. - */ - public int getUintVal(int index) { - return uintVal_.getInt(index); - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @param index The index to set the value at. - * @param value The uintVal to set. - * @return This builder for chaining. - */ - public Builder setUintVal(int index, int value) { - - ensureUintValIsMutable(); - uintVal_.setInt(index, value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @param value The uintVal to add. - * @return This builder for chaining. - */ - public Builder addUintVal(int value) { - - ensureUintValIsMutable(); - uintVal_.addInt(value); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @param values The uintVal to add. - * @return This builder for chaining. - */ - public Builder addAllUintVal(java.lang.Iterable values) { - ensureUintValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uintVal_); - bitField0_ |= 0x00000200; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-     * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-     * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-     * 
- * - * repeated uint32 uint_val = 9; - * - * @return This builder for chaining. - */ - public Builder clearUintVal() { - uintVal_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList uint64Val_ = emptyLongList(); - - private void ensureUint64ValIsMutable() { - if (!uint64Val_.isModifiable()) { - uint64Val_ = makeMutableCopy(uint64Val_); - } - bitField0_ |= 0x00000400; - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @return A list containing the uint64Val. - */ - public java.util.List getUint64ValList() { - uint64Val_.makeImmutable(); - return uint64Val_; - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @return The count of uint64Val. - */ - public int getUint64ValCount() { - return uint64Val_.size(); - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @param index The index of the element to return. - * @return The uint64Val at the given index. - */ - public long getUint64Val(int index) { - return uint64Val_.getLong(index); - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @param index The index to set the value at. - * @param value The uint64Val to set. - * @return This builder for chaining. - */ - public Builder setUint64Val(int index, long value) { - - ensureUint64ValIsMutable(); - uint64Val_.setLong(index, value); - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @param value The uint64Val to add. - * @return This builder for chaining. - */ - public Builder addUint64Val(long value) { - - ensureUint64ValIsMutable(); - uint64Val_.addLong(value); - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @param values The uint64Val to add. - * @return This builder for chaining. - */ - public Builder addAllUint64Val(java.lang.Iterable values) { - ensureUint64ValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uint64Val_); - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-     * 
- * - * repeated uint64 uint64_val = 10; - * - * @return This builder for chaining. - */ - public Builder clearUint64Val() { - uint64Val_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - return this; - } - - private java.util.List listVal_ = - java.util.Collections.emptyList(); - - private void ensureListValIsMutable() { - if (!((bitField0_ & 0x00000800) != 0)) { - listVal_ = new java.util.ArrayList(listVal_); - bitField0_ |= 0x00000800; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - listValBuilder_; - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public java.util.List getListValList() { - if (listValBuilder_ == null) { - return java.util.Collections.unmodifiableList(listVal_); - } else { - return listValBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public int getListValCount() { - if (listValBuilder_ == null) { - return listVal_.size(); - } else { - return listValBuilder_.getCount(); - } - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public com.google.cloud.vertexai.api.Tensor getListVal(int index) { - if (listValBuilder_ == null) { - return listVal_.get(index); - } else { - return listValBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder setListVal(int index, com.google.cloud.vertexai.api.Tensor value) { - if (listValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListValIsMutable(); - listVal_.set(index, value); - onChanged(); - } else { - listValBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder setListVal( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (listValBuilder_ == null) { - ensureListValIsMutable(); - listVal_.set(index, builderForValue.build()); - onChanged(); - } else { - listValBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder addListVal(com.google.cloud.vertexai.api.Tensor value) { - if (listValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListValIsMutable(); - listVal_.add(value); - onChanged(); - } else { - listValBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder addListVal(int index, com.google.cloud.vertexai.api.Tensor value) { - if (listValBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureListValIsMutable(); - listVal_.add(index, value); - onChanged(); - } else { - listValBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder addListVal(com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (listValBuilder_ == null) { - ensureListValIsMutable(); - listVal_.add(builderForValue.build()); - onChanged(); - } else { - listValBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder addListVal( - int index, com.google.cloud.vertexai.api.Tensor.Builder builderForValue) { - if (listValBuilder_ == null) { - ensureListValIsMutable(); - listVal_.add(index, builderForValue.build()); - onChanged(); - } else { - listValBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder addAllListVal( - java.lang.Iterable values) { - if (listValBuilder_ == null) { - ensureListValIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listVal_); - onChanged(); - } else { - listValBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder clearListVal() { - if (listValBuilder_ == null) { - listVal_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - } else { - listValBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public Builder removeListVal(int index) { - if (listValBuilder_ == null) { - ensureListValIsMutable(); - listVal_.remove(index); - onChanged(); - } else { - listValBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public com.google.cloud.vertexai.api.Tensor.Builder getListValBuilder(int index) { - return internalGetListValFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public com.google.cloud.vertexai.api.TensorOrBuilder getListValOrBuilder(int index) { - if (listValBuilder_ == null) { - return listVal_.get(index); - } else { - return listValBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public java.util.List - getListValOrBuilderList() { - if (listValBuilder_ != null) { - return listValBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(listVal_); - } - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addListValBuilder() { - return internalGetListValFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public com.google.cloud.vertexai.api.Tensor.Builder addListValBuilder(int index) { - return internalGetListValFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); - } - - /** - * - * - *
-     * A list of tensor values.
-     * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - public java.util.List getListValBuilderList() { - return internalGetListValFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder> - internalGetListValFieldBuilder() { - if (listValBuilder_ == null) { - listValBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder, - com.google.cloud.vertexai.api.TensorOrBuilder>( - listVal_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); - listVal_ = null; - } - return listValBuilder_; - } - - private static final class StructValConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.vertexai.api.TensorOrBuilder, - com.google.cloud.vertexai.api.Tensor> { - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor build( - com.google.cloud.vertexai.api.TensorOrBuilder val) { - if (val instanceof com.google.cloud.vertexai.api.Tensor) { - return (com.google.cloud.vertexai.api.Tensor) val; - } - return ((com.google.cloud.vertexai.api.Tensor.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry - defaultEntry() { - return StructValDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final StructValConverter structValConverter = new StructValConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.TensorOrBuilder, - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder> - structVal_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.TensorOrBuilder, - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder> - internalGetStructVal() { - if (structVal_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(structValConverter); - } - return structVal_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.vertexai.api.TensorOrBuilder, - com.google.cloud.vertexai.api.Tensor, - com.google.cloud.vertexai.api.Tensor.Builder> - internalGetMutableStructVal() { - if (structVal_ == null) { - structVal_ = new com.google.protobuf.MapFieldBuilder<>(structValConverter); - } - bitField0_ |= 0x00001000; - onChanged(); - return structVal_; - } - - public int getStructValCount() { - return internalGetStructVal().ensureBuilderMap().size(); - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public boolean containsStructVal(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetStructVal().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getStructValMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getStructVal() { - return getStructValMap(); - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public java.util.Map getStructValMap() { - return internalGetStructVal().getImmutableMap(); - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public /* nullable */ com.google.cloud.vertexai.api.Tensor getStructValOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Tensor defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableStructVal().ensureBuilderMap(); - return map.containsKey(key) ? structValConverter.build(map.get(key)) : defaultValue; - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tensor getStructValOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableStructVal().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return structValConverter.build(map.get(key)); - } - - public Builder clearStructVal() { - bitField0_ = (bitField0_ & ~0x00001000); - internalGetMutableStructVal().clear(); - return this; - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - public Builder removeStructVal(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableStructVal().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableStructVal() { - bitField0_ |= 0x00001000; - return internalGetMutableStructVal().ensureMessageMap(); - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - public Builder putStructVal(java.lang.String key, com.google.cloud.vertexai.api.Tensor value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableStructVal().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00001000; - return this; - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - public Builder putAllStructVal( - java.util.Map values) { - for (java.util.Map.Entry e : - values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } - } - internalGetMutableStructVal().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00001000; - return this; - } - - /** - * - * - *
-     * A map of string to tensor.
-     * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - public com.google.cloud.vertexai.api.Tensor.Builder putStructValBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = - internalGetMutableStructVal().ensureBuilderMap(); - com.google.cloud.vertexai.api.TensorOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.vertexai.api.Tensor.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.vertexai.api.Tensor) { - entry = ((com.google.cloud.vertexai.api.Tensor) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.cloud.vertexai.api.Tensor.Builder) entry; - } - - private com.google.protobuf.ByteString tensorVal_ = com.google.protobuf.ByteString.EMPTY; - - /** - * - * - *
-     * Serialized raw tensor content.
-     * 
- * - * bytes tensor_val = 13; - * - * @return The tensorVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTensorVal() { - return tensorVal_; - } - - /** - * - * - *
-     * Serialized raw tensor content.
-     * 
- * - * bytes tensor_val = 13; - * - * @param value The tensorVal to set. - * @return This builder for chaining. - */ - public Builder setTensorVal(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - tensorVal_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; - } - - /** - * - * - *
-     * Serialized raw tensor content.
-     * 
- * - * bytes tensor_val = 13; - * - * @return This builder for chaining. - */ - public Builder clearTensorVal() { - bitField0_ = (bitField0_ & ~0x00002000); - tensorVal_ = getDefaultInstance().getTensorVal(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Tensor) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Tensor) - private static final com.google.cloud.vertexai.api.Tensor DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Tensor(); - } - - public static com.google.cloud.vertexai.api.Tensor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Tensor 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.vertexai.api.Tensor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java deleted file mode 100644 index 3897e3475d51..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface TensorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Tensor) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The data type of tensor.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The enum numeric value on the wire for dtype. - */ - int getDtypeValue(); - - /** - * - * - *
-   * The data type of tensor.
-   * 
- * - * .google.cloud.vertexai.v1.Tensor.DataType dtype = 1; - * - * @return The dtype. - */ - com.google.cloud.vertexai.api.Tensor.DataType getDtype(); - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @return A list containing the shape. - */ - java.util.List getShapeList(); - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @return The count of shape. - */ - int getShapeCount(); - - /** - * - * - *
-   * Shape of the tensor.
-   * 
- * - * repeated int64 shape = 2; - * - * @param index The index of the element to return. - * @return The shape at the given index. - */ - long getShape(int index); - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @return A list containing the boolVal. - */ - java.util.List getBoolValList(); - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @return The count of boolVal. - */ - int getBoolValCount(); - - /** - * - * - *
-   * Type specific representations that make it easy to create tensor protos in
-   * all languages.  Only the representation corresponding to "dtype" can
-   * be set.  The values hold the flattened representation of the tensor in
-   * row major order.
-   *
-   * [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
-   * 
- * - * repeated bool bool_val = 3; - * - * @param index The index of the element to return. - * @return The boolVal at the given index. - */ - boolean getBoolVal(int index); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @return A list containing the stringVal. - */ - java.util.List getStringValList(); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @return The count of stringVal. - */ - int getStringValCount(); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @param index The index of the element to return. - * @return The stringVal at the given index. - */ - java.lang.String getStringVal(int index); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated string string_val = 14; - * - * @param index The index of the value to return. - * @return The bytes of the stringVal at the given index. - */ - com.google.protobuf.ByteString getStringValBytes(int index); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @return A list containing the bytesVal. - */ - java.util.List getBytesValList(); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @return The count of bytesVal. - */ - int getBytesValCount(); - - /** - * - * - *
-   * [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
-   * 
- * - * repeated bytes bytes_val = 15; - * - * @param index The index of the element to return. - * @return The bytesVal at the given index. - */ - com.google.protobuf.ByteString getBytesVal(int index); - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @return A list containing the floatVal. - */ - java.util.List getFloatValList(); - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @return The count of floatVal. - */ - int getFloatValCount(); - - /** - * - * - *
-   * [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
-   * 
- * - * repeated float float_val = 5; - * - * @param index The index of the element to return. - * @return The floatVal at the given index. - */ - float getFloatVal(int index); - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @return A list containing the doubleVal. - */ - java.util.List getDoubleValList(); - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @return The count of doubleVal. - */ - int getDoubleValCount(); - - /** - * - * - *
-   * [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
-   * 
- * - * repeated double double_val = 6; - * - * @param index The index of the element to return. - * @return The doubleVal at the given index. - */ - double getDoubleVal(int index); - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @return A list containing the intVal. - */ - java.util.List getIntValList(); - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @return The count of intVal. - */ - int getIntValCount(); - - /** - * - * - *
-   * [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
-   * [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
-   * [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
-   * 
- * - * repeated int32 int_val = 7; - * - * @param index The index of the element to return. - * @return The intVal at the given index. - */ - int getIntVal(int index); - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @return A list containing the int64Val. - */ - java.util.List getInt64ValList(); - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @return The count of int64Val. - */ - int getInt64ValCount(); - - /** - * - * - *
-   * [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
-   * 
- * - * repeated int64 int64_val = 8; - * - * @param index The index of the element to return. - * @return The int64Val at the given index. - */ - long getInt64Val(int index); - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @return A list containing the uintVal. - */ - java.util.List getUintValList(); - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @return The count of uintVal. - */ - int getUintValCount(); - - /** - * - * - *
-   * [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
-   * [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
-   * [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
-   * 
- * - * repeated uint32 uint_val = 9; - * - * @param index The index of the element to return. - * @return The uintVal at the given index. - */ - int getUintVal(int index); - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @return A list containing the uint64Val. - */ - java.util.List getUint64ValList(); - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @return The count of uint64Val. - */ - int getUint64ValCount(); - - /** - * - * - *
-   * [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
-   * 
- * - * repeated uint64 uint64_val = 10; - * - * @param index The index of the element to return. - * @return The uint64Val at the given index. - */ - long getUint64Val(int index); - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - java.util.List getListValList(); - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - com.google.cloud.vertexai.api.Tensor getListVal(int index); - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - int getListValCount(); - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - java.util.List getListValOrBuilderList(); - - /** - * - * - *
-   * A list of tensor values.
-   * 
- * - * repeated .google.cloud.vertexai.v1.Tensor list_val = 11; - */ - com.google.cloud.vertexai.api.TensorOrBuilder getListValOrBuilder(int index); - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - int getStructValCount(); - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - boolean containsStructVal(java.lang.String key); - - /** Use {@link #getStructValMap()} instead. */ - @java.lang.Deprecated - java.util.Map getStructVal(); - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - java.util.Map getStructValMap(); - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - /* nullable */ - com.google.cloud.vertexai.api.Tensor getStructValOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.vertexai.api.Tensor defaultValue); - - /** - * - * - *
-   * A map of string to tensor.
-   * 
- * - * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; - */ - com.google.cloud.vertexai.api.Tensor getStructValOrThrow(java.lang.String key); - - /** - * - * - *
-   * Serialized raw tensor content.
-   * 
- * - * bytes tensor_val = 13; - * - * @return The tensorVal. - */ - com.google.protobuf.ByteString getTensorVal(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java deleted file mode 100644 index 3cabb51d4c6e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java +++ /dev/null @@ -1,1082 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tokens info with a list of tokens and the corresponding list of token ids.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.TokensInfo} - */ -@com.google.protobuf.Generated -public final class TokensInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.TokensInfo) - TokensInfoOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "TokensInfo"); - } - - // Use TokensInfo.newBuilder() to construct. - private TokensInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private TokensInfo() { - tokens_ = emptyList(com.google.protobuf.ByteString.class); - tokenIds_ = emptyLongList(); - role_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_TokensInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.TokensInfo.class, - com.google.cloud.vertexai.api.TokensInfo.Builder.class); - } - - public static final int TOKENS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.ProtobufList tokens_ = - emptyList(com.google.protobuf.ByteString.class); - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @return A list containing the tokens. - */ - @java.lang.Override - public java.util.List getTokensList() { - return tokens_; - } - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @return The count of tokens. - */ - public int getTokensCount() { - return tokens_.size(); - } - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @param index The index of the element to return. - * @return The tokens at the given index. - */ - public com.google.protobuf.ByteString getTokens(int index) { - return tokens_.get(index); - } - - public static final int TOKEN_IDS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @return A list containing the tokenIds. - */ - @java.lang.Override - public java.util.List getTokenIdsList() { - return tokenIds_; - } - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @return The count of tokenIds. - */ - public int getTokenIdsCount() { - return tokenIds_.size(); - } - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @param index The index of the element to return. - * @return The tokenIds at the given index. - */ - public long getTokenIds(int index) { - return tokenIds_.getLong(index); - } - - private int tokenIdsMemoizedSerializedSize = -1; - - public static final int ROLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object role_ = ""; - - /** - * - * - *
-   * Optional. Optional fields for the role from the corresponding Content.
-   * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = role_; - 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(); - role_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Optional fields for the role from the corresponding Content.
-   * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = 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 { - getSerializedSize(); - for (int i = 0; i < tokens_.size(); i++) { - output.writeBytes(1, tokens_.get(i)); - } - if (getTokenIdsList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(tokenIdsMemoizedSerializedSize); - } - for (int i = 0; i < tokenIds_.size(); i++) { - output.writeInt64NoTag(tokenIds_.getLong(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, role_); - } - 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 < tokens_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(tokens_.get(i)); - } - size += dataSize; - size += 1 * getTokensList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < tokenIds_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(tokenIds_.getLong(i)); - } - size += dataSize; - if (!getTokenIdsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - tokenIdsMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(role_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, role_); - } - 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.vertexai.api.TokensInfo)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.TokensInfo other = (com.google.cloud.vertexai.api.TokensInfo) obj; - - if (!getTokensList().equals(other.getTokensList())) return false; - if (!getTokenIdsList().equals(other.getTokenIdsList())) return false; - if (!getRole().equals(other.getRole())) 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 (getTokensCount() > 0) { - hash = (37 * hash) + TOKENS_FIELD_NUMBER; - hash = (53 * hash) + getTokensList().hashCode(); - } - if (getTokenIdsCount() > 0) { - hash = (37 * hash) + TOKEN_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTokenIdsList().hashCode(); - } - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TokensInfo 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.vertexai.api.TokensInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TokensInfo 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.vertexai.api.TokensInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.TokensInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.TokensInfo 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tokens info with a list of tokens and the corresponding list of token ids.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.TokensInfo} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.TokensInfo) - com.google.cloud.vertexai.api.TokensInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_TokensInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.TokensInfo.class, - com.google.cloud.vertexai.api.TokensInfo.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.TokensInfo.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - tokens_ = emptyList(com.google.protobuf.ByteString.class); - tokenIds_ = emptyLongList(); - role_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.LlmUtilityServiceProto - .internal_static_google_cloud_vertexai_v1_TokensInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TokensInfo getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.TokensInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TokensInfo build() { - com.google.cloud.vertexai.api.TokensInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.TokensInfo buildPartial() { - com.google.cloud.vertexai.api.TokensInfo result = - new com.google.cloud.vertexai.api.TokensInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.TokensInfo result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - tokens_.makeImmutable(); - result.tokens_ = tokens_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - tokenIds_.makeImmutable(); - result.tokenIds_ = tokenIds_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.role_ = role_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.TokensInfo) { - return mergeFrom((com.google.cloud.vertexai.api.TokensInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.TokensInfo other) { - if (other == com.google.cloud.vertexai.api.TokensInfo.getDefaultInstance()) return this; - if (!other.tokens_.isEmpty()) { - if (tokens_.isEmpty()) { - tokens_ = other.tokens_; - tokens_.makeImmutable(); - bitField0_ |= 0x00000001; - } else { - ensureTokensIsMutable(); - tokens_.addAll(other.tokens_); - } - onChanged(); - } - if (!other.tokenIds_.isEmpty()) { - if (tokenIds_.isEmpty()) { - tokenIds_ = other.tokenIds_; - tokenIds_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureTokenIdsIsMutable(); - tokenIds_.addAll(other.tokenIds_); - } - onChanged(); - } - if (!other.getRole().isEmpty()) { - role_ = other.role_; - 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: - { - com.google.protobuf.ByteString v = input.readBytes(); - ensureTokensIsMutable(); - tokens_.add(v); - break; - } // case 10 - case 16: - { - long v = input.readInt64(); - ensureTokenIdsIsMutable(); - tokenIds_.addLong(v); - break; - } // case 16 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTokenIdsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - tokenIds_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 18 - case 26: - { - role_ = 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.Internal.ProtobufList tokens_ = - emptyList(com.google.protobuf.ByteString.class); - - private void ensureTokensIsMutable() { - if (!tokens_.isModifiable()) { - tokens_ = makeMutableCopy(tokens_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @return A list containing the tokens. - */ - public java.util.List getTokensList() { - tokens_.makeImmutable(); - return tokens_; - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @return The count of tokens. - */ - public int getTokensCount() { - return tokens_.size(); - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @param index The index of the element to return. - * @return The tokens at the given index. - */ - public com.google.protobuf.ByteString getTokens(int index) { - return tokens_.get(index); - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @param index The index to set the value at. - * @param value The tokens to set. - * @return This builder for chaining. - */ - public Builder setTokens(int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensIsMutable(); - tokens_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @param value The tokens to add. - * @return This builder for chaining. - */ - public Builder addTokens(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokensIsMutable(); - tokens_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @param values The tokens to add. - * @return This builder for chaining. - */ - public Builder addAllTokens( - java.lang.Iterable values) { - ensureTokensIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of tokens from the input.
-     * 
- * - * repeated bytes tokens = 1; - * - * @return This builder for chaining. - */ - public Builder clearTokens() { - tokens_ = emptyList(com.google.protobuf.ByteString.class); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); - - private void ensureTokenIdsIsMutable() { - if (!tokenIds_.isModifiable()) { - tokenIds_ = makeMutableCopy(tokenIds_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @return A list containing the tokenIds. - */ - public java.util.List getTokenIdsList() { - tokenIds_.makeImmutable(); - return tokenIds_; - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @return The count of tokenIds. - */ - public int getTokenIdsCount() { - return tokenIds_.size(); - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @param index The index of the element to return. - * @return The tokenIds at the given index. - */ - public long getTokenIds(int index) { - return tokenIds_.getLong(index); - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @param index The index to set the value at. - * @param value The tokenIds to set. - * @return This builder for chaining. - */ - public Builder setTokenIds(int index, long value) { - - ensureTokenIdsIsMutable(); - tokenIds_.setLong(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @param value The tokenIds to add. - * @return This builder for chaining. - */ - public Builder addTokenIds(long value) { - - ensureTokenIdsIsMutable(); - tokenIds_.addLong(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @param values The tokenIds to add. - * @return This builder for chaining. - */ - public Builder addAllTokenIds(java.lang.Iterable values) { - ensureTokenIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokenIds_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * A list of token ids from the input.
-     * 
- * - * repeated int64 token_ids = 2; - * - * @return This builder for chaining. - */ - public Builder clearTokenIds() { - tokenIds_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private java.lang.Object role_ = ""; - - /** - * - * - *
-     * Optional. Optional fields for the role from the corresponding Content.
-     * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = role_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - role_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Optional fields for the role from the corresponding Content.
-     * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - public com.google.protobuf.ByteString getRoleBytes() { - java.lang.Object ref = role_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - role_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Optional fields for the role from the corresponding Content.
-     * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - role_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Optional fields for the role from the corresponding Content.
-     * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRole() { - role_ = getDefaultInstance().getRole(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Optional fields for the role from the corresponding Content.
-     * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - role_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.TokensInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.TokensInfo) - private static final com.google.cloud.vertexai.api.TokensInfo DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.TokensInfo(); - } - - public static com.google.cloud.vertexai.api.TokensInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TokensInfo 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.vertexai.api.TokensInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java deleted file mode 100644 index 9ab9851581e5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/llm_utility_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface TokensInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.TokensInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @return A list containing the tokens. - */ - java.util.List getTokensList(); - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @return The count of tokens. - */ - int getTokensCount(); - - /** - * - * - *
-   * A list of tokens from the input.
-   * 
- * - * repeated bytes tokens = 1; - * - * @param index The index of the element to return. - * @return The tokens at the given index. - */ - com.google.protobuf.ByteString getTokens(int index); - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @return A list containing the tokenIds. - */ - java.util.List getTokenIdsList(); - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @return The count of tokenIds. - */ - int getTokenIdsCount(); - - /** - * - * - *
-   * A list of token ids from the input.
-   * 
- * - * repeated int64 token_ids = 2; - * - * @param index The index of the element to return. - * @return The tokenIds at the given index. - */ - long getTokenIds(int index); - - /** - * - * - *
-   * Optional. Optional fields for the role from the corresponding Content.
-   * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The role. - */ - java.lang.String getRole(); - - /** - * - * - *
-   * Optional. Optional fields for the role from the corresponding Content.
-   * 
- * - * string role = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for role. - */ - com.google.protobuf.ByteString getRoleBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java deleted file mode 100644 index 9413c83352ec..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java +++ /dev/null @@ -1,6696 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool details that the model may use to generate response.
- *
- * A `Tool` is a piece of code that enables the system to interact with
- * external systems to perform an action, or set of actions, outside of
- * knowledge and scope of the model. A Tool object should contain exactly
- * one type of Tool (e.g FunctionDeclaration, Retrieval or
- * GoogleSearchRetrieval).
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool} - */ -@com.google.protobuf.Generated -public final class Tool extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Tool) - ToolOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Tool"); - } - - // Use Tool.newBuilder() to construct. - private Tool(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Tool() { - functionDeclarations_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.class, - com.google.cloud.vertexai.api.Tool.Builder.class); - } - - /** - * - * - *
-   * These are available confidence level user can set to block malicious urls
-   * with chosen confidence and above. For understanding different confidence of
-   * webrisk, please refer to
-   * https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Tool.PhishBlockThreshold} - */ - public enum PhishBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Defaults to unspecified.
-     * 
- * - * PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; - */ - PHISH_BLOCK_THRESHOLD_UNSPECIFIED(0), - /** - * - * - *
-     * Blocks Low and above confidence URL that is risky.
-     * 
- * - * BLOCK_LOW_AND_ABOVE = 30; - */ - BLOCK_LOW_AND_ABOVE(30), - /** - * - * - *
-     * Blocks Medium and above confidence URL that is risky.
-     * 
- * - * BLOCK_MEDIUM_AND_ABOVE = 40; - */ - BLOCK_MEDIUM_AND_ABOVE(40), - /** - * - * - *
-     * Blocks High and above confidence URL that is risky.
-     * 
- * - * BLOCK_HIGH_AND_ABOVE = 50; - */ - BLOCK_HIGH_AND_ABOVE(50), - /** - * - * - *
-     * Blocks Higher and above confidence URL that is risky.
-     * 
- * - * BLOCK_HIGHER_AND_ABOVE = 55; - */ - BLOCK_HIGHER_AND_ABOVE(55), - /** - * - * - *
-     * Blocks Very high and above confidence URL that is risky.
-     * 
- * - * BLOCK_VERY_HIGH_AND_ABOVE = 60; - */ - BLOCK_VERY_HIGH_AND_ABOVE(60), - /** - * - * - *
-     * Blocks Extremely high confidence URL that is risky.
-     * 
- * - * BLOCK_ONLY_EXTREMELY_HIGH = 100; - */ - BLOCK_ONLY_EXTREMELY_HIGH(100), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PhishBlockThreshold"); - } - - /** - * - * - *
-     * Defaults to unspecified.
-     * 
- * - * PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; - */ - public static final int PHISH_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Blocks Low and above confidence URL that is risky.
-     * 
- * - * BLOCK_LOW_AND_ABOVE = 30; - */ - public static final int BLOCK_LOW_AND_ABOVE_VALUE = 30; - - /** - * - * - *
-     * Blocks Medium and above confidence URL that is risky.
-     * 
- * - * BLOCK_MEDIUM_AND_ABOVE = 40; - */ - public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 40; - - /** - * - * - *
-     * Blocks High and above confidence URL that is risky.
-     * 
- * - * BLOCK_HIGH_AND_ABOVE = 50; - */ - public static final int BLOCK_HIGH_AND_ABOVE_VALUE = 50; - - /** - * - * - *
-     * Blocks Higher and above confidence URL that is risky.
-     * 
- * - * BLOCK_HIGHER_AND_ABOVE = 55; - */ - public static final int BLOCK_HIGHER_AND_ABOVE_VALUE = 55; - - /** - * - * - *
-     * Blocks Very high and above confidence URL that is risky.
-     * 
- * - * BLOCK_VERY_HIGH_AND_ABOVE = 60; - */ - public static final int BLOCK_VERY_HIGH_AND_ABOVE_VALUE = 60; - - /** - * - * - *
-     * Blocks Extremely high confidence URL that is risky.
-     * 
- * - * BLOCK_ONLY_EXTREMELY_HIGH = 100; - */ - public static final int BLOCK_ONLY_EXTREMELY_HIGH_VALUE = 100; - - 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 PhishBlockThreshold 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 PhishBlockThreshold forNumber(int value) { - switch (value) { - case 0: - return PHISH_BLOCK_THRESHOLD_UNSPECIFIED; - case 30: - return BLOCK_LOW_AND_ABOVE; - case 40: - return BLOCK_MEDIUM_AND_ABOVE; - case 50: - return BLOCK_HIGH_AND_ABOVE; - case 55: - return BLOCK_HIGHER_AND_ABOVE; - case 60: - return BLOCK_VERY_HIGH_AND_ABOVE; - case 100: - return BLOCK_ONLY_EXTREMELY_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 PhishBlockThreshold findValueByNumber(int number) { - return PhishBlockThreshold.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Tool.getDescriptor().getEnumTypes().get(0); - } - - private static final PhishBlockThreshold[] VALUES = values(); - - public static PhishBlockThreshold 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 PhishBlockThreshold(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Tool.PhishBlockThreshold) - } - - public interface GoogleSearchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Tool.GoogleSearch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - java.util.List getExcludeDomainsList(); - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - int getExcludeDomainsCount(); - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - java.lang.String getExcludeDomains(int index); - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - com.google.protobuf.ByteString getExcludeDomainsBytes(int index); - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - boolean hasBlockingConfidence(); - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - int getBlockingConfidenceValue(); - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence(); - } - - /** - * - * - *
-   * GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.GoogleSearch} - */ - public static final class GoogleSearch extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Tool.GoogleSearch) - GoogleSearchOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GoogleSearch"); - } - - // Use GoogleSearch.newBuilder() to construct. - private GoogleSearch(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private GoogleSearch() { - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - blockingConfidence_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.GoogleSearch.class, - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder.class); - } - - private int bitField0_; - public static final int EXCLUDE_DOMAINS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList excludeDomains_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { - return excludeDomains_; - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - public int getExcludeDomainsCount() { - return excludeDomains_.size(); - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - public java.lang.String getExcludeDomains(int index) { - return excludeDomains_.get(index); - } - - /** - * - * - *
-     * Optional. List of domains to be excluded from the search results.
-     * The default limit is 2000 domains.
-     * Example: ["amazon.com", "facebook.com"].
-     * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { - return excludeDomains_.getByteString(index); - } - - public static final int BLOCKING_CONFIDENCE_FIELD_NUMBER = 4; - private int blockingConfidence_ = 0; - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - @java.lang.Override - public boolean hasBlockingConfidence() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - @java.lang.Override - public int getBlockingConfidenceValue() { - return blockingConfidence_; - } - - /** - * - * - *
-     * Optional. Sites with confidence level chosen & above this value will be
-     * blocked from the search results.
-     * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence() { - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold result = - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.forNumber(blockingConfidence_); - return result == null - ? com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.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 { - for (int i = 0; i < excludeDomains_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, excludeDomains_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(4, blockingConfidence_); - } - 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 < excludeDomains_.size(); i++) { - dataSize += computeStringSizeNoTag(excludeDomains_.getRaw(i)); - } - size += dataSize; - size += 1 * getExcludeDomainsList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, blockingConfidence_); - } - 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.vertexai.api.Tool.GoogleSearch)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Tool.GoogleSearch other = - (com.google.cloud.vertexai.api.Tool.GoogleSearch) obj; - - if (!getExcludeDomainsList().equals(other.getExcludeDomainsList())) return false; - if (hasBlockingConfidence() != other.hasBlockingConfidence()) return false; - if (hasBlockingConfidence()) { - if (blockingConfidence_ != other.blockingConfidence_) 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 (getExcludeDomainsCount() > 0) { - hash = (37 * hash) + EXCLUDE_DOMAINS_FIELD_NUMBER; - hash = (53 * hash) + getExcludeDomainsList().hashCode(); - } - if (hasBlockingConfidence()) { - hash = (37 * hash) + BLOCKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + blockingConfidence_; - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch 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.vertexai.api.Tool.GoogleSearch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch 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.vertexai.api.Tool.GoogleSearch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Tool.GoogleSearch 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.GoogleSearch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Tool.GoogleSearch) - com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.GoogleSearch.class, - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Tool.GoogleSearch.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - blockingConfidence_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.GoogleSearch getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.GoogleSearch build() { - com.google.cloud.vertexai.api.Tool.GoogleSearch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.GoogleSearch buildPartial() { - com.google.cloud.vertexai.api.Tool.GoogleSearch result = - new com.google.cloud.vertexai.api.Tool.GoogleSearch(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Tool.GoogleSearch result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - excludeDomains_.makeImmutable(); - result.excludeDomains_ = excludeDomains_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.blockingConfidence_ = blockingConfidence_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Tool.GoogleSearch) { - return mergeFrom((com.google.cloud.vertexai.api.Tool.GoogleSearch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Tool.GoogleSearch other) { - if (other == com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance()) - return this; - if (!other.excludeDomains_.isEmpty()) { - if (excludeDomains_.isEmpty()) { - excludeDomains_ = other.excludeDomains_; - bitField0_ |= 0x00000001; - } else { - ensureExcludeDomainsIsMutable(); - excludeDomains_.addAll(other.excludeDomains_); - } - onChanged(); - } - if (other.hasBlockingConfidence()) { - setBlockingConfidenceValue(other.getBlockingConfidenceValue()); - } - 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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(s); - break; - } // case 26 - case 32: - { - blockingConfidence_ = input.readEnum(); - bitField0_ |= 0x00000002; - 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.LazyStringArrayList excludeDomains_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureExcludeDomainsIsMutable() { - if (!excludeDomains_.isModifiable()) { - excludeDomains_ = new com.google.protobuf.LazyStringArrayList(excludeDomains_); - } - bitField0_ |= 0x00000001; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the excludeDomains. - */ - public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { - excludeDomains_.makeImmutable(); - return excludeDomains_; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of excludeDomains. - */ - public int getExcludeDomainsCount() { - return excludeDomains_.size(); - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The excludeDomains at the given index. - */ - public java.lang.String getExcludeDomains(int index) { - return excludeDomains_.get(index); - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the excludeDomains at the given index. - */ - public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { - return excludeDomains_.getByteString(index); - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The excludeDomains to set. - * @return This builder for chaining. - */ - public Builder setExcludeDomains(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeDomainsIsMutable(); - excludeDomains_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addExcludeDomains(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addAllExcludeDomains(java.lang.Iterable values) { - ensureExcludeDomainsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeDomains_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearExcludeDomains() { - excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. List of domains to be excluded from the search results.
-       * The default limit is 2000 domains.
-       * Example: ["amazon.com", "facebook.com"].
-       * 
- * - * repeated string exclude_domains = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the excludeDomains to add. - * @return This builder for chaining. - */ - public Builder addExcludeDomainsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExcludeDomainsIsMutable(); - excludeDomains_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int blockingConfidence_ = 0; - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the blockingConfidence field is set. - */ - @java.lang.Override - public boolean hasBlockingConfidence() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for blockingConfidence. - */ - @java.lang.Override - public int getBlockingConfidenceValue() { - return blockingConfidence_; - } - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for blockingConfidence to set. - * @return This builder for chaining. - */ - public Builder setBlockingConfidenceValue(int value) { - blockingConfidence_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The blockingConfidence. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.PhishBlockThreshold getBlockingConfidence() { - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold result = - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.forNumber(blockingConfidence_); - return result == null - ? com.google.cloud.vertexai.api.Tool.PhishBlockThreshold.UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The blockingConfidence to set. - * @return This builder for chaining. - */ - public Builder setBlockingConfidence( - com.google.cloud.vertexai.api.Tool.PhishBlockThreshold value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - blockingConfidence_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Sites with confidence level chosen & above this value will be
-       * blocked from the search results.
-       * 
- * - * - * optional .google.cloud.vertexai.v1.Tool.PhishBlockThreshold blocking_confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearBlockingConfidence() { - bitField0_ = (bitField0_ & ~0x00000002); - blockingConfidence_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Tool.GoogleSearch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Tool.GoogleSearch) - private static final com.google.cloud.vertexai.api.Tool.GoogleSearch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Tool.GoogleSearch(); - } - - public static com.google.cloud.vertexai.api.Tool.GoogleSearch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GoogleSearch 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.vertexai.api.Tool.GoogleSearch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface CodeExecutionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Tool.CodeExecution) - com.google.protobuf.MessageOrBuilder {} - - /** - * - * - *
-   * Tool that executes code generated by the model, and automatically returns
-   * the result to the model.
-   *
-   * See also [ExecutableCode]and [CodeExecutionResult] which are input and
-   * output to this tool.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.CodeExecution} - */ - public static final class CodeExecution extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Tool.CodeExecution) - CodeExecutionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CodeExecution"); - } - - // Use CodeExecution.newBuilder() to construct. - private CodeExecution(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private CodeExecution() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.CodeExecution.class, - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder.class); - } - - 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.cloud.vertexai.api.Tool.CodeExecution)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Tool.CodeExecution other = - (com.google.cloud.vertexai.api.Tool.CodeExecution) 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.cloud.vertexai.api.Tool.CodeExecution parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution 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.vertexai.api.Tool.CodeExecution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution 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.vertexai.api.Tool.CodeExecution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Tool.CodeExecution 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Tool that executes code generated by the model, and automatically returns
-     * the result to the model.
-     *
-     * See also [ExecutableCode]and [CodeExecutionResult] which are input and
-     * output to this tool.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.CodeExecution} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Tool.CodeExecution) - com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.CodeExecution.class, - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Tool.CodeExecution.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.CodeExecution getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.CodeExecution build() { - com.google.cloud.vertexai.api.Tool.CodeExecution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.CodeExecution buildPartial() { - com.google.cloud.vertexai.api.Tool.CodeExecution result = - new com.google.cloud.vertexai.api.Tool.CodeExecution(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Tool.CodeExecution) { - return mergeFrom((com.google.cloud.vertexai.api.Tool.CodeExecution) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Tool.CodeExecution other) { - if (other == com.google.cloud.vertexai.api.Tool.CodeExecution.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Tool.CodeExecution) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Tool.CodeExecution) - private static final com.google.cloud.vertexai.api.Tool.CodeExecution DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Tool.CodeExecution(); - } - - public static com.google.cloud.vertexai.api.Tool.CodeExecution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CodeExecution 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.vertexai.api.Tool.CodeExecution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ComputerUseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Tool.ComputerUse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The environment being operated.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for environment. - */ - int getEnvironmentValue(); - - /** - * - * - *
-     * Required. The environment being operated.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The environment. - */ - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment getEnvironment(); - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the excludedPredefinedFunctions. - */ - java.util.List getExcludedPredefinedFunctionsList(); - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of excludedPredefinedFunctions. - */ - int getExcludedPredefinedFunctionsCount(); - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The excludedPredefinedFunctions at the given index. - */ - java.lang.String getExcludedPredefinedFunctions(int index); - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the excludedPredefinedFunctions at the given index. - */ - com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index); - } - - /** - * - * - *
-   * Tool to support computer use.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.ComputerUse} - */ - public static final class ComputerUse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.Tool.ComputerUse) - ComputerUseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ComputerUse"); - } - - // Use ComputerUse.newBuilder() to construct. - private ComputerUse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ComputerUse() { - environment_ = 0; - excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.ComputerUse.class, - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder.class); - } - - /** - * - * - *
-     * Represents the environment being operated, such as a web browser.
-     * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Tool.ComputerUse.Environment} - */ - public enum Environment implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Defaults to browser.
-       * 
- * - * ENVIRONMENT_UNSPECIFIED = 0; - */ - ENVIRONMENT_UNSPECIFIED(0), - /** - * - * - *
-       * Operates in a web browser.
-       * 
- * - * ENVIRONMENT_BROWSER = 1; - */ - ENVIRONMENT_BROWSER(1), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Environment"); - } - - /** - * - * - *
-       * Defaults to browser.
-       * 
- * - * ENVIRONMENT_UNSPECIFIED = 0; - */ - public static final int ENVIRONMENT_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-       * Operates in a web browser.
-       * 
- * - * ENVIRONMENT_BROWSER = 1; - */ - public static final int ENVIRONMENT_BROWSER_VALUE = 1; - - 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 Environment 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 Environment forNumber(int value) { - switch (value) { - case 0: - return ENVIRONMENT_UNSPECIFIED; - case 1: - return ENVIRONMENT_BROWSER; - 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 Environment findValueByNumber(int number) { - return Environment.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.Tool.ComputerUse.getDescriptor().getEnumTypes().get(0); - } - - private static final Environment[] VALUES = values(); - - public static Environment 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 Environment(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Tool.ComputerUse.Environment) - } - - public static final int ENVIRONMENT_FIELD_NUMBER = 1; - private int environment_ = 0; - - /** - * - * - *
-     * Required. The environment being operated.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for environment. - */ - @java.lang.Override - public int getEnvironmentValue() { - return environment_; - } - - /** - * - * - *
-     * Required. The environment being operated.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The environment. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse.Environment getEnvironment() { - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment result = - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.forNumber(environment_); - return result == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.UNRECOGNIZED - : result; - } - - public static final int EXCLUDED_PREDEFINED_FUNCTIONS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList excludedPredefinedFunctions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the excludedPredefinedFunctions. - */ - public com.google.protobuf.ProtocolStringList getExcludedPredefinedFunctionsList() { - return excludedPredefinedFunctions_; - } - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of excludedPredefinedFunctions. - */ - public int getExcludedPredefinedFunctionsCount() { - return excludedPredefinedFunctions_.size(); - } - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The excludedPredefinedFunctions at the given index. - */ - public java.lang.String getExcludedPredefinedFunctions(int index) { - return excludedPredefinedFunctions_.get(index); - } - - /** - * - * - *
-     * Optional. By default, [predefined
-     * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-     * are included in the final model call. Some of them can be explicitly
-     * excluded from being automatically included. This can serve two purposes:
-     * 1. Using a more restricted / different action space.
-     * 2. Improving the definitions / instructions of predefined functions.
-     * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the excludedPredefinedFunctions at the given index. - */ - public com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index) { - return excludedPredefinedFunctions_.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 (environment_ - != com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.ENVIRONMENT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, environment_); - } - for (int i = 0; i < excludedPredefinedFunctions_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString( - output, 2, excludedPredefinedFunctions_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (environment_ - != com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.ENVIRONMENT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, environment_); - } - { - int dataSize = 0; - for (int i = 0; i < excludedPredefinedFunctions_.size(); i++) { - dataSize += computeStringSizeNoTag(excludedPredefinedFunctions_.getRaw(i)); - } - size += dataSize; - size += 1 * getExcludedPredefinedFunctionsList().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.vertexai.api.Tool.ComputerUse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Tool.ComputerUse other = - (com.google.cloud.vertexai.api.Tool.ComputerUse) obj; - - if (environment_ != other.environment_) return false; - if (!getExcludedPredefinedFunctionsList().equals(other.getExcludedPredefinedFunctionsList())) - 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) + ENVIRONMENT_FIELD_NUMBER; - hash = (53 * hash) + environment_; - if (getExcludedPredefinedFunctionsCount() > 0) { - hash = (37 * hash) + EXCLUDED_PREDEFINED_FUNCTIONS_FIELD_NUMBER; - hash = (53 * hash) + getExcludedPredefinedFunctionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse 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.vertexai.api.Tool.ComputerUse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse 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.vertexai.api.Tool.ComputerUse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Tool.ComputerUse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Tool to support computer use.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool.ComputerUse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Tool.ComputerUse) - com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.ComputerUse.class, - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Tool.ComputerUse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - environment_ = 0; - excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse build() { - com.google.cloud.vertexai.api.Tool.ComputerUse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse buildPartial() { - com.google.cloud.vertexai.api.Tool.ComputerUse result = - new com.google.cloud.vertexai.api.Tool.ComputerUse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.Tool.ComputerUse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.environment_ = environment_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - excludedPredefinedFunctions_.makeImmutable(); - result.excludedPredefinedFunctions_ = excludedPredefinedFunctions_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Tool.ComputerUse) { - return mergeFrom((com.google.cloud.vertexai.api.Tool.ComputerUse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Tool.ComputerUse other) { - if (other == com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance()) - return this; - if (other.environment_ != 0) { - setEnvironmentValue(other.getEnvironmentValue()); - } - if (!other.excludedPredefinedFunctions_.isEmpty()) { - if (excludedPredefinedFunctions_.isEmpty()) { - excludedPredefinedFunctions_ = other.excludedPredefinedFunctions_; - bitField0_ |= 0x00000002; - } else { - ensureExcludedPredefinedFunctionsIsMutable(); - excludedPredefinedFunctions_.addAll(other.excludedPredefinedFunctions_); - } - 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: - { - environment_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureExcludedPredefinedFunctionsIsMutable(); - excludedPredefinedFunctions_.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 int environment_ = 0; - - /** - * - * - *
-       * Required. The environment being operated.
-       * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for environment. - */ - @java.lang.Override - public int getEnvironmentValue() { - return environment_; - } - - /** - * - * - *
-       * Required. The environment being operated.
-       * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironmentValue(int value) { - environment_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The environment being operated.
-       * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The environment. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse.Environment getEnvironment() { - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment result = - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.forNumber(environment_); - return result == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.Environment.UNRECOGNIZED - : result; - } - - /** - * - * - *
-       * Required. The environment being operated.
-       * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The environment to set. - * @return This builder for chaining. - */ - public Builder setEnvironment( - com.google.cloud.vertexai.api.Tool.ComputerUse.Environment value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - environment_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-       * Required. The environment being operated.
-       * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse.Environment environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000001); - environment_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList excludedPredefinedFunctions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureExcludedPredefinedFunctionsIsMutable() { - if (!excludedPredefinedFunctions_.isModifiable()) { - excludedPredefinedFunctions_ = - new com.google.protobuf.LazyStringArrayList(excludedPredefinedFunctions_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the excludedPredefinedFunctions. - */ - public com.google.protobuf.ProtocolStringList getExcludedPredefinedFunctionsList() { - excludedPredefinedFunctions_.makeImmutable(); - return excludedPredefinedFunctions_; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of excludedPredefinedFunctions. - */ - public int getExcludedPredefinedFunctionsCount() { - return excludedPredefinedFunctions_.size(); - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The excludedPredefinedFunctions at the given index. - */ - public java.lang.String getExcludedPredefinedFunctions(int index) { - return excludedPredefinedFunctions_.get(index); - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the excludedPredefinedFunctions at the given index. - */ - public com.google.protobuf.ByteString getExcludedPredefinedFunctionsBytes(int index) { - return excludedPredefinedFunctions_.getByteString(index); - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The excludedPredefinedFunctions to set. - * @return This builder for chaining. - */ - public Builder setExcludedPredefinedFunctions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludedPredefinedFunctionsIsMutable(); - excludedPredefinedFunctions_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The excludedPredefinedFunctions to add. - * @return This builder for chaining. - */ - public Builder addExcludedPredefinedFunctions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludedPredefinedFunctionsIsMutable(); - excludedPredefinedFunctions_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The excludedPredefinedFunctions to add. - * @return This builder for chaining. - */ - public Builder addAllExcludedPredefinedFunctions( - java.lang.Iterable values) { - ensureExcludedPredefinedFunctionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, excludedPredefinedFunctions_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearExcludedPredefinedFunctions() { - excludedPredefinedFunctions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. By default, [predefined
-       * functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
-       * are included in the final model call. Some of them can be explicitly
-       * excluded from being automatically included. This can serve two purposes:
-       * 1. Using a more restricted / different action space.
-       * 2. Improving the definitions / instructions of predefined functions.
-       * 
- * - * - * repeated string excluded_predefined_functions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the excludedPredefinedFunctions to add. - * @return This builder for chaining. - */ - public Builder addExcludedPredefinedFunctionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExcludedPredefinedFunctionsIsMutable(); - excludedPredefinedFunctions_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Tool.ComputerUse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Tool.ComputerUse) - private static final com.google.cloud.vertexai.api.Tool.ComputerUse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Tool.ComputerUse(); - } - - public static com.google.cloud.vertexai.api.Tool.ComputerUse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ComputerUse 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.vertexai.api.Tool.ComputerUse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int FUNCTION_DECLARATIONS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List functionDeclarations_; - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getFunctionDeclarationsList() { - return functionDeclarations_; - } - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getFunctionDeclarationsOrBuilderList() { - return functionDeclarations_; - } - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getFunctionDeclarationsCount() { - return functionDeclarations_.size(); - } - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations(int index) { - return functionDeclarations_.get(index); - } - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder - getFunctionDeclarationsOrBuilder(int index) { - return functionDeclarations_.get(index); - } - - public static final int RETRIEVAL_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.Retrieval retrieval_; - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrieval field is set. - */ - @java.lang.Override - public boolean hasRetrieval() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrieval. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Retrieval getRetrieval() { - return retrieval_ == null - ? com.google.cloud.vertexai.api.Retrieval.getDefaultInstance() - : retrieval_; - } - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder() { - return retrieval_ == null - ? com.google.cloud.vertexai.api.Retrieval.getDefaultInstance() - : retrieval_; - } - - public static final int GOOGLE_SEARCH_FIELD_NUMBER = 7; - private com.google.cloud.vertexai.api.Tool.GoogleSearch googleSearch_; - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearch field is set. - */ - @java.lang.Override - public boolean hasGoogleSearch() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.GoogleSearch getGoogleSearch() { - return googleSearch_ == null - ? com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance() - : googleSearch_; - } - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder getGoogleSearchOrBuilder() { - return googleSearch_ == null - ? com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance() - : googleSearch_; - } - - public static final int GOOGLE_SEARCH_RETRIEVAL_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.GoogleSearchRetrieval googleSearchRetrieval_; - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearchRetrieval field is set. - */ - @java.lang.Override - public boolean hasGoogleSearchRetrieval() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchRetrieval. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleSearchRetrieval getGoogleSearchRetrieval() { - return googleSearchRetrieval_ == null - ? com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance() - : googleSearchRetrieval_; - } - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder - getGoogleSearchRetrievalOrBuilder() { - return googleSearchRetrieval_ == null - ? com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance() - : googleSearchRetrieval_; - } - - public static final int GOOGLE_MAPS_FIELD_NUMBER = 5; - private com.google.cloud.vertexai.api.GoogleMaps googleMaps_; - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleMaps field is set. - */ - @java.lang.Override - public boolean hasGoogleMaps() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleMaps. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleMaps getGoogleMaps() { - return googleMaps_ == null - ? com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance() - : googleMaps_; - } - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GoogleMapsOrBuilder getGoogleMapsOrBuilder() { - return googleMaps_ == null - ? com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance() - : googleMaps_; - } - - public static final int ENTERPRISE_WEB_SEARCH_FIELD_NUMBER = 6; - private com.google.cloud.vertexai.api.EnterpriseWebSearch enterpriseWebSearch_; - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the enterpriseWebSearch field is set. - */ - @java.lang.Override - public boolean hasEnterpriseWebSearch() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enterpriseWebSearch. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EnterpriseWebSearch getEnterpriseWebSearch() { - return enterpriseWebSearch_ == null - ? com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance() - : enterpriseWebSearch_; - } - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder - getEnterpriseWebSearchOrBuilder() { - return enterpriseWebSearch_ == null - ? com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance() - : enterpriseWebSearch_; - } - - public static final int CODE_EXECUTION_FIELD_NUMBER = 4; - private com.google.cloud.vertexai.api.Tool.CodeExecution codeExecution_; - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecution field is set. - */ - @java.lang.Override - public boolean hasCodeExecution() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecution. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.CodeExecution getCodeExecution() { - return codeExecution_ == null - ? com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance() - : codeExecution_; - } - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder getCodeExecutionOrBuilder() { - return codeExecution_ == null - ? com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance() - : codeExecution_; - } - - public static final int URL_CONTEXT_FIELD_NUMBER = 10; - private com.google.cloud.vertexai.api.UrlContext urlContext_; - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the urlContext field is set. - */ - @java.lang.Override - public boolean hasUrlContext() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The urlContext. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContext getUrlContext() { - return urlContext_ == null - ? com.google.cloud.vertexai.api.UrlContext.getDefaultInstance() - : urlContext_; - } - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextOrBuilder getUrlContextOrBuilder() { - return urlContext_ == null - ? com.google.cloud.vertexai.api.UrlContext.getDefaultInstance() - : urlContext_; - } - - public static final int COMPUTER_USE_FIELD_NUMBER = 11; - private com.google.cloud.vertexai.api.Tool.ComputerUse computerUse_; - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the computerUse field is set. - */ - @java.lang.Override - public boolean hasComputerUse() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The computerUse. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUse getComputerUse() { - return computerUse_ == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance() - : computerUse_; - } - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder getComputerUseOrBuilder() { - return computerUse_ == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance() - : computerUse_; - } - - 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 < functionDeclarations_.size(); i++) { - output.writeMessage(1, functionDeclarations_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getRetrieval()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(3, getGoogleSearchRetrieval()); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(4, getCodeExecution()); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(5, getGoogleMaps()); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(6, getEnterpriseWebSearch()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getGoogleSearch()); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(10, getUrlContext()); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeMessage(11, getComputerUse()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < functionDeclarations_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, functionDeclarations_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRetrieval()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGoogleSearchRetrieval()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCodeExecution()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getGoogleMaps()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEnterpriseWebSearch()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGoogleSearch()); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUrlContext()); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getComputerUse()); - } - 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.vertexai.api.Tool)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.Tool other = (com.google.cloud.vertexai.api.Tool) obj; - - if (!getFunctionDeclarationsList().equals(other.getFunctionDeclarationsList())) return false; - if (hasRetrieval() != other.hasRetrieval()) return false; - if (hasRetrieval()) { - if (!getRetrieval().equals(other.getRetrieval())) return false; - } - if (hasGoogleSearch() != other.hasGoogleSearch()) return false; - if (hasGoogleSearch()) { - if (!getGoogleSearch().equals(other.getGoogleSearch())) return false; - } - if (hasGoogleSearchRetrieval() != other.hasGoogleSearchRetrieval()) return false; - if (hasGoogleSearchRetrieval()) { - if (!getGoogleSearchRetrieval().equals(other.getGoogleSearchRetrieval())) return false; - } - if (hasGoogleMaps() != other.hasGoogleMaps()) return false; - if (hasGoogleMaps()) { - if (!getGoogleMaps().equals(other.getGoogleMaps())) return false; - } - if (hasEnterpriseWebSearch() != other.hasEnterpriseWebSearch()) return false; - if (hasEnterpriseWebSearch()) { - if (!getEnterpriseWebSearch().equals(other.getEnterpriseWebSearch())) return false; - } - if (hasCodeExecution() != other.hasCodeExecution()) return false; - if (hasCodeExecution()) { - if (!getCodeExecution().equals(other.getCodeExecution())) return false; - } - if (hasUrlContext() != other.hasUrlContext()) return false; - if (hasUrlContext()) { - if (!getUrlContext().equals(other.getUrlContext())) return false; - } - if (hasComputerUse() != other.hasComputerUse()) return false; - if (hasComputerUse()) { - if (!getComputerUse().equals(other.getComputerUse())) 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 (getFunctionDeclarationsCount() > 0) { - hash = (37 * hash) + FUNCTION_DECLARATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFunctionDeclarationsList().hashCode(); - } - if (hasRetrieval()) { - hash = (37 * hash) + RETRIEVAL_FIELD_NUMBER; - hash = (53 * hash) + getRetrieval().hashCode(); - } - if (hasGoogleSearch()) { - hash = (37 * hash) + GOOGLE_SEARCH_FIELD_NUMBER; - hash = (53 * hash) + getGoogleSearch().hashCode(); - } - if (hasGoogleSearchRetrieval()) { - hash = (37 * hash) + GOOGLE_SEARCH_RETRIEVAL_FIELD_NUMBER; - hash = (53 * hash) + getGoogleSearchRetrieval().hashCode(); - } - if (hasGoogleMaps()) { - hash = (37 * hash) + GOOGLE_MAPS_FIELD_NUMBER; - hash = (53 * hash) + getGoogleMaps().hashCode(); - } - if (hasEnterpriseWebSearch()) { - hash = (37 * hash) + ENTERPRISE_WEB_SEARCH_FIELD_NUMBER; - hash = (53 * hash) + getEnterpriseWebSearch().hashCode(); - } - if (hasCodeExecution()) { - hash = (37 * hash) + CODE_EXECUTION_FIELD_NUMBER; - hash = (53 * hash) + getCodeExecution().hashCode(); - } - if (hasUrlContext()) { - hash = (37 * hash) + URL_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getUrlContext().hashCode(); - } - if (hasComputerUse()) { - hash = (37 * hash) + COMPUTER_USE_FIELD_NUMBER; - hash = (53 * hash) + getComputerUse().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.Tool parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool 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.vertexai.api.Tool parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool 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.vertexai.api.Tool parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.Tool parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.Tool parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.Tool parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.Tool 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool details that the model may use to generate response.
-   *
-   * A `Tool` is a piece of code that enables the system to interact with
-   * external systems to perform an action, or set of actions, outside of
-   * knowledge and scope of the model. A Tool object should contain exactly
-   * one type of Tool (e.g FunctionDeclaration, Retrieval or
-   * GoogleSearchRetrieval).
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.Tool} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.Tool) - com.google.cloud.vertexai.api.ToolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.Tool.class, - com.google.cloud.vertexai.api.Tool.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.Tool.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetFunctionDeclarationsFieldBuilder(); - internalGetRetrievalFieldBuilder(); - internalGetGoogleSearchFieldBuilder(); - internalGetGoogleSearchRetrievalFieldBuilder(); - internalGetGoogleMapsFieldBuilder(); - internalGetEnterpriseWebSearchFieldBuilder(); - internalGetCodeExecutionFieldBuilder(); - internalGetUrlContextFieldBuilder(); - internalGetComputerUseFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (functionDeclarationsBuilder_ == null) { - functionDeclarations_ = java.util.Collections.emptyList(); - } else { - functionDeclarations_ = null; - functionDeclarationsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - retrieval_ = null; - if (retrievalBuilder_ != null) { - retrievalBuilder_.dispose(); - retrievalBuilder_ = null; - } - googleSearch_ = null; - if (googleSearchBuilder_ != null) { - googleSearchBuilder_.dispose(); - googleSearchBuilder_ = null; - } - googleSearchRetrieval_ = null; - if (googleSearchRetrievalBuilder_ != null) { - googleSearchRetrievalBuilder_.dispose(); - googleSearchRetrievalBuilder_ = null; - } - googleMaps_ = null; - if (googleMapsBuilder_ != null) { - googleMapsBuilder_.dispose(); - googleMapsBuilder_ = null; - } - enterpriseWebSearch_ = null; - if (enterpriseWebSearchBuilder_ != null) { - enterpriseWebSearchBuilder_.dispose(); - enterpriseWebSearchBuilder_ = null; - } - codeExecution_ = null; - if (codeExecutionBuilder_ != null) { - codeExecutionBuilder_.dispose(); - codeExecutionBuilder_ = null; - } - urlContext_ = null; - if (urlContextBuilder_ != null) { - urlContextBuilder_.dispose(); - urlContextBuilder_ = null; - } - computerUse_ = null; - if (computerUseBuilder_ != null) { - computerUseBuilder_.dispose(); - computerUseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_Tool_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.Tool.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool build() { - com.google.cloud.vertexai.api.Tool result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.Tool buildPartial() { - com.google.cloud.vertexai.api.Tool result = new com.google.cloud.vertexai.api.Tool(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Tool result) { - if (functionDeclarationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - functionDeclarations_ = java.util.Collections.unmodifiableList(functionDeclarations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.functionDeclarations_ = functionDeclarations_; - } else { - result.functionDeclarations_ = functionDeclarationsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.Tool result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.retrieval_ = retrievalBuilder_ == null ? retrieval_ : retrievalBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.googleSearch_ = - googleSearchBuilder_ == null ? googleSearch_ : googleSearchBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.googleSearchRetrieval_ = - googleSearchRetrievalBuilder_ == null - ? googleSearchRetrieval_ - : googleSearchRetrievalBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.googleMaps_ = googleMapsBuilder_ == null ? googleMaps_ : googleMapsBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.enterpriseWebSearch_ = - enterpriseWebSearchBuilder_ == null - ? enterpriseWebSearch_ - : enterpriseWebSearchBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.codeExecution_ = - codeExecutionBuilder_ == null ? codeExecution_ : codeExecutionBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.urlContext_ = urlContextBuilder_ == null ? urlContext_ : urlContextBuilder_.build(); - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.computerUse_ = - computerUseBuilder_ == null ? computerUse_ : computerUseBuilder_.build(); - to_bitField0_ |= 0x00000080; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.Tool) { - return mergeFrom((com.google.cloud.vertexai.api.Tool) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.Tool other) { - if (other == com.google.cloud.vertexai.api.Tool.getDefaultInstance()) return this; - if (functionDeclarationsBuilder_ == null) { - if (!other.functionDeclarations_.isEmpty()) { - if (functionDeclarations_.isEmpty()) { - functionDeclarations_ = other.functionDeclarations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.addAll(other.functionDeclarations_); - } - onChanged(); - } - } else { - if (!other.functionDeclarations_.isEmpty()) { - if (functionDeclarationsBuilder_.isEmpty()) { - functionDeclarationsBuilder_.dispose(); - functionDeclarationsBuilder_ = null; - functionDeclarations_ = other.functionDeclarations_; - bitField0_ = (bitField0_ & ~0x00000001); - functionDeclarationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetFunctionDeclarationsFieldBuilder() - : null; - } else { - functionDeclarationsBuilder_.addAllMessages(other.functionDeclarations_); - } - } - } - if (other.hasRetrieval()) { - mergeRetrieval(other.getRetrieval()); - } - if (other.hasGoogleSearch()) { - mergeGoogleSearch(other.getGoogleSearch()); - } - if (other.hasGoogleSearchRetrieval()) { - mergeGoogleSearchRetrieval(other.getGoogleSearchRetrieval()); - } - if (other.hasGoogleMaps()) { - mergeGoogleMaps(other.getGoogleMaps()); - } - if (other.hasEnterpriseWebSearch()) { - mergeEnterpriseWebSearch(other.getEnterpriseWebSearch()); - } - if (other.hasCodeExecution()) { - mergeCodeExecution(other.getCodeExecution()); - } - if (other.hasUrlContext()) { - mergeUrlContext(other.getUrlContext()); - } - if (other.hasComputerUse()) { - mergeComputerUse(other.getComputerUse()); - } - 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.vertexai.api.FunctionDeclaration m = - input.readMessage( - com.google.cloud.vertexai.api.FunctionDeclaration.parser(), - extensionRegistry); - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.add(m); - } else { - functionDeclarationsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetRetrievalFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetGoogleSearchRetrievalFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetCodeExecutionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetGoogleMapsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetEnterpriseWebSearchFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetGoogleSearchFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 58 - case 82: - { - input.readMessage( - internalGetUrlContextFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 82 - case 90: - { - input.readMessage( - internalGetComputerUseFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 90 - 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 - functionDeclarations_ = java.util.Collections.emptyList(); - - private void ensureFunctionDeclarationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - functionDeclarations_ = - new java.util.ArrayList( - functionDeclarations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionDeclaration, - com.google.cloud.vertexai.api.FunctionDeclaration.Builder, - com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder> - functionDeclarationsBuilder_; - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getFunctionDeclarationsList() { - if (functionDeclarationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(functionDeclarations_); - } else { - return functionDeclarationsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getFunctionDeclarationsCount() { - if (functionDeclarationsBuilder_ == null) { - return functionDeclarations_.size(); - } else { - return functionDeclarationsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations(int index) { - if (functionDeclarationsBuilder_ == null) { - return functionDeclarations_.get(index); - } else { - return functionDeclarationsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionDeclarations( - int index, com.google.cloud.vertexai.api.FunctionDeclaration value) { - if (functionDeclarationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.set(index, value); - onChanged(); - } else { - functionDeclarationsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionDeclarations( - int index, com.google.cloud.vertexai.api.FunctionDeclaration.Builder builderForValue) { - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.set(index, builderForValue.build()); - onChanged(); - } else { - functionDeclarationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addFunctionDeclarations( - com.google.cloud.vertexai.api.FunctionDeclaration value) { - if (functionDeclarationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.add(value); - onChanged(); - } else { - functionDeclarationsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addFunctionDeclarations( - int index, com.google.cloud.vertexai.api.FunctionDeclaration value) { - if (functionDeclarationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.add(index, value); - onChanged(); - } else { - functionDeclarationsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addFunctionDeclarations( - com.google.cloud.vertexai.api.FunctionDeclaration.Builder builderForValue) { - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.add(builderForValue.build()); - onChanged(); - } else { - functionDeclarationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addFunctionDeclarations( - int index, com.google.cloud.vertexai.api.FunctionDeclaration.Builder builderForValue) { - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.add(index, builderForValue.build()); - onChanged(); - } else { - functionDeclarationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllFunctionDeclarations( - java.lang.Iterable values) { - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, functionDeclarations_); - onChanged(); - } else { - functionDeclarationsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFunctionDeclarations() { - if (functionDeclarationsBuilder_ == null) { - functionDeclarations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - functionDeclarationsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeFunctionDeclarations(int index) { - if (functionDeclarationsBuilder_ == null) { - ensureFunctionDeclarationsIsMutable(); - functionDeclarations_.remove(index); - onChanged(); - } else { - functionDeclarationsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionDeclaration.Builder getFunctionDeclarationsBuilder( - int index) { - return internalGetFunctionDeclarationsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder - getFunctionDeclarationsOrBuilder(int index) { - if (functionDeclarationsBuilder_ == null) { - return functionDeclarations_.get(index); - } else { - return functionDeclarationsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getFunctionDeclarationsOrBuilderList() { - if (functionDeclarationsBuilder_ != null) { - return functionDeclarationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(functionDeclarations_); - } - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionDeclaration.Builder - addFunctionDeclarationsBuilder() { - return internalGetFunctionDeclarationsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.FunctionDeclaration.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionDeclaration.Builder addFunctionDeclarationsBuilder( - int index) { - return internalGetFunctionDeclarationsFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.FunctionDeclaration.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. Function tool type.
-     * One or more function declarations to be passed to the model along with the
-     * current user query. Model may decide to call a subset of these functions
-     * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-     * in the response. User should provide a
-     * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-     * each function call in the next turn. Based on the function responses, Model
-     * will generate the final response back to the user. Maximum 128 function
-     * declarations can be provided.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getFunctionDeclarationsBuilderList() { - return internalGetFunctionDeclarationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionDeclaration, - com.google.cloud.vertexai.api.FunctionDeclaration.Builder, - com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder> - internalGetFunctionDeclarationsFieldBuilder() { - if (functionDeclarationsBuilder_ == null) { - functionDeclarationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.FunctionDeclaration, - com.google.cloud.vertexai.api.FunctionDeclaration.Builder, - com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder>( - functionDeclarations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - functionDeclarations_ = null; - } - return functionDeclarationsBuilder_; - } - - private com.google.cloud.vertexai.api.Retrieval retrieval_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Retrieval, - com.google.cloud.vertexai.api.Retrieval.Builder, - com.google.cloud.vertexai.api.RetrievalOrBuilder> - retrievalBuilder_; - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrieval field is set. - */ - public boolean hasRetrieval() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrieval. - */ - public com.google.cloud.vertexai.api.Retrieval getRetrieval() { - if (retrievalBuilder_ == null) { - return retrieval_ == null - ? com.google.cloud.vertexai.api.Retrieval.getDefaultInstance() - : retrieval_; - } else { - return retrievalBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRetrieval(com.google.cloud.vertexai.api.Retrieval value) { - if (retrievalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retrieval_ = value; - } else { - retrievalBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRetrieval(com.google.cloud.vertexai.api.Retrieval.Builder builderForValue) { - if (retrievalBuilder_ == null) { - retrieval_ = builderForValue.build(); - } else { - retrievalBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRetrieval(com.google.cloud.vertexai.api.Retrieval value) { - if (retrievalBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && retrieval_ != null - && retrieval_ != com.google.cloud.vertexai.api.Retrieval.getDefaultInstance()) { - getRetrievalBuilder().mergeFrom(value); - } else { - retrieval_ = value; - } - } else { - retrievalBuilder_.mergeFrom(value); - } - if (retrieval_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRetrieval() { - bitField0_ = (bitField0_ & ~0x00000002); - retrieval_ = null; - if (retrievalBuilder_ != null) { - retrievalBuilder_.dispose(); - retrievalBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Retrieval.Builder getRetrievalBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetRetrievalFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder() { - if (retrievalBuilder_ != null) { - return retrievalBuilder_.getMessageOrBuilder(); - } else { - return retrieval_ == null - ? com.google.cloud.vertexai.api.Retrieval.getDefaultInstance() - : retrieval_; - } - } - - /** - * - * - *
-     * Optional. Retrieval tool type.
-     * System will always execute the provided retrieval tool(s) to get external
-     * knowledge to answer the prompt. Retrieval results are presented to the
-     * model for generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Retrieval, - com.google.cloud.vertexai.api.Retrieval.Builder, - com.google.cloud.vertexai.api.RetrievalOrBuilder> - internalGetRetrievalFieldBuilder() { - if (retrievalBuilder_ == null) { - retrievalBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Retrieval, - com.google.cloud.vertexai.api.Retrieval.Builder, - com.google.cloud.vertexai.api.RetrievalOrBuilder>( - getRetrieval(), getParentForChildren(), isClean()); - retrieval_ = null; - } - return retrievalBuilder_; - } - - private com.google.cloud.vertexai.api.Tool.GoogleSearch googleSearch_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.GoogleSearch, - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder, - com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder> - googleSearchBuilder_; - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearch field is set. - */ - public boolean hasGoogleSearch() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearch. - */ - public com.google.cloud.vertexai.api.Tool.GoogleSearch getGoogleSearch() { - if (googleSearchBuilder_ == null) { - return googleSearch_ == null - ? com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance() - : googleSearch_; - } else { - return googleSearchBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleSearch(com.google.cloud.vertexai.api.Tool.GoogleSearch value) { - if (googleSearchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - googleSearch_ = value; - } else { - googleSearchBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleSearch( - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder builderForValue) { - if (googleSearchBuilder_ == null) { - googleSearch_ = builderForValue.build(); - } else { - googleSearchBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGoogleSearch(com.google.cloud.vertexai.api.Tool.GoogleSearch value) { - if (googleSearchBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && googleSearch_ != null - && googleSearch_ - != com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance()) { - getGoogleSearchBuilder().mergeFrom(value); - } else { - googleSearch_ = value; - } - } else { - googleSearchBuilder_.mergeFrom(value); - } - if (googleSearch_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGoogleSearch() { - bitField0_ = (bitField0_ & ~0x00000004); - googleSearch_ = null; - if (googleSearchBuilder_ != null) { - googleSearchBuilder_.dispose(); - googleSearchBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder getGoogleSearchBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetGoogleSearchFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder getGoogleSearchOrBuilder() { - if (googleSearchBuilder_ != null) { - return googleSearchBuilder_.getMessageOrBuilder(); - } else { - return googleSearch_ == null - ? com.google.cloud.vertexai.api.Tool.GoogleSearch.getDefaultInstance() - : googleSearch_; - } - } - - /** - * - * - *
-     * Optional. GoogleSearch tool type.
-     * Tool to support Google Search in Model. Powered by Google.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.GoogleSearch, - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder, - com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder> - internalGetGoogleSearchFieldBuilder() { - if (googleSearchBuilder_ == null) { - googleSearchBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.GoogleSearch, - com.google.cloud.vertexai.api.Tool.GoogleSearch.Builder, - com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder>( - getGoogleSearch(), getParentForChildren(), isClean()); - googleSearch_ = null; - } - return googleSearchBuilder_; - } - - private com.google.cloud.vertexai.api.GoogleSearchRetrieval googleSearchRetrieval_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleSearchRetrieval, - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder, - com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder> - googleSearchRetrievalBuilder_; - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearchRetrieval field is set. - */ - public boolean hasGoogleSearchRetrieval() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchRetrieval. - */ - public com.google.cloud.vertexai.api.GoogleSearchRetrieval getGoogleSearchRetrieval() { - if (googleSearchRetrievalBuilder_ == null) { - return googleSearchRetrieval_ == null - ? com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance() - : googleSearchRetrieval_; - } else { - return googleSearchRetrievalBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleSearchRetrieval( - com.google.cloud.vertexai.api.GoogleSearchRetrieval value) { - if (googleSearchRetrievalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - googleSearchRetrieval_ = value; - } else { - googleSearchRetrievalBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleSearchRetrieval( - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder builderForValue) { - if (googleSearchRetrievalBuilder_ == null) { - googleSearchRetrieval_ = builderForValue.build(); - } else { - googleSearchRetrievalBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGoogleSearchRetrieval( - com.google.cloud.vertexai.api.GoogleSearchRetrieval value) { - if (googleSearchRetrievalBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && googleSearchRetrieval_ != null - && googleSearchRetrieval_ - != com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance()) { - getGoogleSearchRetrievalBuilder().mergeFrom(value); - } else { - googleSearchRetrieval_ = value; - } - } else { - googleSearchRetrievalBuilder_.mergeFrom(value); - } - if (googleSearchRetrieval_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGoogleSearchRetrieval() { - bitField0_ = (bitField0_ & ~0x00000008); - googleSearchRetrieval_ = null; - if (googleSearchRetrievalBuilder_ != null) { - googleSearchRetrievalBuilder_.dispose(); - googleSearchRetrievalBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder - getGoogleSearchRetrievalBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetGoogleSearchRetrievalFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder - getGoogleSearchRetrievalOrBuilder() { - if (googleSearchRetrievalBuilder_ != null) { - return googleSearchRetrievalBuilder_.getMessageOrBuilder(); - } else { - return googleSearchRetrieval_ == null - ? com.google.cloud.vertexai.api.GoogleSearchRetrieval.getDefaultInstance() - : googleSearchRetrieval_; - } - } - - /** - * - * - *
-     * Optional. GoogleSearchRetrieval tool type.
-     * Specialized retrieval tool that is powered by Google search.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleSearchRetrieval, - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder, - com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder> - internalGetGoogleSearchRetrievalFieldBuilder() { - if (googleSearchRetrievalBuilder_ == null) { - googleSearchRetrievalBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleSearchRetrieval, - com.google.cloud.vertexai.api.GoogleSearchRetrieval.Builder, - com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder>( - getGoogleSearchRetrieval(), getParentForChildren(), isClean()); - googleSearchRetrieval_ = null; - } - return googleSearchRetrievalBuilder_; - } - - private com.google.cloud.vertexai.api.GoogleMaps googleMaps_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleMaps, - com.google.cloud.vertexai.api.GoogleMaps.Builder, - com.google.cloud.vertexai.api.GoogleMapsOrBuilder> - googleMapsBuilder_; - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleMaps field is set. - */ - public boolean hasGoogleMaps() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleMaps. - */ - public com.google.cloud.vertexai.api.GoogleMaps getGoogleMaps() { - if (googleMapsBuilder_ == null) { - return googleMaps_ == null - ? com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance() - : googleMaps_; - } else { - return googleMapsBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleMaps(com.google.cloud.vertexai.api.GoogleMaps value) { - if (googleMapsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - googleMaps_ = value; - } else { - googleMapsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGoogleMaps(com.google.cloud.vertexai.api.GoogleMaps.Builder builderForValue) { - if (googleMapsBuilder_ == null) { - googleMaps_ = builderForValue.build(); - } else { - googleMapsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGoogleMaps(com.google.cloud.vertexai.api.GoogleMaps value) { - if (googleMapsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && googleMaps_ != null - && googleMaps_ != com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance()) { - getGoogleMapsBuilder().mergeFrom(value); - } else { - googleMaps_ = value; - } - } else { - googleMapsBuilder_.mergeFrom(value); - } - if (googleMaps_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGoogleMaps() { - bitField0_ = (bitField0_ & ~0x00000010); - googleMaps_ = null; - if (googleMapsBuilder_ != null) { - googleMapsBuilder_.dispose(); - googleMapsBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GoogleMaps.Builder getGoogleMapsBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetGoogleMapsFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.GoogleMapsOrBuilder getGoogleMapsOrBuilder() { - if (googleMapsBuilder_ != null) { - return googleMapsBuilder_.getMessageOrBuilder(); - } else { - return googleMaps_ == null - ? com.google.cloud.vertexai.api.GoogleMaps.getDefaultInstance() - : googleMaps_; - } - } - - /** - * - * - *
-     * Optional. GoogleMaps tool type.
-     * Tool to support Google Maps in Model.
-     * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleMaps, - com.google.cloud.vertexai.api.GoogleMaps.Builder, - com.google.cloud.vertexai.api.GoogleMapsOrBuilder> - internalGetGoogleMapsFieldBuilder() { - if (googleMapsBuilder_ == null) { - googleMapsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GoogleMaps, - com.google.cloud.vertexai.api.GoogleMaps.Builder, - com.google.cloud.vertexai.api.GoogleMapsOrBuilder>( - getGoogleMaps(), getParentForChildren(), isClean()); - googleMaps_ = null; - } - return googleMapsBuilder_; - } - - private com.google.cloud.vertexai.api.EnterpriseWebSearch enterpriseWebSearch_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EnterpriseWebSearch, - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder, - com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder> - enterpriseWebSearchBuilder_; - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the enterpriseWebSearch field is set. - */ - public boolean hasEnterpriseWebSearch() { - return ((bitField0_ & 0x00000020) != 0); - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enterpriseWebSearch. - */ - public com.google.cloud.vertexai.api.EnterpriseWebSearch getEnterpriseWebSearch() { - if (enterpriseWebSearchBuilder_ == null) { - return enterpriseWebSearch_ == null - ? com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance() - : enterpriseWebSearch_; - } else { - return enterpriseWebSearchBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEnterpriseWebSearch(com.google.cloud.vertexai.api.EnterpriseWebSearch value) { - if (enterpriseWebSearchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - enterpriseWebSearch_ = value; - } else { - enterpriseWebSearchBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEnterpriseWebSearch( - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder builderForValue) { - if (enterpriseWebSearchBuilder_ == null) { - enterpriseWebSearch_ = builderForValue.build(); - } else { - enterpriseWebSearchBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEnterpriseWebSearch( - com.google.cloud.vertexai.api.EnterpriseWebSearch value) { - if (enterpriseWebSearchBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && enterpriseWebSearch_ != null - && enterpriseWebSearch_ - != com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance()) { - getEnterpriseWebSearchBuilder().mergeFrom(value); - } else { - enterpriseWebSearch_ = value; - } - } else { - enterpriseWebSearchBuilder_.mergeFrom(value); - } - if (enterpriseWebSearch_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEnterpriseWebSearch() { - bitField0_ = (bitField0_ & ~0x00000020); - enterpriseWebSearch_ = null; - if (enterpriseWebSearchBuilder_ != null) { - enterpriseWebSearchBuilder_.dispose(); - enterpriseWebSearchBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder - getEnterpriseWebSearchBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetEnterpriseWebSearchFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder - getEnterpriseWebSearchOrBuilder() { - if (enterpriseWebSearchBuilder_ != null) { - return enterpriseWebSearchBuilder_.getMessageOrBuilder(); - } else { - return enterpriseWebSearch_ == null - ? com.google.cloud.vertexai.api.EnterpriseWebSearch.getDefaultInstance() - : enterpriseWebSearch_; - } - } - - /** - * - * - *
-     * Optional. Tool to support searching public web data, powered by Vertex AI
-     * Search and Sec4 compliance.
-     * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EnterpriseWebSearch, - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder, - com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder> - internalGetEnterpriseWebSearchFieldBuilder() { - if (enterpriseWebSearchBuilder_ == null) { - enterpriseWebSearchBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.EnterpriseWebSearch, - com.google.cloud.vertexai.api.EnterpriseWebSearch.Builder, - com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder>( - getEnterpriseWebSearch(), getParentForChildren(), isClean()); - enterpriseWebSearch_ = null; - } - return enterpriseWebSearchBuilder_; - } - - private com.google.cloud.vertexai.api.Tool.CodeExecution codeExecution_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.CodeExecution, - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder, - com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder> - codeExecutionBuilder_; - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecution field is set. - */ - public boolean hasCodeExecution() { - return ((bitField0_ & 0x00000040) != 0); - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecution. - */ - public com.google.cloud.vertexai.api.Tool.CodeExecution getCodeExecution() { - if (codeExecutionBuilder_ == null) { - return codeExecution_ == null - ? com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance() - : codeExecution_; - } else { - return codeExecutionBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCodeExecution(com.google.cloud.vertexai.api.Tool.CodeExecution value) { - if (codeExecutionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - codeExecution_ = value; - } else { - codeExecutionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCodeExecution( - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder builderForValue) { - if (codeExecutionBuilder_ == null) { - codeExecution_ = builderForValue.build(); - } else { - codeExecutionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeCodeExecution(com.google.cloud.vertexai.api.Tool.CodeExecution value) { - if (codeExecutionBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && codeExecution_ != null - && codeExecution_ - != com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance()) { - getCodeExecutionBuilder().mergeFrom(value); - } else { - codeExecution_ = value; - } - } else { - codeExecutionBuilder_.mergeFrom(value); - } - if (codeExecution_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearCodeExecution() { - bitField0_ = (bitField0_ & ~0x00000040); - codeExecution_ = null; - if (codeExecutionBuilder_ != null) { - codeExecutionBuilder_.dispose(); - codeExecutionBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.CodeExecution.Builder getCodeExecutionBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetCodeExecutionFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder getCodeExecutionOrBuilder() { - if (codeExecutionBuilder_ != null) { - return codeExecutionBuilder_.getMessageOrBuilder(); - } else { - return codeExecution_ == null - ? com.google.cloud.vertexai.api.Tool.CodeExecution.getDefaultInstance() - : codeExecution_; - } - } - - /** - * - * - *
-     * Optional. CodeExecution tool type.
-     * Enables the model to execute code as part of generation.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.CodeExecution, - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder, - com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder> - internalGetCodeExecutionFieldBuilder() { - if (codeExecutionBuilder_ == null) { - codeExecutionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.CodeExecution, - com.google.cloud.vertexai.api.Tool.CodeExecution.Builder, - com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder>( - getCodeExecution(), getParentForChildren(), isClean()); - codeExecution_ = null; - } - return codeExecutionBuilder_; - } - - private com.google.cloud.vertexai.api.UrlContext urlContext_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContext, - com.google.cloud.vertexai.api.UrlContext.Builder, - com.google.cloud.vertexai.api.UrlContextOrBuilder> - urlContextBuilder_; - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the urlContext field is set. - */ - public boolean hasUrlContext() { - return ((bitField0_ & 0x00000080) != 0); - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The urlContext. - */ - public com.google.cloud.vertexai.api.UrlContext getUrlContext() { - if (urlContextBuilder_ == null) { - return urlContext_ == null - ? com.google.cloud.vertexai.api.UrlContext.getDefaultInstance() - : urlContext_; - } else { - return urlContextBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setUrlContext(com.google.cloud.vertexai.api.UrlContext value) { - if (urlContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - urlContext_ = value; - } else { - urlContextBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setUrlContext(com.google.cloud.vertexai.api.UrlContext.Builder builderForValue) { - if (urlContextBuilder_ == null) { - urlContext_ = builderForValue.build(); - } else { - urlContextBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeUrlContext(com.google.cloud.vertexai.api.UrlContext value) { - if (urlContextBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && urlContext_ != null - && urlContext_ != com.google.cloud.vertexai.api.UrlContext.getDefaultInstance()) { - getUrlContextBuilder().mergeFrom(value); - } else { - urlContext_ = value; - } - } else { - urlContextBuilder_.mergeFrom(value); - } - if (urlContext_ != null) { - bitField0_ |= 0x00000080; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearUrlContext() { - bitField0_ = (bitField0_ & ~0x00000080); - urlContext_ = null; - if (urlContextBuilder_ != null) { - urlContextBuilder_.dispose(); - urlContextBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.UrlContext.Builder getUrlContextBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return internalGetUrlContextFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.UrlContextOrBuilder getUrlContextOrBuilder() { - if (urlContextBuilder_ != null) { - return urlContextBuilder_.getMessageOrBuilder(); - } else { - return urlContext_ == null - ? com.google.cloud.vertexai.api.UrlContext.getDefaultInstance() - : urlContext_; - } - } - - /** - * - * - *
-     * Optional. Tool to support URL context retrieval.
-     * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContext, - com.google.cloud.vertexai.api.UrlContext.Builder, - com.google.cloud.vertexai.api.UrlContextOrBuilder> - internalGetUrlContextFieldBuilder() { - if (urlContextBuilder_ == null) { - urlContextBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.UrlContext, - com.google.cloud.vertexai.api.UrlContext.Builder, - com.google.cloud.vertexai.api.UrlContextOrBuilder>( - getUrlContext(), getParentForChildren(), isClean()); - urlContext_ = null; - } - return urlContextBuilder_; - } - - private com.google.cloud.vertexai.api.Tool.ComputerUse computerUse_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.ComputerUse, - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder, - com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder> - computerUseBuilder_; - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the computerUse field is set. - */ - public boolean hasComputerUse() { - return ((bitField0_ & 0x00000100) != 0); - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The computerUse. - */ - public com.google.cloud.vertexai.api.Tool.ComputerUse getComputerUse() { - if (computerUseBuilder_ == null) { - return computerUse_ == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance() - : computerUse_; - } else { - return computerUseBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setComputerUse(com.google.cloud.vertexai.api.Tool.ComputerUse value) { - if (computerUseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - computerUse_ = value; - } else { - computerUseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setComputerUse( - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder builderForValue) { - if (computerUseBuilder_ == null) { - computerUse_ = builderForValue.build(); - } else { - computerUseBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeComputerUse(com.google.cloud.vertexai.api.Tool.ComputerUse value) { - if (computerUseBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && computerUse_ != null - && computerUse_ - != com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance()) { - getComputerUseBuilder().mergeFrom(value); - } else { - computerUse_ = value; - } - } else { - computerUseBuilder_.mergeFrom(value); - } - if (computerUse_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearComputerUse() { - bitField0_ = (bitField0_ & ~0x00000100); - computerUse_ = null; - if (computerUseBuilder_ != null) { - computerUseBuilder_.dispose(); - computerUseBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.ComputerUse.Builder getComputerUseBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetComputerUseFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder getComputerUseOrBuilder() { - if (computerUseBuilder_ != null) { - return computerUseBuilder_.getMessageOrBuilder(); - } else { - return computerUse_ == null - ? com.google.cloud.vertexai.api.Tool.ComputerUse.getDefaultInstance() - : computerUse_; - } - } - - /** - * - * - *
-     * Optional. Tool to support the model interacting directly with the computer.
-     * If enabled, it automatically populates computer-use specific Function
-     * Declarations.
-     * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.ComputerUse, - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder, - com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder> - internalGetComputerUseFieldBuilder() { - if (computerUseBuilder_ == null) { - computerUseBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Tool.ComputerUse, - com.google.cloud.vertexai.api.Tool.ComputerUse.Builder, - com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder>( - getComputerUse(), getParentForChildren(), isClean()); - computerUse_ = null; - } - return computerUseBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.Tool) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.Tool) - private static final com.google.cloud.vertexai.api.Tool DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.Tool(); - } - - public static com.google.cloud.vertexai.api.Tool getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Tool 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.vertexai.api.Tool getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfig.java deleted file mode 100644 index 85ade37f8f7a..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfig.java +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool config. This config is shared for all tools provided in the request.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ToolConfig} - */ -@com.google.protobuf.Generated -public final class ToolConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.ToolConfig) - ToolConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ToolConfig"); - } - - // Use ToolConfig.newBuilder() to construct. - private ToolConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ToolConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ToolConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ToolConfig.class, - com.google.cloud.vertexai.api.ToolConfig.Builder.class); - } - - private int bitField0_; - public static final int FUNCTION_CALLING_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.FunctionCallingConfig functionCallingConfig_; - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCallingConfig field is set. - */ - @java.lang.Override - public boolean hasFunctionCallingConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCallingConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfig getFunctionCallingConfig() { - return functionCallingConfig_ == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance() - : functionCallingConfig_; - } - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder - getFunctionCallingConfigOrBuilder() { - return functionCallingConfig_ == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance() - : functionCallingConfig_; - } - - public static final int RETRIEVAL_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.RetrievalConfig retrievalConfig_; - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrievalConfig field is set. - */ - @java.lang.Override - public boolean hasRetrievalConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrievalConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalConfig getRetrievalConfig() { - return retrievalConfig_ == null - ? com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance() - : retrievalConfig_; - } - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RetrievalConfigOrBuilder getRetrievalConfigOrBuilder() { - return retrievalConfig_ == null - ? com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance() - : retrievalConfig_; - } - - 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.writeMessage(1, getFunctionCallingConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getRetrievalConfig()); - } - 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.computeMessageSize(1, getFunctionCallingConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRetrievalConfig()); - } - 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.vertexai.api.ToolConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.ToolConfig other = (com.google.cloud.vertexai.api.ToolConfig) obj; - - if (hasFunctionCallingConfig() != other.hasFunctionCallingConfig()) return false; - if (hasFunctionCallingConfig()) { - if (!getFunctionCallingConfig().equals(other.getFunctionCallingConfig())) return false; - } - if (hasRetrievalConfig() != other.hasRetrievalConfig()) return false; - if (hasRetrievalConfig()) { - if (!getRetrievalConfig().equals(other.getRetrievalConfig())) 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 (hasFunctionCallingConfig()) { - hash = (37 * hash) + FUNCTION_CALLING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getFunctionCallingConfig().hashCode(); - } - if (hasRetrievalConfig()) { - hash = (37 * hash) + RETRIEVAL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRetrievalConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ToolConfig 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.vertexai.api.ToolConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ToolConfig 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.vertexai.api.ToolConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.ToolConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.ToolConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool config. This config is shared for all tools provided in the request.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.ToolConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.ToolConfig) - com.google.cloud.vertexai.api.ToolConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ToolConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.ToolConfig.class, - com.google.cloud.vertexai.api.ToolConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.ToolConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetFunctionCallingConfigFieldBuilder(); - internalGetRetrievalConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - functionCallingConfig_ = null; - if (functionCallingConfigBuilder_ != null) { - functionCallingConfigBuilder_.dispose(); - functionCallingConfigBuilder_ = null; - } - retrievalConfig_ = null; - if (retrievalConfigBuilder_ != null) { - retrievalConfigBuilder_.dispose(); - retrievalConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfig build() { - com.google.cloud.vertexai.api.ToolConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.ToolConfig buildPartial() { - com.google.cloud.vertexai.api.ToolConfig result = - new com.google.cloud.vertexai.api.ToolConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.ToolConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.functionCallingConfig_ = - functionCallingConfigBuilder_ == null - ? functionCallingConfig_ - : functionCallingConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.retrievalConfig_ = - retrievalConfigBuilder_ == null ? retrievalConfig_ : retrievalConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.ToolConfig) { - return mergeFrom((com.google.cloud.vertexai.api.ToolConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.ToolConfig other) { - if (other == com.google.cloud.vertexai.api.ToolConfig.getDefaultInstance()) return this; - if (other.hasFunctionCallingConfig()) { - mergeFunctionCallingConfig(other.getFunctionCallingConfig()); - } - if (other.hasRetrievalConfig()) { - mergeRetrievalConfig(other.getRetrievalConfig()); - } - 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( - internalGetFunctionCallingConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetRetrievalConfigFieldBuilder().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.vertexai.api.FunctionCallingConfig functionCallingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCallingConfig, - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder, - com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder> - functionCallingConfigBuilder_; - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCallingConfig field is set. - */ - public boolean hasFunctionCallingConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCallingConfig. - */ - public com.google.cloud.vertexai.api.FunctionCallingConfig getFunctionCallingConfig() { - if (functionCallingConfigBuilder_ == null) { - return functionCallingConfig_ == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance() - : functionCallingConfig_; - } else { - return functionCallingConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionCallingConfig( - com.google.cloud.vertexai.api.FunctionCallingConfig value) { - if (functionCallingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - functionCallingConfig_ = value; - } else { - functionCallingConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setFunctionCallingConfig( - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder builderForValue) { - if (functionCallingConfigBuilder_ == null) { - functionCallingConfig_ = builderForValue.build(); - } else { - functionCallingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeFunctionCallingConfig( - com.google.cloud.vertexai.api.FunctionCallingConfig value) { - if (functionCallingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && functionCallingConfig_ != null - && functionCallingConfig_ - != com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance()) { - getFunctionCallingConfigBuilder().mergeFrom(value); - } else { - functionCallingConfig_ = value; - } - } else { - functionCallingConfigBuilder_.mergeFrom(value); - } - if (functionCallingConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearFunctionCallingConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - functionCallingConfig_ = null; - if (functionCallingConfigBuilder_ != null) { - functionCallingConfigBuilder_.dispose(); - functionCallingConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionCallingConfig.Builder - getFunctionCallingConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetFunctionCallingConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder - getFunctionCallingConfigOrBuilder() { - if (functionCallingConfigBuilder_ != null) { - return functionCallingConfigBuilder_.getMessageOrBuilder(); - } else { - return functionCallingConfig_ == null - ? com.google.cloud.vertexai.api.FunctionCallingConfig.getDefaultInstance() - : functionCallingConfig_; - } - } - - /** - * - * - *
-     * Optional. Function calling config.
-     * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCallingConfig, - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder, - com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder> - internalGetFunctionCallingConfigFieldBuilder() { - if (functionCallingConfigBuilder_ == null) { - functionCallingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.FunctionCallingConfig, - com.google.cloud.vertexai.api.FunctionCallingConfig.Builder, - com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder>( - getFunctionCallingConfig(), getParentForChildren(), isClean()); - functionCallingConfig_ = null; - } - return functionCallingConfigBuilder_; - } - - private com.google.cloud.vertexai.api.RetrievalConfig retrievalConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalConfig, - com.google.cloud.vertexai.api.RetrievalConfig.Builder, - com.google.cloud.vertexai.api.RetrievalConfigOrBuilder> - retrievalConfigBuilder_; - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrievalConfig field is set. - */ - public boolean hasRetrievalConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrievalConfig. - */ - public com.google.cloud.vertexai.api.RetrievalConfig getRetrievalConfig() { - if (retrievalConfigBuilder_ == null) { - return retrievalConfig_ == null - ? com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance() - : retrievalConfig_; - } else { - return retrievalConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRetrievalConfig(com.google.cloud.vertexai.api.RetrievalConfig value) { - if (retrievalConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retrievalConfig_ = value; - } else { - retrievalConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRetrievalConfig( - com.google.cloud.vertexai.api.RetrievalConfig.Builder builderForValue) { - if (retrievalConfigBuilder_ == null) { - retrievalConfig_ = builderForValue.build(); - } else { - retrievalConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRetrievalConfig(com.google.cloud.vertexai.api.RetrievalConfig value) { - if (retrievalConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && retrievalConfig_ != null - && retrievalConfig_ - != com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance()) { - getRetrievalConfigBuilder().mergeFrom(value); - } else { - retrievalConfig_ = value; - } - } else { - retrievalConfigBuilder_.mergeFrom(value); - } - if (retrievalConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRetrievalConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - retrievalConfig_ = null; - if (retrievalConfigBuilder_ != null) { - retrievalConfigBuilder_.dispose(); - retrievalConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RetrievalConfig.Builder getRetrievalConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetRetrievalConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RetrievalConfigOrBuilder getRetrievalConfigOrBuilder() { - if (retrievalConfigBuilder_ != null) { - return retrievalConfigBuilder_.getMessageOrBuilder(); - } else { - return retrievalConfig_ == null - ? com.google.cloud.vertexai.api.RetrievalConfig.getDefaultInstance() - : retrievalConfig_; - } - } - - /** - * - * - *
-     * Optional. Retrieval config.
-     * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalConfig, - com.google.cloud.vertexai.api.RetrievalConfig.Builder, - com.google.cloud.vertexai.api.RetrievalConfigOrBuilder> - internalGetRetrievalConfigFieldBuilder() { - if (retrievalConfigBuilder_ == null) { - retrievalConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RetrievalConfig, - com.google.cloud.vertexai.api.RetrievalConfig.Builder, - com.google.cloud.vertexai.api.RetrievalConfigOrBuilder>( - getRetrievalConfig(), getParentForChildren(), isClean()); - retrievalConfig_ = null; - } - return retrievalConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.ToolConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.ToolConfig) - private static final com.google.cloud.vertexai.api.ToolConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.ToolConfig(); - } - - public static com.google.cloud.vertexai.api.ToolConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ToolConfig 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.vertexai.api.ToolConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfigOrBuilder.java deleted file mode 100644 index a9f05fcc564f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolConfigOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ToolConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.ToolConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the functionCallingConfig field is set. - */ - boolean hasFunctionCallingConfig(); - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The functionCallingConfig. - */ - com.google.cloud.vertexai.api.FunctionCallingConfig getFunctionCallingConfig(); - - /** - * - * - *
-   * Optional. Function calling config.
-   * 
- * - * - * .google.cloud.vertexai.v1.FunctionCallingConfig function_calling_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionCallingConfigOrBuilder getFunctionCallingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrievalConfig field is set. - */ - boolean hasRetrievalConfig(); - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrievalConfig. - */ - com.google.cloud.vertexai.api.RetrievalConfig getRetrievalConfig(); - - /** - * - * - *
-   * Optional. Retrieval config.
-   * 
- * - * - * .google.cloud.vertexai.v1.RetrievalConfig retrieval_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RetrievalConfigOrBuilder getRetrievalConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java deleted file mode 100644 index 38daa5ad8eba..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface ToolOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.Tool) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getFunctionDeclarationsList(); - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations(int index); - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getFunctionDeclarationsCount(); - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getFunctionDeclarationsOrBuilderList(); - - /** - * - * - *
-   * Optional. Function tool type.
-   * One or more function declarations to be passed to the model along with the
-   * current user query. Model may decide to call a subset of these functions
-   * by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
-   * in the response. User should provide a
-   * [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
-   * each function call in the next turn. Based on the function responses, Model
-   * will generate the final response back to the user. Maximum 128 function
-   * declarations can be provided.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclarationsOrBuilder( - int index); - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the retrieval field is set. - */ - boolean hasRetrieval(); - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The retrieval. - */ - com.google.cloud.vertexai.api.Retrieval getRetrieval(); - - /** - * - * - *
-   * Optional. Retrieval tool type.
-   * System will always execute the provided retrieval tool(s) to get external
-   * knowledge to answer the prompt. Retrieval results are presented to the
-   * model for generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder(); - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearch field is set. - */ - boolean hasGoogleSearch(); - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearch. - */ - com.google.cloud.vertexai.api.Tool.GoogleSearch getGoogleSearch(); - - /** - * - * - *
-   * Optional. GoogleSearch tool type.
-   * Tool to support Google Search in Model. Powered by Google.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tool.GoogleSearchOrBuilder getGoogleSearchOrBuilder(); - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleSearchRetrieval field is set. - */ - boolean hasGoogleSearchRetrieval(); - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleSearchRetrieval. - */ - com.google.cloud.vertexai.api.GoogleSearchRetrieval getGoogleSearchRetrieval(); - - /** - * - * - *
-   * Optional. GoogleSearchRetrieval tool type.
-   * Specialized retrieval tool that is powered by Google search.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GoogleSearchRetrievalOrBuilder getGoogleSearchRetrievalOrBuilder(); - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the googleMaps field is set. - */ - boolean hasGoogleMaps(); - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The googleMaps. - */ - com.google.cloud.vertexai.api.GoogleMaps getGoogleMaps(); - - /** - * - * - *
-   * Optional. GoogleMaps tool type.
-   * Tool to support Google Maps in Model.
-   * 
- * - * - * .google.cloud.vertexai.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.GoogleMapsOrBuilder getGoogleMapsOrBuilder(); - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the enterpriseWebSearch field is set. - */ - boolean hasEnterpriseWebSearch(); - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enterpriseWebSearch. - */ - com.google.cloud.vertexai.api.EnterpriseWebSearch getEnterpriseWebSearch(); - - /** - * - * - *
-   * Optional. Tool to support searching public web data, powered by Vertex AI
-   * Search and Sec4 compliance.
-   * 
- * - * - * .google.cloud.vertexai.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.EnterpriseWebSearchOrBuilder getEnterpriseWebSearchOrBuilder(); - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the codeExecution field is set. - */ - boolean hasCodeExecution(); - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The codeExecution. - */ - com.google.cloud.vertexai.api.Tool.CodeExecution getCodeExecution(); - - /** - * - * - *
-   * Optional. CodeExecution tool type.
-   * Enables the model to execute code as part of generation.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tool.CodeExecutionOrBuilder getCodeExecutionOrBuilder(); - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the urlContext field is set. - */ - boolean hasUrlContext(); - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The urlContext. - */ - com.google.cloud.vertexai.api.UrlContext getUrlContext(); - - /** - * - * - *
-   * Optional. Tool to support URL context retrieval.
-   * 
- * - * - * .google.cloud.vertexai.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.UrlContextOrBuilder getUrlContextOrBuilder(); - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the computerUse field is set. - */ - boolean hasComputerUse(); - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The computerUse. - */ - com.google.cloud.vertexai.api.Tool.ComputerUse getComputerUse(); - - /** - * - * - *
-   * Optional. Tool to support the model interacting directly with the computer.
-   * If enabled, it automatically populates computer-use specific Function
-   * Declarations.
-   * 
- * - * - * .google.cloud.vertexai.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.Tool.ComputerUseOrBuilder getComputerUseOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java deleted file mode 100644 index 20c4fbcc49c4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java +++ /dev/null @@ -1,672 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class ToolProto extends com.google.protobuf.GeneratedFile { - private ToolProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ToolProto"); - } - - 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_vertexai_v1_Tool_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tool_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UrlContext_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UrlContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionDeclaration_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionCall_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_PartialArg_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_PartialArg_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionResponsePart_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ExecutableCode_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CodeExecutionResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Retrieval_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Retrieval_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VertexRagStore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VertexAISearch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_GoogleMaps_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ToolConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RetrievalConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_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/vertexai/v1/tool.proto\022\030g" - + "oogle.cloud.vertexai.v1\032\037google/api/fiel" - + "d_behavior.proto\032\031google/api/resource.pr" - + "oto\032&google/cloud/vertexai/v1/openapi.pr" - + "oto\032\034google/protobuf/struct.proto\032\030google/type/latlng.proto\"\225\n\n" - + "\004Tool\022Q\n" - + "\025function_declarations\030\001" - + " \003(\0132-.google.cloud.vertexai.v1.FunctionDeclarationB\003\340A\001\022;\n" - + "\tretrieval\030\002" - + " \001(\0132#.google.cloud.vertexai.v1.RetrievalB\003\340A\001\022G\n\r" - + "google_search\030\007 \001(\0132+.go" - + "ogle.cloud.vertexai.v1.Tool.GoogleSearchB\003\340A\001\022U\n" - + "\027google_search_retrieval\030\003 \001(\0132/" - + ".google.cloud.vertexai.v1.GoogleSearchRetrievalB\003\340A\001\022>\n" - + "\013google_maps\030\005" - + " \001(\0132$.google.cloud.vertexai.v1.GoogleMapsB\003\340A\001\022Q\n" - + "\025enterprise_web_search\030\006 \001(\0132-.google.clo" - + "ud.vertexai.v1.EnterpriseWebSearchB\003\340A\001\022I\n" - + "\016code_execution\030\004" - + " \001(\0132,.google.cloud.vertexai.v1.Tool.CodeExecutionB\003\340A\001\022>\n" - + "\013url_context\030\n" - + " \001(\0132$.google.cloud.vertexai.v1.UrlContextB\003\340A\001\022E\n" - + "\014computer_use\030\013 \001(\013" - + "2*.google.cloud.vertexai.v1.Tool.ComputerUseB\003\340A\001\032\237\001\n" - + "\014GoogleSearch\022\034\n" - + "\017exclude_domains\030\003 \003(\tB\003\340A\001\022Y\n" - + "\023blocking_confidence\030\004" - + " \001(\01622.google.cloud.vertexai.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n" - + "\024_blocking_confidence\032\017\n\r" - + "CodeExecution\032\320\001\n" - + "\013ComputerUse\022P\n" - + "\013environment\030\001 \001(\01626.google.cloud" - + ".vertexai.v1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n" - + "\035excluded_predefined_functions\030\002 \003(\tB\003\340A\001\"C\n" - + "\013Environment\022\033\n" - + "\027ENVIRONMENT_UNSPECIFIED\020\000\022\027\n" - + "\023ENVIRONMENT_BROWSER\020\001\"\345\001\n" - + "\023PhishBlockThreshold\022%\n" - + "!PHISH_BLOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n" - + "\023BLOCK_LOW_AND_ABOVE\020\036\022\032\n" - + "\026BLOCK_MEDIUM_AND_ABOVE\020(\022\030\n" - + "\024BLOCK_HIGH_AND_ABOVE\0202\022\032\n" - + "\026BLOCK_HIGHER_AND_ABOVE\0207\022\035\n" - + "\031BLOCK_VERY_HIGH_AND_ABOVE\020<\022\035\n" - + "\031BLOCK_ONLY_EXTREMELY_HIGH\020dJ\004\010\010\020\tJ\004\010\t\020\n" - + "\"\014\n\n" - + "UrlContext\"\256\002\n" - + "\023FunctionDeclaration\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022\030\n" - + "\013description\030\002 \001(\tB\003\340A\001\0229\n\n" - + "parameters\030\003 \001(\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001\022;\n" - + "\026parameters_json_schema\030\005" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\0227\n" - + "\010response\030\004 \001(\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001\0229\n" - + "\024response_json_schema\030\006" - + " \001(\0132\026.google.protobuf.ValueB\003\340A\001\"\252\001\n" - + "\014FunctionCall\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\001\022*\n" - + "\004args\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\022?\n" - + "\014partial_args\030\004" - + " \003(\0132$.google.cloud.vertexai.v1.PartialArgB\003\340A\001\022\032\n\r" - + "will_continue\030\005 \001(\010B\003\340A\001\"\325\001\n\n" - + "PartialArg\0225\n\n" - + "null_value\030\002" - + " \001(\0162\032.google.protobuf.NullValueB\003\340A\001H\000\022\033\n" - + "\014number_value\030\003 \001(\001B\003\340A\001H\000\022\033\n" - + "\014string_value\030\004 \001(\tB\003\340A\001H\000\022\031\n\n" - + "bool_value\030\005 \001(\010B\003\340A\001H\000\022\026\n" - + "\tjson_path\030\001 \001(\tB\003\340A\002\022\032\n\r" - + "will_continue\030\006 \001(\010B\003\340A\001B\007\n" - + "\005delta\"\256\001\n" - + "\024FunctionResponsePart\022E\n" - + "\013inline_data\030\001 \001(\0132.." - + "google.cloud.vertexai.v1.FunctionResponseBlobH\000\022G\n" - + "\tfile_data\030\002 \001(\01322.google.clou" - + "d.vertexai.v1.FunctionResponseFileDataH\000B\006\n" - + "\004data\"\\\n" - + "\024FunctionResponseBlob\022\026\n" - + "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004data\030\002 \001(\014B\003\340A\002\022\031\n" - + "\014display_name\030\004 \001(\tB\003\340A\001\"d\n" - + "\030FunctionResponseFileData\022\026\n" - + "\tmime_type\030\001 \001(\tB\003\340A\002\022\025\n" - + "\010file_uri\030\002 \001(\tB\003\340A\002\022\031\n" - + "\014display_name\030\003 \001(\tB\003\340A\001\"\231\001\n" - + "\020FunctionResponse\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022.\n" - + "\010response\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\022B\n" - + "\005parts\030\004 \003(\0132..google.clo" - + "ud.vertexai.v1.FunctionResponsePartB\003\340A\001\"\237\001\n" - + "\016ExecutableCode\022H\n" - + "\010language\030\001 \001(\01621." - + "google.cloud.vertexai.v1.ExecutableCode.LanguageB\003\340A\002\022\021\n" - + "\004code\030\002 \001(\tB\003\340A\002\"0\n" - + "\010Language\022\030\n" - + "\024LANGUAGE_UNSPECIFIED\020\000\022\n\n" - + "\006PYTHON\020\001\"\336\001\n" - + "\023CodeExecutionResult\022K\n" - + "\007outcome\030\001 " - + "\001(\01625.google.cloud.vertexai.v1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n" - + "\006output\030\002 \001(\tB\003\340A\001\"e\n" - + "\007Outcome\022\027\n" - + "\023OUTCOME_UNSPECIFIED\020\000\022\016\n\n" - + "OUTCOME_OK\020\001\022\022\n" - + "\016OUTCOME_FAILED\020\002\022\035\n" - + "\031OUTCOME_DEADLINE_EXCEEDED\020\003\"\305\001\n" - + "\tRetrieval\022D\n" - + "\020vertex_ai_search\030\002" - + " \001(\0132(.google.cloud.vertexai.v1.VertexAISearchH\000\022D\n" - + "\020vertex_rag_store\030\004" - + " \001(\0132(.google.cloud.vertexai.v1.VertexRagStoreH\000\022\"\n" - + "\023disable_attribution\030\003 \001(\010B\005\030\001\340A\001B\010\n" - + "\006source\"\246\003\n" - + "\016VertexRagStore\022P\n\r" - + "rag_resources\030\004 \003(\01324.google.c" - + "loud.vertexai.v1.VertexRagStore.RagResourceB\003\340A\001\022$\n" - + "\020similarity_top_k\030\002 \001(\005B\005\030\001\340A\001H\000\210\001\001\022-\n" - + "\031vector_distance_threshold\030\003" - + " \001(\001B\005\030\001\340A\001H\001\210\001\001\022O\n" - + "\024rag_retrieval_config\030\006 " - + "\001(\0132,.google.cloud.vertexai.v1.RagRetrievalConfigB\003\340A\001\032i\n" - + "\013RagResource\022?\n\n" - + "rag_corpus\030\001 \001(\tB+\340A\001\372A%\n" - + "#aiplatform.googleapis.com/RagCorpus\022\031\n" - + "\014rag_file_ids\030\002 \003(\tB\003\340A\001B\023\n" - + "\021_similarity_top_kB\034\n" - + "\032_vector_distance_threshold\"\370\001\n" - + "\016VertexAISearch\022\026\n" - + "\tdatastore\030\001 \001(\tB\003\340A\001\022\023\n" - + "\006engine\030\002 \001(\tB\003\340A\001\022\030\n" - + "\013max_results\030\003 \001(\005B\003\340A\001\022\023\n" - + "\006filter\030\004 \001(\tB\003\340A\001\022P\n" - + "\020data_store_specs\030\005 \003(\01326.google.c" - + "loud.vertexai.v1.VertexAISearch.DataStoreSpec\0328\n\r" - + "DataStoreSpec\022\022\n\n" - + "data_store\030\001 \001(\t\022\023\n" - + "\006filter\030\002 \001(\tB\003\340A\001\"k\n" - + "\025GoogleSearchRetrieval\022R\n" - + "\030dynamic_retrieval_config\030\002 \001" - + "(\01320.google.cloud.vertexai.v1.DynamicRetrievalConfig\"(\n\n" - + "GoogleMaps\022\032\n\r" - + "enable_widget\030\001 \001(\010B\003\340A\001\"\246\001\n" - + "\023EnterpriseWebSearch\022\034\n" - + "\017exclude_domains\030\001 \003(\tB\003\340A\001\022Y\n" - + "\023blocking_confidence\030\002 \001(\01622.google.cloud.vertexa" - + "i.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n" - + "\024_blocking_confidence\"\310\001\n" - + "\026DynamicRetrievalConfig\022C\n" - + "\004mode\030\001 \001(\01625.google.cloud." - + "vertexai.v1.DynamicRetrievalConfig.Mode\022#\n" - + "\021dynamic_threshold\030\002 \001(\002B\003\340A\001H\000\210\001\001\".\n" - + "\004Mode\022\024\n" - + "\020MODE_UNSPECIFIED\020\000\022\020\n" - + "\014MODE_DYNAMIC\020\001B\024\n" - + "\022_dynamic_threshold\"\255\001\n\n" - + "ToolConfig\022U\n" - + "\027function_calling_config\030\001 \001(\0132/.goo" - + "gle.cloud.vertexai.v1.FunctionCallingConfigB\003\340A\001\022H\n" - + "\020retrieval_config\030\002 \001(\0132).goo" - + "gle.cloud.vertexai.v1.RetrievalConfigB\003\340A\001\"\355\001\n" - + "\025FunctionCallingConfig\022G\n" - + "\004mode\030\001 \001" - + "(\01624.google.cloud.vertexai.v1.FunctionCallingConfig.ModeB\003\340A\001\022#\n" - + "\026allowed_function_names\030\002 \003(\tB\003\340A\001\022+\n" - + "\036stream_function_call_arguments\030\004 \001(\010B\003\340A\001\"9\n" - + "\004Mode\022\024\n" - + "\020MODE_UNSPECIFIED\020\000\022\010\n" - + "\004AUTO\020\001\022\007\n" - + "\003ANY\020\002\022\010\n" - + "\004NONE\020\003\"v\n" - + "\017RetrievalConfig\022)\n" - + "\007lat_lng\030\001 \001(\0132\023.google.type.LatLngH\000\210\001\001\022\032\n\r" - + "language_code\030\002 \001(\tH\001\210\001\001B\n\n" - + "\010_lat_lngB\020\n" - + "\016_language_code\"\242\005\n" - + "\022RagRetrievalConfig\022\022\n" - + "\005top_k\030\001 \001(\005B\003\340A\001\022H\n" - + "\006filter\030\003 \001(\01323.google.cloud.ver" - + "texai.v1.RagRetrievalConfig.FilterB\003\340A\001\022J\n" - + "\007ranking\030\004" - + " \001(\01324.google.cloud.vertexai.v1.RagRetrievalConfig.RankingB\003\340A\001\032\223\001\n" - + "\006Filter\022(\n" - + "\031vector_distance_threshold\030\003 \001(\001B\003\340A\001H\000\022*\n" - + "\033vector_similarity_threshold\030\004 \001(\001B\003\340A\001H\000\022\034\n" - + "\017metadata_filter\030\002 \001(\tB\003\340A\001B\025\n" - + "\023vector_db_threshold\032\313\002\n" - + "\007Ranking\022]\n" - + "\014rank_service\030\001 \001(\0132@.google.cloud.verte" - + "xai.v1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022Y\n\n" - + "llm_ranker\030\003 \001(\0132>.googl" - + "e.cloud.vertexai.v1.RagRetrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n" - + "\013RankService\022\034\n\n" - + "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n" - + "\013_model_name\0328\n" - + "\tLlmRanker\022\034\n\n" - + "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n" - + "\013_model_nameB\020\n" - + "\016ranking_configB\306\001\n" - + "\035com.google.cloud.vertexai.apiB\tToolProtoP\001Z>cloud.google.com/go/aiplatform/a" - + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." - + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" - + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.vertexai.api.OpenApiProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.type.LatLngProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_Tool_descriptor = getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_Tool_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tool_descriptor, - new java.lang.String[] { - "FunctionDeclarations", - "Retrieval", - "GoogleSearch", - "GoogleSearchRetrieval", - "GoogleMaps", - "EnterpriseWebSearch", - "CodeExecution", - "UrlContext", - "ComputerUse", - }); - internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor = - internal_static_google_cloud_vertexai_v1_Tool_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tool_GoogleSearch_descriptor, - new java.lang.String[] { - "ExcludeDomains", "BlockingConfidence", - }); - internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor = - internal_static_google_cloud_vertexai_v1_Tool_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tool_CodeExecution_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor = - internal_static_google_cloud_vertexai_v1_Tool_descriptor.getNestedType(2); - internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tool_ComputerUse_descriptor, - new java.lang.String[] { - "Environment", "ExcludedPredefinedFunctions", - }); - internal_static_google_cloud_vertexai_v1_UrlContext_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_UrlContext_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UrlContext_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_FunctionDeclaration_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionDeclaration_descriptor, - new java.lang.String[] { - "Name", - "Description", - "Parameters", - "ParametersJsonSchema", - "Response", - "ResponseJsonSchema", - }); - internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_FunctionCall_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionCall_descriptor, - new java.lang.String[] { - "Name", "Args", "PartialArgs", "WillContinue", - }); - internal_static_google_cloud_vertexai_v1_PartialArg_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_PartialArg_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_PartialArg_descriptor, - new java.lang.String[] { - "NullValue", - "NumberValue", - "StringValue", - "BoolValue", - "JsonPath", - "WillContinue", - "Delta", - }); - internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_FunctionResponsePart_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionResponsePart_descriptor, - new java.lang.String[] { - "InlineData", "FileData", "Data", - }); - internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor = - getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionResponseBlob_descriptor, - new java.lang.String[] { - "MimeType", "Data", "DisplayName", - }); - internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionResponseFileData_descriptor, - new java.lang.String[] { - "MimeType", "FileUri", "DisplayName", - }); - internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_FunctionResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionResponse_descriptor, - new java.lang.String[] { - "Name", "Response", "Parts", - }); - internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_ExecutableCode_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ExecutableCode_descriptor, - new java.lang.String[] { - "Language", "Code", - }); - internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_CodeExecutionResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CodeExecutionResult_descriptor, - new java.lang.String[] { - "Outcome", "Output", - }); - internal_static_google_cloud_vertexai_v1_Retrieval_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_Retrieval_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Retrieval_descriptor, - new java.lang.String[] { - "VertexAiSearch", "VertexRagStore", "DisableAttribution", "Source", - }); - internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_VertexRagStore_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor, - new java.lang.String[] { - "RagResources", "SimilarityTopK", "VectorDistanceThreshold", "RagRetrievalConfig", - }); - internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor = - internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor, - new java.lang.String[] { - "RagCorpus", "RagFileIds", - }); - internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_VertexAISearch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor, - new java.lang.String[] { - "Datastore", "Engine", "MaxResults", "Filter", "DataStoreSpecs", - }); - internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor = - internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor, - new java.lang.String[] { - "DataStore", "Filter", - }); - internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor = - getDescriptor().getMessageType(14); - internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GoogleSearchRetrieval_descriptor, - new java.lang.String[] { - "DynamicRetrievalConfig", - }); - internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor = - getDescriptor().getMessageType(15); - internal_static_google_cloud_vertexai_v1_GoogleMaps_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_GoogleMaps_descriptor, - new java.lang.String[] { - "EnableWidget", - }); - internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor = - getDescriptor().getMessageType(16); - internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_EnterpriseWebSearch_descriptor, - new java.lang.String[] { - "ExcludeDomains", "BlockingConfidence", - }); - internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor = - getDescriptor().getMessageType(17); - internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DynamicRetrievalConfig_descriptor, - new java.lang.String[] { - "Mode", "DynamicThreshold", - }); - internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor = - getDescriptor().getMessageType(18); - internal_static_google_cloud_vertexai_v1_ToolConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ToolConfig_descriptor, - new java.lang.String[] { - "FunctionCallingConfig", "RetrievalConfig", - }); - internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor = - getDescriptor().getMessageType(19); - internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FunctionCallingConfig_descriptor, - new java.lang.String[] { - "Mode", "AllowedFunctionNames", "StreamFunctionCallArguments", - }); - internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor = - getDescriptor().getMessageType(20); - internal_static_google_cloud_vertexai_v1_RetrievalConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RetrievalConfig_descriptor, - new java.lang.String[] { - "LatLng", "LanguageCode", - }); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor = - getDescriptor().getMessageType(21); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor, - new java.lang.String[] { - "TopK", "Filter", "Ranking", - }); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor = - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Filter_descriptor, - new java.lang.String[] { - "VectorDistanceThreshold", - "VectorSimilarityThreshold", - "MetadataFilter", - "VectorDbThreshold", - }); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor = - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor, - new java.lang.String[] { - "RankService", "LlmRanker", "RankingConfig", - }); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor = - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor - .getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_RankService_descriptor, - new java.lang.String[] { - "ModelName", - }); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor = - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_descriptor - .getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagRetrievalConfig_Ranking_LlmRanker_descriptor, - new java.lang.String[] { - "ModelName", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.OpenApiProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.type.LatLngProto.getDescriptor(); - 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); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java deleted file mode 100644 index 90b8eff1f729..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/openapi.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Type contains the list of OpenAPI data types as defined by
- * https://swagger.io/docs/specification/data-models/data-types/
- * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.Type} - */ -@com.google.protobuf.Generated -public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified, should not be used.
-   * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-   * OpenAPI string type
-   * 
- * - * STRING = 1; - */ - STRING(1), - /** - * - * - *
-   * OpenAPI number type
-   * 
- * - * NUMBER = 2; - */ - NUMBER(2), - /** - * - * - *
-   * OpenAPI integer type
-   * 
- * - * INTEGER = 3; - */ - INTEGER(3), - /** - * - * - *
-   * OpenAPI boolean type
-   * 
- * - * BOOLEAN = 4; - */ - BOOLEAN(4), - /** - * - * - *
-   * OpenAPI array type
-   * 
- * - * ARRAY = 5; - */ - ARRAY(5), - /** - * - * - *
-   * OpenAPI object type
-   * 
- * - * OBJECT = 6; - */ - OBJECT(6), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Type"); - } - - /** - * - * - *
-   * Not specified, should not be used.
-   * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-   * OpenAPI string type
-   * 
- * - * STRING = 1; - */ - public static final int STRING_VALUE = 1; - - /** - * - * - *
-   * OpenAPI number type
-   * 
- * - * NUMBER = 2; - */ - public static final int NUMBER_VALUE = 2; - - /** - * - * - *
-   * OpenAPI integer type
-   * 
- * - * INTEGER = 3; - */ - public static final int INTEGER_VALUE = 3; - - /** - * - * - *
-   * OpenAPI boolean type
-   * 
- * - * BOOLEAN = 4; - */ - public static final int BOOLEAN_VALUE = 4; - - /** - * - * - *
-   * OpenAPI array type
-   * 
- * - * ARRAY = 5; - */ - public static final int ARRAY_VALUE = 5; - - /** - * - * - *
-   * OpenAPI object type
-   * 
- * - * OBJECT = 6; - */ - public static final int OBJECT_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 Type 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 Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return STRING; - case 2: - return NUMBER; - case 3: - return INTEGER; - case 4: - return BOOLEAN; - case 5: - return ARRAY; - case 6: - return OBJECT; - 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 Type findValueByNumber(int number) { - return Type.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.OpenApiProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type 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 Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Type) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java deleted file mode 100644 index e49dcd62c500..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/types.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class TypesProto extends com.google.protobuf.GeneratedFile { - private TypesProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "TypesProto"); - } - - 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_vertexai_v1_BoolArray_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_BoolArray_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_DoubleArray_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Int64Array_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Int64Array_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_StringArray_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_StringArray_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Tensor_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tensor_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_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/vertexai/v1/types.proto\022\030google.cloud.vertexai.v1\"\033\n" - + "\tBoolArray\022\016\n" - + "\006values\030\001 \003(\010\"\035\n" - + "\013DoubleArray\022\016\n" - + "\006values\030\001 \003(\001\"\034\n\n" - + "Int64Array\022\016\n" - + "\006values\030\001 \003(\003\"\035\n" - + "\013StringArray\022\016\n" - + "\006values\030\001 \003(\t\"\213\005\n" - + "\006Tensor\0228\n" - + "\005dtype\030\001 \001(\0162).google.cloud.vertexai.v1.Tensor.DataType\022\r\n" - + "\005shape\030\002 \003(\003\022\020\n" - + "\010bool_val\030\003 \003(\010\022\022\n\n" - + "string_val\030\016 \003(\t\022\021\n" - + "\tbytes_val\030\017 \003(\014\022\021\n" - + "\tfloat_val\030\005 \003(\002\022\022\n\n" - + "double_val\030\006 \003(\001\022\017\n" - + "\007int_val\030\007 \003(\005\022\021\n" - + "\tint64_val\030\010 \003(\003\022\020\n" - + "\010uint_val\030\t \003(\r" - + "\022\022\n\n" - + "uint64_val\030\n" - + " \003(\004\0222\n" - + "\010list_val\030\013 \003(\0132 .google.cloud.vertexai.v1.Tensor\022C\n\n" - + "struct_val\030\014 \003(\0132/.google" - + ".cloud.vertexai.v1.Tensor.StructValEntry\022\022\n\n" - + "tensor_val\030\r" - + " \001(\014\032R\n" - + "\016StructValEntry\022\013\n" - + "\003key\030\001 \001(\t\022/\n" - + "\005value\030\002 \001(\0132 .google.cloud.vertexai.v1.Tensor:\0028\001\"\254\001\n" - + "\010DataType\022\031\n" - + "\025DATA_TYPE_UNSPECIFIED\020\000\022\010\n" - + "\004BOOL\020\001\022\n\n" - + "\006STRING\020\002\022\t\n" - + "\005FLOAT\020\003\022\n\n" - + "\006DOUBLE\020\004\022\010\n" - + "\004INT8\020\005\022\t\n" - + "\005INT16\020\006\022\t\n" - + "\005INT32\020\007\022\t\n" - + "\005INT64\020\010\022\t\n" - + "\005UINT8\020\t\022\n\n" - + "\006UINT16\020\n" - + "\022\n\n" - + "\006UINT32\020\013\022\n\n" - + "\006UINT64\020\014B\307\001\n" - + "\035com.google.cloud.vertexai.apiB\n" - + "TypesProtoP\001Z>cloud.google.com/go/aiplatform/" - + "apiv1/aiplatformpb;aiplatformpb\252\002\032Google" - + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl" - + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - internal_static_google_cloud_vertexai_v1_BoolArray_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_BoolArray_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_BoolArray_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_DoubleArray_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_DoubleArray_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_vertexai_v1_Int64Array_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_Int64Array_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Int64Array_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_vertexai_v1_StringArray_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_StringArray_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_StringArray_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_vertexai_v1_Tensor_descriptor = getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_Tensor_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tensor_descriptor, - new java.lang.String[] { - "Dtype", - "Shape", - "BoolVal", - "StringVal", - "BytesVal", - "FloatVal", - "DoubleVal", - "IntVal", - "Int64Val", - "UintVal", - "Uint64Val", - "ListVal", - "StructVal", - "TensorVal", - }); - internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_descriptor = - internal_static_google_cloud_vertexai_v1_Tensor_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_Tensor_StructValEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - descriptor.resolveAllFeaturesImmutable(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java deleted file mode 100644 index 42dacfb2a3a2..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java +++ /dev/null @@ -1,713 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Runtime operation information for
- * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelOperationMetadata} - */ -@com.google.protobuf.Generated -public final class UndeployModelOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UndeployModelOperationMetadata) - UndeployModelOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UndeployModelOperationMetadata"); - } - - // Use UndeployModelOperationMetadata.newBuilder() to construct. - private UndeployModelOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UndeployModelOperationMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelOperationMetadata.class, - com.google.cloud.vertexai.api.UndeployModelOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - 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.writeMessage(1, getGenericMetadata()); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - 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.vertexai.api.UndeployModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UndeployModelOperationMetadata other = - (com.google.cloud.vertexai.api.UndeployModelOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata 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.vertexai.api.UndeployModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata 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.vertexai.api.UndeployModelOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UndeployModelOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Runtime operation information for
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UndeployModelOperationMetadata) - com.google.cloud.vertexai.api.UndeployModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelOperationMetadata.class, - com.google.cloud.vertexai.api.UndeployModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UndeployModelOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UndeployModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelOperationMetadata build() { - com.google.cloud.vertexai.api.UndeployModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.UndeployModelOperationMetadata result = - new com.google.cloud.vertexai.api.UndeployModelOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.UndeployModelOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UndeployModelOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.UndeployModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UndeployModelOperationMetadata other) { - if (other - == com.google.cloud.vertexai.api.UndeployModelOperationMetadata.getDefaultInstance()) - return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - 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( - internalGetGenericMetadataFieldBuilder().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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UndeployModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UndeployModelOperationMetadata) - private static final com.google.cloud.vertexai.api.UndeployModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UndeployModelOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.UndeployModelOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UndeployModelOperationMetadata 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.vertexai.api.UndeployModelOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java deleted file mode 100644 index a8ff1acdc509..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UndeployModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UndeployModelOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java deleted file mode 100644 index 79ee47260d2d..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java +++ /dev/null @@ -1,1227 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelRequest} - */ -@com.google.protobuf.Generated -public final class UndeployModelRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UndeployModelRequest) - UndeployModelRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UndeployModelRequest"); - } - - // Use UndeployModelRequest.newBuilder() to construct. - private UndeployModelRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UndeployModelRequest() { - endpoint_ = ""; - deployedModelId_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelRequest.class, - com.google.cloud.vertexai.api.UndeployModelRequest.Builder.class); - } - - public static final int ENDPOINT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object endpoint_ = ""; - - /** - * - * - *
-   * Required. The name of the Endpoint resource from which to undeploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - @java.lang.Override - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - 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(); - endpoint_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The name of the Endpoint resource from which to undeploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOYED_MODEL_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-   * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The deployedModelId. - */ - @java.lang.Override - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - 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(); - deployedModelId_ = s; - return s; - } - } - - /** - * - * - *
-   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-   * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for deployedModelId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRAFFIC_SPLIT_FIELD_NUMBER = 3; - - private static final class TrafficSplitDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_TrafficSplitEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT32, - 0); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().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.GeneratedMessage.isStringEmpty(endpoint_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, deployedModelId_); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetTrafficSplit(), TrafficSplitDefaultEntryHolder.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.GeneratedMessage.isStringEmpty(endpoint_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deployedModelId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deployedModelId_); - } - for (java.util.Map.Entry entry : - internalGetTrafficSplit().getMap().entrySet()) { - com.google.protobuf.MapEntry trafficSplit__ = - TrafficSplitDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, trafficSplit__); - } - 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.vertexai.api.UndeployModelRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UndeployModelRequest other = - (com.google.cloud.vertexai.api.UndeployModelRequest) obj; - - if (!getEndpoint().equals(other.getEndpoint())) return false; - if (!getDeployedModelId().equals(other.getDeployedModelId())) return false; - if (!internalGetTrafficSplit().equals(other.internalGetTrafficSplit())) 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) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - hash = (37 * hash) + DEPLOYED_MODEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeployedModelId().hashCode(); - if (!internalGetTrafficSplit().getMap().isEmpty()) { - hash = (37 * hash) + TRAFFIC_SPLIT_FIELD_NUMBER; - hash = (53 * hash) + internalGetTrafficSplit().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest 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.vertexai.api.UndeployModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest 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.vertexai.api.UndeployModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UndeployModelRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UndeployModelRequest) - com.google.cloud.vertexai.api.UndeployModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableTrafficSplit(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelRequest.class, - com.google.cloud.vertexai.api.UndeployModelRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UndeployModelRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = ""; - deployedModelId_ = ""; - internalGetMutableTrafficSplit().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UndeployModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelRequest build() { - com.google.cloud.vertexai.api.UndeployModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelRequest buildPartial() { - com.google.cloud.vertexai.api.UndeployModelRequest result = - new com.google.cloud.vertexai.api.UndeployModelRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.UndeployModelRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpoint_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.deployedModelId_ = deployedModelId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.trafficSplit_ = internalGetTrafficSplit(); - result.trafficSplit_.makeImmutable(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UndeployModelRequest) { - return mergeFrom((com.google.cloud.vertexai.api.UndeployModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UndeployModelRequest other) { - if (other == com.google.cloud.vertexai.api.UndeployModelRequest.getDefaultInstance()) - return this; - if (!other.getEndpoint().isEmpty()) { - endpoint_ = other.endpoint_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDeployedModelId().isEmpty()) { - deployedModelId_ = other.deployedModelId_; - bitField0_ |= 0x00000002; - onChanged(); - } - internalGetMutableTrafficSplit().mergeFrom(other.internalGetTrafficSplit()); - 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: - { - endpoint_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - deployedModelId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - com.google.protobuf.MapEntry trafficSplit__ = - input.readMessage( - TrafficSplitDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableTrafficSplit() - .getMutableMap() - .put(trafficSplit__.getKey(), trafficSplit__.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 endpoint_ = ""; - - /** - * - * - *
-     * Required. The name of the Endpoint resource from which to undeploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - public java.lang.String getEndpoint() { - java.lang.Object ref = endpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource from which to undeploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - public com.google.protobuf.ByteString getEndpointBytes() { - java.lang.Object ref = endpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - endpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource from which to undeploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource from which to undeploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearEndpoint() { - endpoint_ = getDefaultInstance().getEndpoint(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The name of the Endpoint resource from which to undeploy a Model.
-     * Format:
-     * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-     * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for endpoint to set. - * @return This builder for chaining. - */ - public Builder setEndpointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - endpoint_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object deployedModelId_ = ""; - - /** - * - * - *
-     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-     * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The deployedModelId. - */ - public java.lang.String getDeployedModelId() { - java.lang.Object ref = deployedModelId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deployedModelId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-     * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for deployedModelId. - */ - public com.google.protobuf.ByteString getDeployedModelIdBytes() { - java.lang.Object ref = deployedModelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - deployedModelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-     * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-     * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearDeployedModelId() { - deployedModelId_ = getDefaultInstance().getDeployedModelId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-     * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for deployedModelId to set. - * @return This builder for chaining. - */ - public Builder setDeployedModelIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - deployedModelId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.MapField trafficSplit_; - - private com.google.protobuf.MapField - internalGetTrafficSplit() { - if (trafficSplit_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TrafficSplitDefaultEntryHolder.defaultEntry); - } - return trafficSplit_; - } - - private com.google.protobuf.MapField - internalGetMutableTrafficSplit() { - if (trafficSplit_ == null) { - trafficSplit_ = - com.google.protobuf.MapField.newMapField(TrafficSplitDefaultEntryHolder.defaultEntry); - } - if (!trafficSplit_.isMutable()) { - trafficSplit_ = trafficSplit_.copy(); - } - bitField0_ |= 0x00000004; - onChanged(); - return trafficSplit_; - } - - public int getTrafficSplitCount() { - return internalGetTrafficSplit().getMap().size(); - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public boolean containsTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetTrafficSplit().getMap().containsKey(key); - } - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getTrafficSplit() { - return getTrafficSplitMap(); - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public java.util.Map getTrafficSplitMap() { - return internalGetTrafficSplit().getMap(); - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - @java.lang.Override - public int getTrafficSplitOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetTrafficSplit().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearTrafficSplit() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableTrafficSplit().getMutableMap().clear(); - return this; - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder removeTrafficSplit(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableTrafficSplit().getMutableMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableTrafficSplit() { - bitField0_ |= 0x00000004; - return internalGetMutableTrafficSplit().getMutableMap(); - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder putTrafficSplit(java.lang.String key, int value) { - if (key == null) { - throw new NullPointerException("map key"); - } - - internalGetMutableTrafficSplit().getMutableMap().put(key, value); - bitField0_ |= 0x00000004; - return this; - } - - /** - * - * - *
-     * If this field is provided, then the Endpoint's
-     * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-     * overwritten with it. If last DeployedModel is being undeployed from the
-     * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-     * call returns. A DeployedModel will be successfully undeployed only if it
-     * doesn't have any traffic assigned to it when this method executes, or if
-     * this field unassigns any traffic to it.
-     * 
- * - * map<string, int32> traffic_split = 3; - */ - public Builder putAllTrafficSplit(java.util.Map values) { - internalGetMutableTrafficSplit().getMutableMap().putAll(values); - bitField0_ |= 0x00000004; - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UndeployModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UndeployModelRequest) - private static final com.google.cloud.vertexai.api.UndeployModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UndeployModelRequest(); - } - - public static com.google.cloud.vertexai.api.UndeployModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UndeployModelRequest 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.vertexai.api.UndeployModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java deleted file mode 100644 index 2e36fd14cfd0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UndeployModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UndeployModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the Endpoint resource from which to undeploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The endpoint. - */ - java.lang.String getEndpoint(); - - /** - * - * - *
-   * Required. The name of the Endpoint resource from which to undeploy a Model.
-   * Format:
-   * `projects/{project}/locations/{location}/endpoints/{endpoint}`
-   * 
- * - * - * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for endpoint. - */ - com.google.protobuf.ByteString getEndpointBytes(); - - /** - * - * - *
-   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-   * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The deployedModelId. - */ - java.lang.String getDeployedModelId(); - - /** - * - * - *
-   * Required. The ID of the DeployedModel to be undeployed from the Endpoint.
-   * 
- * - * string deployed_model_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for deployedModelId. - */ - com.google.protobuf.ByteString getDeployedModelIdBytes(); - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitCount(); - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - boolean containsTrafficSplit(java.lang.String key); - - /** Use {@link #getTrafficSplitMap()} instead. */ - @java.lang.Deprecated - java.util.Map getTrafficSplit(); - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - java.util.Map getTrafficSplitMap(); - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitOrDefault(java.lang.String key, int defaultValue); - - /** - * - * - *
-   * If this field is provided, then the Endpoint's
-   * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
-   * overwritten with it. If last DeployedModel is being undeployed from the
-   * Endpoint, the [Endpoint.traffic_split] will always end up empty when this
-   * call returns. A DeployedModel will be successfully undeployed only if it
-   * doesn't have any traffic assigned to it when this method executes, or if
-   * this field unassigns any traffic to it.
-   * 
- * - * map<string, int32> traffic_split = 3; - */ - int getTrafficSplitOrThrow(java.lang.String key); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java deleted file mode 100644 index a6dcd2993a30..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Response message for
- * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelResponse} - */ -@com.google.protobuf.Generated -public final class UndeployModelResponse extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UndeployModelResponse) - UndeployModelResponseOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UndeployModelResponse"); - } - - // Use UndeployModelResponse.newBuilder() to construct. - private UndeployModelResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UndeployModelResponse() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelResponse.class, - com.google.cloud.vertexai.api.UndeployModelResponse.Builder.class); - } - - 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.cloud.vertexai.api.UndeployModelResponse)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UndeployModelResponse other = - (com.google.cloud.vertexai.api.UndeployModelResponse) 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.cloud.vertexai.api.UndeployModelResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse 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.vertexai.api.UndeployModelResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse 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.vertexai.api.UndeployModelResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UndeployModelResponse 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Response message for
-   * [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UndeployModelResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UndeployModelResponse) - com.google.cloud.vertexai.api.UndeployModelResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UndeployModelResponse.class, - com.google.cloud.vertexai.api.UndeployModelResponse.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UndeployModelResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UndeployModelResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelResponse getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UndeployModelResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelResponse build() { - com.google.cloud.vertexai.api.UndeployModelResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UndeployModelResponse buildPartial() { - com.google.cloud.vertexai.api.UndeployModelResponse result = - new com.google.cloud.vertexai.api.UndeployModelResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UndeployModelResponse) { - return mergeFrom((com.google.cloud.vertexai.api.UndeployModelResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UndeployModelResponse other) { - if (other == com.google.cloud.vertexai.api.UndeployModelResponse.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UndeployModelResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UndeployModelResponse) - private static final com.google.cloud.vertexai.api.UndeployModelResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UndeployModelResponse(); - } - - public static com.google.cloud.vertexai.api.UndeployModelResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UndeployModelResponse 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.vertexai.api.UndeployModelResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java deleted file mode 100644 index 61070abd80c9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UndeployModelResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UndeployModelResponse) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequest.java deleted file mode 100644 index cc79bac81da8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequest.java +++ /dev/null @@ -1,756 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest} - */ -@com.google.protobuf.Generated -public final class UpdateEndpointLongRunningRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest) - UpdateEndpointLongRunningRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UpdateEndpointLongRunningRequest"); - } - - // Use UpdateEndpointLongRunningRequest.newBuilder() to construct. - private UpdateEndpointLongRunningRequest( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UpdateEndpointLongRunningRequest() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.class, - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.Endpoint endpoint_; - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - @java.lang.Override - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - 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.writeMessage(1, getEndpoint()); - } - 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.computeMessageSize(1, getEndpoint()); - } - 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.vertexai.api.UpdateEndpointLongRunningRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest other = - (com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest) obj; - - if (hasEndpoint() != other.hasEndpoint()) return false; - if (hasEndpoint()) { - if (!getEndpoint().equals(other.getEndpoint())) 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 (hasEndpoint()) { - hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest 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.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest 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.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UpdateEndpointLongRunningRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest) - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.class, - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetEndpointFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointLongRunningRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest build() { - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest buildPartial() { - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest result = - new com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest) { - return mergeFrom((com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest other) { - if (other - == com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest.getDefaultInstance()) - return this; - if (other.hasEndpoint()) { - mergeEndpoint(other.getEndpoint()); - } - 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( - internalGetEndpointFieldBuilder().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.vertexai.api.Endpoint endpoint_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - endpointBuilder_; - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - if (endpointBuilder_ == null) { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } else { - return endpointBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - } else { - endpointBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointBuilder_ == null) { - endpoint_ = builderForValue.build(); - } else { - endpointBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && endpoint_ != null - && endpoint_ != com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()) { - getEndpointBuilder().mergeFrom(value); - } else { - endpoint_ = value; - } - } else { - endpointBuilder_.mergeFrom(value); - } - if (endpoint_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearEndpoint() { - bitField0_ = (bitField0_ & ~0x00000001); - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Endpoint.Builder getEndpointBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetEndpointFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - if (endpointBuilder_ != null) { - return endpointBuilder_.getMessageOrBuilder(); - } else { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server. Currently
-     * we only support updating the `client_connection_config` field, all the
-     * other fields' update will be blocked.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - internalGetEndpointFieldBuilder() { - if (endpointBuilder_ == null) { - endpointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder>( - getEndpoint(), getParentForChildren(), isClean()); - endpoint_ = null; - } - return endpointBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest) - private static final com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest(); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointLongRunningRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateEndpointLongRunningRequest 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.vertexai.api.UpdateEndpointLongRunningRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequestOrBuilder.java deleted file mode 100644 index 15fb6087b17e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointLongRunningRequestOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UpdateEndpointLongRunningRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UpdateEndpointLongRunningRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - boolean hasEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - com.google.cloud.vertexai.api.Endpoint getEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server. Currently
-   * we only support updating the `client_connection_config` field, all the
-   * other fields' update will be blocked.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadata.java deleted file mode 100644 index b0ba10aadbcd..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadata.java +++ /dev/null @@ -1,713 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Runtime operation information for
- * [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointOperationMetadata} - */ -@com.google.protobuf.Generated -public final class UpdateEndpointOperationMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UpdateEndpointOperationMetadata) - UpdateEndpointOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UpdateEndpointOperationMetadata"); - } - - // Use UpdateEndpointOperationMetadata.newBuilder() to construct. - private UpdateEndpointOperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UpdateEndpointOperationMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.class, - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.Builder.class); - } - - private int bitField0_; - public static final int GENERIC_METADATA_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - @java.lang.Override - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - - 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.writeMessage(1, getGenericMetadata()); - } - 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.computeMessageSize(1, getGenericMetadata()); - } - 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.vertexai.api.UpdateEndpointOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata other = - (com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata) obj; - - if (hasGenericMetadata() != other.hasGenericMetadata()) return false; - if (hasGenericMetadata()) { - if (!getGenericMetadata().equals(other.getGenericMetadata())) 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 (hasGenericMetadata()) { - hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getGenericMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata 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.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata 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.vertexai.api.UpdateEndpointOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UpdateEndpointOperationMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Runtime operation information for
-   * [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UpdateEndpointOperationMetadata) - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.class, - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetGenericMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata build() { - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata buildPartial() { - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata result = - new com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.genericMetadata_ = - genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata other) { - if (other - == com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata.getDefaultInstance()) - return this; - if (other.hasGenericMetadata()) { - mergeGenericMetadata(other.getGenericMetadata()); - } - 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( - internalGetGenericMetadataFieldBuilder().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.vertexai.api.GenericOperationMetadata genericMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - genericMetadataBuilder_; - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - public boolean hasGenericMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata() { - if (genericMetadataBuilder_ == null) { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } else { - return genericMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - genericMetadata_ = value; - } else { - genericMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder setGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder builderForValue) { - if (genericMetadataBuilder_ == null) { - genericMetadata_ = builderForValue.build(); - } else { - genericMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder mergeGenericMetadata( - com.google.cloud.vertexai.api.GenericOperationMetadata value) { - if (genericMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && genericMetadata_ != null - && genericMetadata_ - != com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance()) { - getGenericMetadataBuilder().mergeFrom(value); - } else { - genericMetadata_ = value; - } - } else { - genericMetadataBuilder_.mergeFrom(value); - } - if (genericMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public Builder clearGenericMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - genericMetadata_ = null; - if (genericMetadataBuilder_ != null) { - genericMetadataBuilder_.dispose(); - genericMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadata.Builder - getGenericMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetGenericMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - public com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder - getGenericMetadataOrBuilder() { - if (genericMetadataBuilder_ != null) { - return genericMetadataBuilder_.getMessageOrBuilder(); - } else { - return genericMetadata_ == null - ? com.google.cloud.vertexai.api.GenericOperationMetadata.getDefaultInstance() - : genericMetadata_; - } - } - - /** - * - * - *
-     * The operation generic information.
-     * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder> - internalGetGenericMetadataFieldBuilder() { - if (genericMetadataBuilder_ == null) { - genericMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.GenericOperationMetadata, - com.google.cloud.vertexai.api.GenericOperationMetadata.Builder, - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder>( - getGenericMetadata(), getParentForChildren(), isClean()); - genericMetadata_ = null; - } - return genericMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UpdateEndpointOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UpdateEndpointOperationMetadata) - private static final com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata(); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateEndpointOperationMetadata 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.vertexai.api.UpdateEndpointOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadataOrBuilder.java deleted file mode 100644 index fb60e6fa2239..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointOperationMetadataOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UpdateEndpointOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UpdateEndpointOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return Whether the genericMetadata field is set. - */ - boolean hasGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - * - * @return The genericMetadata. - */ - com.google.cloud.vertexai.api.GenericOperationMetadata getGenericMetadata(); - - /** - * - * - *
-   * The operation generic information.
-   * 
- * - * .google.cloud.vertexai.v1.GenericOperationMetadata generic_metadata = 1; - */ - com.google.cloud.vertexai.api.GenericOperationMetadataOrBuilder getGenericMetadataOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java deleted file mode 100644 index 390a683a75fe..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java +++ /dev/null @@ -1,1025 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Request message for
- * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointRequest} - */ -@com.google.protobuf.Generated -public final class UpdateEndpointRequest extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UpdateEndpointRequest) - UpdateEndpointRequestOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UpdateEndpointRequest"); - } - - // Use UpdateEndpointRequest.newBuilder() to construct. - private UpdateEndpointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UpdateEndpointRequest() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointRequest.class, - com.google.cloud.vertexai.api.UpdateEndpointRequest.Builder.class); - } - - private int bitField0_; - public static final int ENDPOINT_FIELD_NUMBER = 1; - private com.google.cloud.vertexai.api.Endpoint endpoint_; - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - @java.lang.Override - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .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 ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .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 update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getEndpoint()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getUpdateMask()); - } - 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.computeMessageSize(1, getEndpoint()); - } - if (((bitField0_ & 0x00000002) != 0)) { - 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.vertexai.api.UpdateEndpointRequest)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UpdateEndpointRequest other = - (com.google.cloud.vertexai.api.UpdateEndpointRequest) obj; - - if (hasEndpoint() != other.hasEndpoint()) return false; - if (hasEndpoint()) { - if (!getEndpoint().equals(other.getEndpoint())) 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 (hasEndpoint()) { - hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; - hash = (53 * hash) + getEndpoint().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.vertexai.api.UpdateEndpointRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest 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.vertexai.api.UpdateEndpointRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest 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.vertexai.api.UpdateEndpointRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UpdateEndpointRequest 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Request message for
-   * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UpdateEndpointRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UpdateEndpointRequest) - com.google.cloud.vertexai.api.UpdateEndpointRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UpdateEndpointRequest.class, - com.google.cloud.vertexai.api.UpdateEndpointRequest.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UpdateEndpointRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetEndpointFieldBuilder(); - internalGetUpdateMaskFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = 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.vertexai.api.EndpointServiceProto - .internal_static_google_cloud_vertexai_v1_UpdateEndpointRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointRequest getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UpdateEndpointRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointRequest build() { - com.google.cloud.vertexai.api.UpdateEndpointRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UpdateEndpointRequest buildPartial() { - com.google.cloud.vertexai.api.UpdateEndpointRequest result = - new com.google.cloud.vertexai.api.UpdateEndpointRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.UpdateEndpointRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UpdateEndpointRequest) { - return mergeFrom((com.google.cloud.vertexai.api.UpdateEndpointRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UpdateEndpointRequest other) { - if (other == com.google.cloud.vertexai.api.UpdateEndpointRequest.getDefaultInstance()) - return this; - if (other.hasEndpoint()) { - mergeEndpoint(other.getEndpoint()); - } - 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( - internalGetEndpointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetUpdateMaskFieldBuilder().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.vertexai.api.Endpoint endpoint_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - endpointBuilder_; - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - public boolean hasEndpoint() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - public com.google.cloud.vertexai.api.Endpoint getEndpoint() { - if (endpointBuilder_ == null) { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } else { - return endpointBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpoint_ = value; - } else { - endpointBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setEndpoint(com.google.cloud.vertexai.api.Endpoint.Builder builderForValue) { - if (endpointBuilder_ == null) { - endpoint_ = builderForValue.build(); - } else { - endpointBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeEndpoint(com.google.cloud.vertexai.api.Endpoint value) { - if (endpointBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && endpoint_ != null - && endpoint_ != com.google.cloud.vertexai.api.Endpoint.getDefaultInstance()) { - getEndpointBuilder().mergeFrom(value); - } else { - endpoint_ = value; - } - } else { - endpointBuilder_.mergeFrom(value); - } - if (endpoint_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearEndpoint() { - bitField0_ = (bitField0_ & ~0x00000001); - endpoint_ = null; - if (endpointBuilder_ != null) { - endpointBuilder_.dispose(); - endpointBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.Endpoint.Builder getEndpointBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetEndpointFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { - if (endpointBuilder_ != null) { - return endpointBuilder_.getMessageOrBuilder(); - } else { - return endpoint_ == null - ? com.google.cloud.vertexai.api.Endpoint.getDefaultInstance() - : endpoint_; - } - } - - /** - * - * - *
-     * Required. The Endpoint which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder> - internalGetEndpointFieldBuilder() { - if (endpointBuilder_ == null) { - endpointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.Endpoint, - com.google.cloud.vertexai.api.Endpoint.Builder, - com.google.cloud.vertexai.api.EndpointOrBuilder>( - getEndpoint(), getParentForChildren(), isClean()); - endpoint_ = null; - } - return endpointBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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); - } - if (updateMask_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetUpdateMaskFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Required. The update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .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 update mask applies to the resource. See
-     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - internalGetUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UpdateEndpointRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UpdateEndpointRequest) - private static final com.google.cloud.vertexai.api.UpdateEndpointRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UpdateEndpointRequest(); - } - - public static com.google.cloud.vertexai.api.UpdateEndpointRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateEndpointRequest 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.vertexai.api.UpdateEndpointRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java deleted file mode 100644 index ed1cf8430853..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/endpoint_service.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UpdateEndpointRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UpdateEndpointRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the endpoint field is set. - */ - boolean hasEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The endpoint. - */ - com.google.cloud.vertexai.api.Endpoint getEndpoint(); - - /** - * - * - *
-   * Required. The Endpoint which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.vertexai.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - - /** - * - * - *
-   * Required. The update mask applies to the resource. See
-   * [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfig.java deleted file mode 100644 index 67315581a566..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfig.java +++ /dev/null @@ -1,735 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for uploading RagFile.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UploadRagFileConfig} - */ -@com.google.protobuf.Generated -public final class UploadRagFileConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UploadRagFileConfig) - UploadRagFileConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UploadRagFileConfig"); - } - - // Use UploadRagFileConfig.newBuilder() to construct. - private UploadRagFileConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UploadRagFileConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UploadRagFileConfig.class, - com.google.cloud.vertexai.api.UploadRagFileConfig.Builder.class); - } - - private int bitField0_; - public static final int RAG_FILE_TRANSFORMATION_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.RagFileTransformationConfig ragFileTransformationConfig_; - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - @java.lang.Override - public boolean hasRagFileTransformationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return The ragFileTransformationConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfig - getRagFileTransformationConfig() { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder() { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - - 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.writeMessage(3, getRagFileTransformationConfig()); - } - 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.computeMessageSize( - 3, getRagFileTransformationConfig()); - } - 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.vertexai.api.UploadRagFileConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UploadRagFileConfig other = - (com.google.cloud.vertexai.api.UploadRagFileConfig) obj; - - if (hasRagFileTransformationConfig() != other.hasRagFileTransformationConfig()) return false; - if (hasRagFileTransformationConfig()) { - if (!getRagFileTransformationConfig().equals(other.getRagFileTransformationConfig())) - 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 (hasRagFileTransformationConfig()) { - hash = (37 * hash) + RAG_FILE_TRANSFORMATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagFileTransformationConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig 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.vertexai.api.UploadRagFileConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig 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.vertexai.api.UploadRagFileConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UploadRagFileConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for uploading RagFile.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UploadRagFileConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UploadRagFileConfig) - com.google.cloud.vertexai.api.UploadRagFileConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UploadRagFileConfig.class, - com.google.cloud.vertexai.api.UploadRagFileConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UploadRagFileConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagFileTransformationConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ragFileTransformationConfig_ = null; - if (ragFileTransformationConfigBuilder_ != null) { - ragFileTransformationConfigBuilder_.dispose(); - ragFileTransformationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UploadRagFileConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UploadRagFileConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UploadRagFileConfig build() { - com.google.cloud.vertexai.api.UploadRagFileConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UploadRagFileConfig buildPartial() { - com.google.cloud.vertexai.api.UploadRagFileConfig result = - new com.google.cloud.vertexai.api.UploadRagFileConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.UploadRagFileConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ragFileTransformationConfig_ = - ragFileTransformationConfigBuilder_ == null - ? ragFileTransformationConfig_ - : ragFileTransformationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UploadRagFileConfig) { - return mergeFrom((com.google.cloud.vertexai.api.UploadRagFileConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UploadRagFileConfig other) { - if (other == com.google.cloud.vertexai.api.UploadRagFileConfig.getDefaultInstance()) - return this; - if (other.hasRagFileTransformationConfig()) { - mergeRagFileTransformationConfig(other.getRagFileTransformationConfig()); - } - 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 26: - { - input.readMessage( - internalGetRagFileTransformationConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - 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.vertexai.api.RagFileTransformationConfig ragFileTransformationConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder> - ragFileTransformationConfigBuilder_; - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - public boolean hasRagFileTransformationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return The ragFileTransformationConfig. - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfig - getRagFileTransformationConfig() { - if (ragFileTransformationConfigBuilder_ == null) { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } else { - return ragFileTransformationConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public Builder setRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig value) { - if (ragFileTransformationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragFileTransformationConfig_ = value; - } else { - ragFileTransformationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public Builder setRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder builderForValue) { - if (ragFileTransformationConfigBuilder_ == null) { - ragFileTransformationConfig_ = builderForValue.build(); - } else { - ragFileTransformationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public Builder mergeRagFileTransformationConfig( - com.google.cloud.vertexai.api.RagFileTransformationConfig value) { - if (ragFileTransformationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && ragFileTransformationConfig_ != null - && ragFileTransformationConfig_ - != com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance()) { - getRagFileTransformationConfigBuilder().mergeFrom(value); - } else { - ragFileTransformationConfig_ = value; - } - } else { - ragFileTransformationConfigBuilder_.mergeFrom(value); - } - if (ragFileTransformationConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public Builder clearRagFileTransformationConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - ragFileTransformationConfig_ = null; - if (ragFileTransformationConfigBuilder_ != null) { - ragFileTransformationConfigBuilder_.dispose(); - ragFileTransformationConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder - getRagFileTransformationConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetRagFileTransformationConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - public com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder() { - if (ragFileTransformationConfigBuilder_ != null) { - return ragFileTransformationConfigBuilder_.getMessageOrBuilder(); - } else { - return ragFileTransformationConfig_ == null - ? com.google.cloud.vertexai.api.RagFileTransformationConfig.getDefaultInstance() - : ragFileTransformationConfig_; - } - } - - /** - * - * - *
-     * Specifies the transformation config for RagFiles.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder> - internalGetRagFileTransformationConfigFieldBuilder() { - if (ragFileTransformationConfigBuilder_ == null) { - ragFileTransformationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagFileTransformationConfig, - com.google.cloud.vertexai.api.RagFileTransformationConfig.Builder, - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder>( - getRagFileTransformationConfig(), getParentForChildren(), isClean()); - ragFileTransformationConfig_ = null; - } - return ragFileTransformationConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UploadRagFileConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UploadRagFileConfig) - private static final com.google.cloud.vertexai.api.UploadRagFileConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UploadRagFileConfig(); - } - - public static com.google.cloud.vertexai.api.UploadRagFileConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UploadRagFileConfig 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.vertexai.api.UploadRagFileConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfigOrBuilder.java deleted file mode 100644 index 7054d0841374..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UploadRagFileConfigOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UploadRagFileConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UploadRagFileConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return Whether the ragFileTransformationConfig field is set. - */ - boolean hasRagFileTransformationConfig(); - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - * - * @return The ragFileTransformationConfig. - */ - com.google.cloud.vertexai.api.RagFileTransformationConfig getRagFileTransformationConfig(); - - /** - * - * - *
-   * Specifies the transformation config for RagFiles.
-   * 
- * - * .google.cloud.vertexai.v1.RagFileTransformationConfig rag_file_transformation_config = 3; - * - */ - com.google.cloud.vertexai.api.RagFileTransformationConfigOrBuilder - getRagFileTransformationConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContext.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContext.java deleted file mode 100644 index 9d348690d07b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContext.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Tool to support URL context.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlContext} - */ -@com.google.protobuf.Generated -public final class UrlContext extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UrlContext) - UrlContextOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UrlContext"); - } - - // Use UrlContext.newBuilder() to construct. - private UrlContext(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UrlContext() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_UrlContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_UrlContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlContext.class, - com.google.cloud.vertexai.api.UrlContext.Builder.class); - } - - 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.cloud.vertexai.api.UrlContext)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UrlContext other = (com.google.cloud.vertexai.api.UrlContext) 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.cloud.vertexai.api.UrlContext parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContext 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.vertexai.api.UrlContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContext 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.vertexai.api.UrlContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContext parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContext parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContext parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContext parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContext parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UrlContext 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Tool to support URL context.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlContext} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UrlContext) - com.google.cloud.vertexai.api.UrlContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_UrlContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_UrlContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlContext.class, - com.google.cloud.vertexai.api.UrlContext.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UrlContext.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.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.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_UrlContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContext getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UrlContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContext build() { - com.google.cloud.vertexai.api.UrlContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContext buildPartial() { - com.google.cloud.vertexai.api.UrlContext result = - new com.google.cloud.vertexai.api.UrlContext(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UrlContext) { - return mergeFrom((com.google.cloud.vertexai.api.UrlContext) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UrlContext other) { - if (other == com.google.cloud.vertexai.api.UrlContext.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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UrlContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UrlContext) - private static final com.google.cloud.vertexai.api.UrlContext DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UrlContext(); - } - - public static com.google.cloud.vertexai.api.UrlContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UrlContext 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.vertexai.api.UrlContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadata.java deleted file mode 100644 index 1421fa94fbca..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadata.java +++ /dev/null @@ -1,970 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Metadata related to url context retrieval tool.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlContextMetadata} - */ -@com.google.protobuf.Generated -public final class UrlContextMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UrlContextMetadata) - UrlContextMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UrlContextMetadata"); - } - - // Use UrlContextMetadata.newBuilder() to construct. - private UrlContextMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UrlContextMetadata() { - urlMetadata_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlContextMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlContextMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlContextMetadata.class, - com.google.cloud.vertexai.api.UrlContextMetadata.Builder.class); - } - - public static final int URL_METADATA_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List urlMetadata_; - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getUrlMetadataList() { - return urlMetadata_; - } - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getUrlMetadataOrBuilderList() { - return urlMetadata_; - } - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getUrlMetadataCount() { - return urlMetadata_.size(); - } - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata getUrlMetadata(int index) { - return urlMetadata_.get(index); - } - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadataOrBuilder getUrlMetadataOrBuilder(int index) { - return urlMetadata_.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 < urlMetadata_.size(); i++) { - output.writeMessage(1, urlMetadata_.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 < urlMetadata_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, urlMetadata_.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.vertexai.api.UrlContextMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UrlContextMetadata other = - (com.google.cloud.vertexai.api.UrlContextMetadata) obj; - - if (!getUrlMetadataList().equals(other.getUrlMetadataList())) 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 (getUrlMetadataCount() > 0) { - hash = (37 * hash) + URL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUrlMetadataList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata 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.vertexai.api.UrlContextMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata 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.vertexai.api.UrlContextMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UrlContextMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Metadata related to url context retrieval tool.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlContextMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UrlContextMetadata) - com.google.cloud.vertexai.api.UrlContextMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlContextMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlContextMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlContextMetadata.class, - com.google.cloud.vertexai.api.UrlContextMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UrlContextMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (urlMetadataBuilder_ == null) { - urlMetadata_ = java.util.Collections.emptyList(); - } else { - urlMetadata_ = null; - urlMetadataBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlContextMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextMetadata build() { - com.google.cloud.vertexai.api.UrlContextMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlContextMetadata buildPartial() { - com.google.cloud.vertexai.api.UrlContextMetadata result = - new com.google.cloud.vertexai.api.UrlContextMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.vertexai.api.UrlContextMetadata result) { - if (urlMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - urlMetadata_ = java.util.Collections.unmodifiableList(urlMetadata_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.urlMetadata_ = urlMetadata_; - } else { - result.urlMetadata_ = urlMetadataBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.UrlContextMetadata result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UrlContextMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.UrlContextMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UrlContextMetadata other) { - if (other == com.google.cloud.vertexai.api.UrlContextMetadata.getDefaultInstance()) - return this; - if (urlMetadataBuilder_ == null) { - if (!other.urlMetadata_.isEmpty()) { - if (urlMetadata_.isEmpty()) { - urlMetadata_ = other.urlMetadata_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUrlMetadataIsMutable(); - urlMetadata_.addAll(other.urlMetadata_); - } - onChanged(); - } - } else { - if (!other.urlMetadata_.isEmpty()) { - if (urlMetadataBuilder_.isEmpty()) { - urlMetadataBuilder_.dispose(); - urlMetadataBuilder_ = null; - urlMetadata_ = other.urlMetadata_; - bitField0_ = (bitField0_ & ~0x00000001); - urlMetadataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetUrlMetadataFieldBuilder() - : null; - } else { - urlMetadataBuilder_.addAllMessages(other.urlMetadata_); - } - } - } - 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.vertexai.api.UrlMetadata m = - input.readMessage( - com.google.cloud.vertexai.api.UrlMetadata.parser(), extensionRegistry); - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - urlMetadata_.add(m); - } else { - urlMetadataBuilder_.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 urlMetadata_ = - java.util.Collections.emptyList(); - - private void ensureUrlMetadataIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - urlMetadata_ = - new java.util.ArrayList(urlMetadata_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.UrlMetadata, - com.google.cloud.vertexai.api.UrlMetadata.Builder, - com.google.cloud.vertexai.api.UrlMetadataOrBuilder> - urlMetadataBuilder_; - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getUrlMetadataList() { - if (urlMetadataBuilder_ == null) { - return java.util.Collections.unmodifiableList(urlMetadata_); - } else { - return urlMetadataBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getUrlMetadataCount() { - if (urlMetadataBuilder_ == null) { - return urlMetadata_.size(); - } else { - return urlMetadataBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlMetadata getUrlMetadata(int index) { - if (urlMetadataBuilder_ == null) { - return urlMetadata_.get(index); - } else { - return urlMetadataBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUrlMetadata(int index, com.google.cloud.vertexai.api.UrlMetadata value) { - if (urlMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrlMetadataIsMutable(); - urlMetadata_.set(index, value); - onChanged(); - } else { - urlMetadataBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUrlMetadata( - int index, com.google.cloud.vertexai.api.UrlMetadata.Builder builderForValue) { - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - urlMetadata_.set(index, builderForValue.build()); - onChanged(); - } else { - urlMetadataBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addUrlMetadata(com.google.cloud.vertexai.api.UrlMetadata value) { - if (urlMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrlMetadataIsMutable(); - urlMetadata_.add(value); - onChanged(); - } else { - urlMetadataBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addUrlMetadata(int index, com.google.cloud.vertexai.api.UrlMetadata value) { - if (urlMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrlMetadataIsMutable(); - urlMetadata_.add(index, value); - onChanged(); - } else { - urlMetadataBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addUrlMetadata( - com.google.cloud.vertexai.api.UrlMetadata.Builder builderForValue) { - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - urlMetadata_.add(builderForValue.build()); - onChanged(); - } else { - urlMetadataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addUrlMetadata( - int index, com.google.cloud.vertexai.api.UrlMetadata.Builder builderForValue) { - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - urlMetadata_.add(index, builderForValue.build()); - onChanged(); - } else { - urlMetadataBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllUrlMetadata( - java.lang.Iterable values) { - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, urlMetadata_); - onChanged(); - } else { - urlMetadataBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUrlMetadata() { - if (urlMetadataBuilder_ == null) { - urlMetadata_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - urlMetadataBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeUrlMetadata(int index) { - if (urlMetadataBuilder_ == null) { - ensureUrlMetadataIsMutable(); - urlMetadata_.remove(index); - onChanged(); - } else { - urlMetadataBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlMetadata.Builder getUrlMetadataBuilder(int index) { - return internalGetUrlMetadataFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlMetadataOrBuilder getUrlMetadataOrBuilder(int index) { - if (urlMetadataBuilder_ == null) { - return urlMetadata_.get(index); - } else { - return urlMetadataBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getUrlMetadataOrBuilderList() { - if (urlMetadataBuilder_ != null) { - return urlMetadataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(urlMetadata_); - } - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlMetadata.Builder addUrlMetadataBuilder() { - return internalGetUrlMetadataFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.UrlMetadata.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.UrlMetadata.Builder addUrlMetadataBuilder(int index) { - return internalGetUrlMetadataFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.UrlMetadata.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. List of url context.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getUrlMetadataBuilderList() { - return internalGetUrlMetadataFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.UrlMetadata, - com.google.cloud.vertexai.api.UrlMetadata.Builder, - com.google.cloud.vertexai.api.UrlMetadataOrBuilder> - internalGetUrlMetadataFieldBuilder() { - if (urlMetadataBuilder_ == null) { - urlMetadataBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.UrlMetadata, - com.google.cloud.vertexai.api.UrlMetadata.Builder, - com.google.cloud.vertexai.api.UrlMetadataOrBuilder>( - urlMetadata_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - urlMetadata_ = null; - } - return urlMetadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UrlContextMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UrlContextMetadata) - private static final com.google.cloud.vertexai.api.UrlContextMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UrlContextMetadata(); - } - - public static com.google.cloud.vertexai.api.UrlContextMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UrlContextMetadata 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.vertexai.api.UrlContextMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadataOrBuilder.java deleted file mode 100644 index 2c58a8da7711..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextMetadataOrBuilder.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UrlContextMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UrlContextMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getUrlMetadataList(); - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.UrlMetadata getUrlMetadata(int index); - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getUrlMetadataCount(); - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getUrlMetadataOrBuilderList(); - - /** - * - * - *
-   * Output only. List of url context.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.UrlMetadata url_metadata = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.UrlMetadataOrBuilder getUrlMetadataOrBuilder(int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextOrBuilder.java deleted file mode 100644 index e5c7120a5893..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlContextOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UrlContextOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UrlContext) - com.google.protobuf.MessageOrBuilder {} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadata.java deleted file mode 100644 index 77980b3f247f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadata.java +++ /dev/null @@ -1,939 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Context of the a single url retrieval.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlMetadata} - */ -@com.google.protobuf.Generated -public final class UrlMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UrlMetadata) - UrlMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UrlMetadata"); - } - - // Use UrlMetadata.newBuilder() to construct. - private UrlMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UrlMetadata() { - retrievedUrl_ = ""; - urlRetrievalStatus_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlMetadata.class, - com.google.cloud.vertexai.api.UrlMetadata.Builder.class); - } - - /** - * - * - *
-   * Status of the url retrieval.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus} - */ - public enum UrlRetrievalStatus implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Default value. This value is unused.
-     * 
- * - * URL_RETRIEVAL_STATUS_UNSPECIFIED = 0; - */ - URL_RETRIEVAL_STATUS_UNSPECIFIED(0), - /** - * - * - *
-     * Url retrieval is successful.
-     * 
- * - * URL_RETRIEVAL_STATUS_SUCCESS = 1; - */ - URL_RETRIEVAL_STATUS_SUCCESS(1), - /** - * - * - *
-     * Url retrieval is failed due to error.
-     * 
- * - * URL_RETRIEVAL_STATUS_ERROR = 2; - */ - URL_RETRIEVAL_STATUS_ERROR(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UrlRetrievalStatus"); - } - - /** - * - * - *
-     * Default value. This value is unused.
-     * 
- * - * URL_RETRIEVAL_STATUS_UNSPECIFIED = 0; - */ - public static final int URL_RETRIEVAL_STATUS_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Url retrieval is successful.
-     * 
- * - * URL_RETRIEVAL_STATUS_SUCCESS = 1; - */ - public static final int URL_RETRIEVAL_STATUS_SUCCESS_VALUE = 1; - - /** - * - * - *
-     * Url retrieval is failed due to error.
-     * 
- * - * URL_RETRIEVAL_STATUS_ERROR = 2; - */ - public static final int URL_RETRIEVAL_STATUS_ERROR_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 UrlRetrievalStatus 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 UrlRetrievalStatus forNumber(int value) { - switch (value) { - case 0: - return URL_RETRIEVAL_STATUS_UNSPECIFIED; - case 1: - return URL_RETRIEVAL_STATUS_SUCCESS; - case 2: - return URL_RETRIEVAL_STATUS_ERROR; - 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 UrlRetrievalStatus findValueByNumber(int number) { - return UrlRetrievalStatus.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.UrlMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final UrlRetrievalStatus[] VALUES = values(); - - public static UrlRetrievalStatus 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 UrlRetrievalStatus(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus) - } - - public static final int RETRIEVED_URL_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object retrievedUrl_ = ""; - - /** - * - * - *
-   * Retrieved url by the tool.
-   * 
- * - * string retrieved_url = 1; - * - * @return The retrievedUrl. - */ - @java.lang.Override - public java.lang.String getRetrievedUrl() { - java.lang.Object ref = retrievedUrl_; - 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(); - retrievedUrl_ = s; - return s; - } - } - - /** - * - * - *
-   * Retrieved url by the tool.
-   * 
- * - * string retrieved_url = 1; - * - * @return The bytes for retrievedUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRetrievedUrlBytes() { - java.lang.Object ref = retrievedUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - retrievedUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_RETRIEVAL_STATUS_FIELD_NUMBER = 2; - private int urlRetrievalStatus_ = 0; - - /** - * - * - *
-   * Status of the url retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * @return The enum numeric value on the wire for urlRetrievalStatus. - */ - @java.lang.Override - public int getUrlRetrievalStatusValue() { - return urlRetrievalStatus_; - } - - /** - * - * - *
-   * Status of the url retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * @return The urlRetrievalStatus. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus getUrlRetrievalStatus() { - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus result = - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus.forNumber(urlRetrievalStatus_); - return result == null - ? com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(retrievedUrl_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, retrievedUrl_); - } - if (urlRetrievalStatus_ - != com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus - .URL_RETRIEVAL_STATUS_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, urlRetrievalStatus_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(retrievedUrl_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, retrievedUrl_); - } - if (urlRetrievalStatus_ - != com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus - .URL_RETRIEVAL_STATUS_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, urlRetrievalStatus_); - } - 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.vertexai.api.UrlMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UrlMetadata other = - (com.google.cloud.vertexai.api.UrlMetadata) obj; - - if (!getRetrievedUrl().equals(other.getRetrievedUrl())) return false; - if (urlRetrievalStatus_ != other.urlRetrievalStatus_) 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) + RETRIEVED_URL_FIELD_NUMBER; - hash = (53 * hash) + getRetrievedUrl().hashCode(); - hash = (37 * hash) + URL_RETRIEVAL_STATUS_FIELD_NUMBER; - hash = (53 * hash) + urlRetrievalStatus_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlMetadata 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.vertexai.api.UrlMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlMetadata 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.vertexai.api.UrlMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UrlMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UrlMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Context of the a single url retrieval.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UrlMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UrlMetadata) - com.google.cloud.vertexai.api.UrlMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UrlMetadata.class, - com.google.cloud.vertexai.api.UrlMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UrlMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - retrievedUrl_ = ""; - urlRetrievalStatus_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_UrlMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UrlMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata build() { - com.google.cloud.vertexai.api.UrlMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata buildPartial() { - com.google.cloud.vertexai.api.UrlMetadata result = - new com.google.cloud.vertexai.api.UrlMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.UrlMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.retrievedUrl_ = retrievedUrl_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.urlRetrievalStatus_ = urlRetrievalStatus_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UrlMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.UrlMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UrlMetadata other) { - if (other == com.google.cloud.vertexai.api.UrlMetadata.getDefaultInstance()) return this; - if (!other.getRetrievedUrl().isEmpty()) { - retrievedUrl_ = other.retrievedUrl_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.urlRetrievalStatus_ != 0) { - setUrlRetrievalStatusValue(other.getUrlRetrievalStatusValue()); - } - 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: - { - retrievedUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - urlRetrievalStatus_ = input.readEnum(); - 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 retrievedUrl_ = ""; - - /** - * - * - *
-     * Retrieved url by the tool.
-     * 
- * - * string retrieved_url = 1; - * - * @return The retrievedUrl. - */ - public java.lang.String getRetrievedUrl() { - java.lang.Object ref = retrievedUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - retrievedUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Retrieved url by the tool.
-     * 
- * - * string retrieved_url = 1; - * - * @return The bytes for retrievedUrl. - */ - public com.google.protobuf.ByteString getRetrievedUrlBytes() { - java.lang.Object ref = retrievedUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - retrievedUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Retrieved url by the tool.
-     * 
- * - * string retrieved_url = 1; - * - * @param value The retrievedUrl to set. - * @return This builder for chaining. - */ - public Builder setRetrievedUrl(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - retrievedUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Retrieved url by the tool.
-     * 
- * - * string retrieved_url = 1; - * - * @return This builder for chaining. - */ - public Builder clearRetrievedUrl() { - retrievedUrl_ = getDefaultInstance().getRetrievedUrl(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Retrieved url by the tool.
-     * 
- * - * string retrieved_url = 1; - * - * @param value The bytes for retrievedUrl to set. - * @return This builder for chaining. - */ - public Builder setRetrievedUrlBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - retrievedUrl_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int urlRetrievalStatus_ = 0; - - /** - * - * - *
-     * Status of the url retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * - * @return The enum numeric value on the wire for urlRetrievalStatus. - */ - @java.lang.Override - public int getUrlRetrievalStatusValue() { - return urlRetrievalStatus_; - } - - /** - * - * - *
-     * Status of the url retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * - * @param value The enum numeric value on the wire for urlRetrievalStatus to set. - * @return This builder for chaining. - */ - public Builder setUrlRetrievalStatusValue(int value) { - urlRetrievalStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Status of the url retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * - * @return The urlRetrievalStatus. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus getUrlRetrievalStatus() { - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus result = - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus.forNumber( - urlRetrievalStatus_); - return result == null - ? com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Status of the url retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * - * @param value The urlRetrievalStatus to set. - * @return This builder for chaining. - */ - public Builder setUrlRetrievalStatus( - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - urlRetrievalStatus_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Status of the url retrieval.
-     * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearUrlRetrievalStatus() { - bitField0_ = (bitField0_ & ~0x00000002); - urlRetrievalStatus_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UrlMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UrlMetadata) - private static final com.google.cloud.vertexai.api.UrlMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UrlMetadata(); - } - - public static com.google.cloud.vertexai.api.UrlMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UrlMetadata 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.vertexai.api.UrlMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadataOrBuilder.java deleted file mode 100644 index 6d982e1c63ce..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UrlMetadataOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UrlMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UrlMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Retrieved url by the tool.
-   * 
- * - * string retrieved_url = 1; - * - * @return The retrievedUrl. - */ - java.lang.String getRetrievedUrl(); - - /** - * - * - *
-   * Retrieved url by the tool.
-   * 
- * - * string retrieved_url = 1; - * - * @return The bytes for retrievedUrl. - */ - com.google.protobuf.ByteString getRetrievedUrlBytes(); - - /** - * - * - *
-   * Status of the url retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * @return The enum numeric value on the wire for urlRetrievalStatus. - */ - int getUrlRetrievalStatusValue(); - - /** - * - * - *
-   * Status of the url retrieval.
-   * 
- * - * .google.cloud.vertexai.v1.UrlMetadata.UrlRetrievalStatus url_retrieval_status = 2; - * - * @return The urlRetrievalStatus. - */ - com.google.cloud.vertexai.api.UrlMetadata.UrlRetrievalStatus getUrlRetrievalStatus(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadata.java deleted file mode 100644 index e503280ff978..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadata.java +++ /dev/null @@ -1,3771 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/usage_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Usage metadata about the content generation request and response.
- * This message provides a detailed breakdown of token usage and other
- * relevant metrics.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UsageMetadata} - */ -@com.google.protobuf.Generated -public final class UsageMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.UsageMetadata) - UsageMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UsageMetadata"); - } - - // Use UsageMetadata.newBuilder() to construct. - private UsageMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private UsageMetadata() { - promptTokensDetails_ = java.util.Collections.emptyList(); - cacheTokensDetails_ = java.util.Collections.emptyList(); - candidatesTokensDetails_ = java.util.Collections.emptyList(); - toolUsePromptTokensDetails_ = java.util.Collections.emptyList(); - trafficType_ = 0; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.UsageMetadataProto - .internal_static_google_cloud_vertexai_v1_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.UsageMetadataProto - .internal_static_google_cloud_vertexai_v1_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UsageMetadata.class, - com.google.cloud.vertexai.api.UsageMetadata.Builder.class); - } - - /** - * - * - *
-   * The type of traffic that this request was processed with, indicating which
-   * quota gets consumed.
-   * 
- * - * Protobuf enum {@code google.cloud.vertexai.v1.UsageMetadata.TrafficType} - */ - public enum TrafficType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unspecified request traffic type.
-     * 
- * - * TRAFFIC_TYPE_UNSPECIFIED = 0; - */ - TRAFFIC_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Type for Pay-As-You-Go traffic.
-     * 
- * - * ON_DEMAND = 1; - */ - ON_DEMAND(1), - /** - * - * - *
-     * Type for Provisioned Throughput traffic.
-     * 
- * - * PROVISIONED_THROUGHPUT = 2; - */ - PROVISIONED_THROUGHPUT(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "TrafficType"); - } - - /** - * - * - *
-     * Unspecified request traffic type.
-     * 
- * - * TRAFFIC_TYPE_UNSPECIFIED = 0; - */ - public static final int TRAFFIC_TYPE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
-     * Type for Pay-As-You-Go traffic.
-     * 
- * - * ON_DEMAND = 1; - */ - public static final int ON_DEMAND_VALUE = 1; - - /** - * - * - *
-     * Type for Provisioned Throughput traffic.
-     * 
- * - * PROVISIONED_THROUGHPUT = 2; - */ - public static final int PROVISIONED_THROUGHPUT_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 TrafficType 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 TrafficType forNumber(int value) { - switch (value) { - case 0: - return TRAFFIC_TYPE_UNSPECIFIED; - case 1: - return ON_DEMAND; - case 2: - return PROVISIONED_THROUGHPUT; - 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 TrafficType findValueByNumber(int number) { - return TrafficType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.vertexai.api.UsageMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final TrafficType[] VALUES = values(); - - public static TrafficType 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 TrafficType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.UsageMetadata.TrafficType) - } - - public static final int PROMPT_TOKEN_COUNT_FIELD_NUMBER = 1; - private int promptTokenCount_ = 0; - - /** - * - * - *
-   * The total number of tokens in the prompt. This includes any text, images,
-   * or other media provided in the request. When `cached_content` is set,
-   * this also includes the number of tokens in the cached content.
-   * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - @java.lang.Override - public int getPromptTokenCount() { - return promptTokenCount_; - } - - public static final int CANDIDATES_TOKEN_COUNT_FIELD_NUMBER = 2; - private int candidatesTokenCount_ = 0; - - /** - * - * - *
-   * The total number of tokens in the generated candidates.
-   * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - @java.lang.Override - public int getCandidatesTokenCount() { - return candidatesTokenCount_; - } - - public static final int TOTAL_TOKEN_COUNT_FIELD_NUMBER = 3; - private int totalTokenCount_ = 0; - - /** - * - * - *
-   * The total number of tokens for the entire request. This is the sum of
-   * `prompt_token_count`, `candidates_token_count`,
-   * `tool_use_prompt_token_count`, and `thoughts_token_count`.
-   * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - public static final int TOOL_USE_PROMPT_TOKEN_COUNT_FIELD_NUMBER = 13; - private int toolUsePromptTokenCount_ = 0; - - /** - * - * - *
-   * Output only. The number of tokens in the results from tool executions,
-   * which are provided back to the model as input, if applicable.
-   * 
- * - * int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The toolUsePromptTokenCount. - */ - @java.lang.Override - public int getToolUsePromptTokenCount() { - return toolUsePromptTokenCount_; - } - - public static final int THOUGHTS_TOKEN_COUNT_FIELD_NUMBER = 14; - private int thoughtsTokenCount_ = 0; - - /** - * - * - *
-   * Output only. The number of tokens that were part of the model's generated
-   * "thoughts" output, if applicable.
-   * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - @java.lang.Override - public int getThoughtsTokenCount() { - return thoughtsTokenCount_; - } - - public static final int CACHED_CONTENT_TOKEN_COUNT_FIELD_NUMBER = 5; - private int cachedContentTokenCount_ = 0; - - /** - * - * - *
-   * Output only. The number of tokens in the cached content that was used for
-   * this request.
-   * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The cachedContentTokenCount. - */ - @java.lang.Override - public int getCachedContentTokenCount() { - return cachedContentTokenCount_; - } - - public static final int PROMPT_TOKENS_DETAILS_FIELD_NUMBER = 9; - - @SuppressWarnings("serial") - private java.util.List promptTokensDetails_; - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsList() { - return promptTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPromptTokensDetailsOrBuilderList() { - return promptTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getPromptTokensDetailsCount() { - return promptTokensDetails_.size(); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - return promptTokensDetails_.get(index); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder( - int index) { - return promptTokensDetails_.get(index); - } - - public static final int CACHE_TOKENS_DETAILS_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private java.util.List cacheTokensDetails_; - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCacheTokensDetailsList() { - return cacheTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCacheTokensDetailsOrBuilderList() { - return cacheTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCacheTokensDetailsCount() { - return cacheTokensDetails_.size(); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index) { - return cacheTokensDetails_.get(index); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder( - int index) { - return cacheTokensDetails_.get(index); - } - - public static final int CANDIDATES_TOKENS_DETAILS_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private java.util.List candidatesTokensDetails_; - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCandidatesTokensDetailsList() { - return candidatesTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getCandidatesTokensDetailsOrBuilderList() { - return candidatesTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getCandidatesTokensDetailsCount() { - return candidatesTokensDetails_.size(); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails(int index) { - return candidatesTokensDetails_.get(index); - } - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getCandidatesTokensDetailsOrBuilder(int index) { - return candidatesTokensDetails_.get(index); - } - - public static final int TOOL_USE_PROMPT_TOKENS_DETAILS_FIELD_NUMBER = 12; - - @SuppressWarnings("serial") - private java.util.List - toolUsePromptTokensDetails_; - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getToolUsePromptTokensDetailsList() { - return toolUsePromptTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getToolUsePromptTokensDetailsOrBuilderList() { - return toolUsePromptTokensDetails_; - } - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getToolUsePromptTokensDetailsCount() { - return toolUsePromptTokensDetails_.size(); - } - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCount getToolUsePromptTokensDetails(int index) { - return toolUsePromptTokensDetails_.get(index); - } - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getToolUsePromptTokensDetailsOrBuilder(int index) { - return toolUsePromptTokensDetails_.get(index); - } - - public static final int TRAFFIC_TYPE_FIELD_NUMBER = 8; - private int trafficType_ = 0; - - /** - * - * - *
-   * Output only. The traffic type for this request.
-   * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for trafficType. - */ - @java.lang.Override - public int getTrafficTypeValue() { - return trafficType_; - } - - /** - * - * - *
-   * Output only. The traffic type for this request.
-   * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The trafficType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata.TrafficType getTrafficType() { - com.google.cloud.vertexai.api.UsageMetadata.TrafficType result = - com.google.cloud.vertexai.api.UsageMetadata.TrafficType.forNumber(trafficType_); - return result == null - ? com.google.cloud.vertexai.api.UsageMetadata.TrafficType.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 (promptTokenCount_ != 0) { - output.writeInt32(1, promptTokenCount_); - } - if (candidatesTokenCount_ != 0) { - output.writeInt32(2, candidatesTokenCount_); - } - if (totalTokenCount_ != 0) { - output.writeInt32(3, totalTokenCount_); - } - if (cachedContentTokenCount_ != 0) { - output.writeInt32(5, cachedContentTokenCount_); - } - if (trafficType_ - != com.google.cloud.vertexai.api.UsageMetadata.TrafficType.TRAFFIC_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(8, trafficType_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - output.writeMessage(9, promptTokensDetails_.get(i)); - } - for (int i = 0; i < cacheTokensDetails_.size(); i++) { - output.writeMessage(10, cacheTokensDetails_.get(i)); - } - for (int i = 0; i < candidatesTokensDetails_.size(); i++) { - output.writeMessage(11, candidatesTokensDetails_.get(i)); - } - for (int i = 0; i < toolUsePromptTokensDetails_.size(); i++) { - output.writeMessage(12, toolUsePromptTokensDetails_.get(i)); - } - if (toolUsePromptTokenCount_ != 0) { - output.writeInt32(13, toolUsePromptTokenCount_); - } - if (thoughtsTokenCount_ != 0) { - output.writeInt32(14, thoughtsTokenCount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (promptTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, promptTokenCount_); - } - if (candidatesTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, candidatesTokenCount_); - } - if (totalTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalTokenCount_); - } - if (cachedContentTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, cachedContentTokenCount_); - } - if (trafficType_ - != com.google.cloud.vertexai.api.UsageMetadata.TrafficType.TRAFFIC_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, trafficType_); - } - for (int i = 0; i < promptTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(9, promptTokensDetails_.get(i)); - } - for (int i = 0; i < cacheTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(10, cacheTokensDetails_.get(i)); - } - for (int i = 0; i < candidatesTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, candidatesTokensDetails_.get(i)); - } - for (int i = 0; i < toolUsePromptTokensDetails_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, toolUsePromptTokensDetails_.get(i)); - } - if (toolUsePromptTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, toolUsePromptTokenCount_); - } - if (thoughtsTokenCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, thoughtsTokenCount_); - } - 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.vertexai.api.UsageMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.UsageMetadata other = - (com.google.cloud.vertexai.api.UsageMetadata) obj; - - if (getPromptTokenCount() != other.getPromptTokenCount()) return false; - if (getCandidatesTokenCount() != other.getCandidatesTokenCount()) return false; - if (getTotalTokenCount() != other.getTotalTokenCount()) return false; - if (getToolUsePromptTokenCount() != other.getToolUsePromptTokenCount()) return false; - if (getThoughtsTokenCount() != other.getThoughtsTokenCount()) return false; - if (getCachedContentTokenCount() != other.getCachedContentTokenCount()) return false; - if (!getPromptTokensDetailsList().equals(other.getPromptTokensDetailsList())) return false; - if (!getCacheTokensDetailsList().equals(other.getCacheTokensDetailsList())) return false; - if (!getCandidatesTokensDetailsList().equals(other.getCandidatesTokensDetailsList())) - return false; - if (!getToolUsePromptTokensDetailsList().equals(other.getToolUsePromptTokensDetailsList())) - return false; - if (trafficType_ != other.trafficType_) 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) + PROMPT_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getPromptTokenCount(); - hash = (37 * hash) + CANDIDATES_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesTokenCount(); - hash = (37 * hash) + TOTAL_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getTotalTokenCount(); - hash = (37 * hash) + TOOL_USE_PROMPT_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getToolUsePromptTokenCount(); - hash = (37 * hash) + THOUGHTS_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getThoughtsTokenCount(); - hash = (37 * hash) + CACHED_CONTENT_TOKEN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getCachedContentTokenCount(); - if (getPromptTokensDetailsCount() > 0) { - hash = (37 * hash) + PROMPT_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getPromptTokensDetailsList().hashCode(); - } - if (getCacheTokensDetailsCount() > 0) { - hash = (37 * hash) + CACHE_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getCacheTokensDetailsList().hashCode(); - } - if (getCandidatesTokensDetailsCount() > 0) { - hash = (37 * hash) + CANDIDATES_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getCandidatesTokensDetailsList().hashCode(); - } - if (getToolUsePromptTokensDetailsCount() > 0) { - hash = (37 * hash) + TOOL_USE_PROMPT_TOKENS_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getToolUsePromptTokensDetailsList().hashCode(); - } - hash = (37 * hash) + TRAFFIC_TYPE_FIELD_NUMBER; - hash = (53 * hash) + trafficType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UsageMetadata 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.vertexai.api.UsageMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UsageMetadata 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.vertexai.api.UsageMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.UsageMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.UsageMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Usage metadata about the content generation request and response.
-   * This message provides a detailed breakdown of token usage and other
-   * relevant metrics.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.UsageMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.UsageMetadata) - com.google.cloud.vertexai.api.UsageMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.UsageMetadataProto - .internal_static_google_cloud_vertexai_v1_UsageMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.UsageMetadataProto - .internal_static_google_cloud_vertexai_v1_UsageMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.UsageMetadata.class, - com.google.cloud.vertexai.api.UsageMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.UsageMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - promptTokenCount_ = 0; - candidatesTokenCount_ = 0; - totalTokenCount_ = 0; - toolUsePromptTokenCount_ = 0; - thoughtsTokenCount_ = 0; - cachedContentTokenCount_ = 0; - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - } else { - promptTokensDetails_ = null; - promptTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetails_ = java.util.Collections.emptyList(); - } else { - cacheTokensDetails_ = null; - cacheTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetails_ = java.util.Collections.emptyList(); - } else { - candidatesTokensDetails_ = null; - candidatesTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - if (toolUsePromptTokensDetailsBuilder_ == null) { - toolUsePromptTokensDetails_ = java.util.Collections.emptyList(); - } else { - toolUsePromptTokensDetails_ = null; - toolUsePromptTokensDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000200); - trafficType_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.UsageMetadataProto - .internal_static_google_cloud_vertexai_v1_UsageMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata build() { - com.google.cloud.vertexai.api.UsageMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata buildPartial() { - com.google.cloud.vertexai.api.UsageMetadata result = - new com.google.cloud.vertexai.api.UsageMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.UsageMetadata result) { - if (promptTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - promptTokensDetails_ = java.util.Collections.unmodifiableList(promptTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.promptTokensDetails_ = promptTokensDetails_; - } else { - result.promptTokensDetails_ = promptTokensDetailsBuilder_.build(); - } - if (cacheTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { - cacheTokensDetails_ = java.util.Collections.unmodifiableList(cacheTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.cacheTokensDetails_ = cacheTokensDetails_; - } else { - result.cacheTokensDetails_ = cacheTokensDetailsBuilder_.build(); - } - if (candidatesTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { - candidatesTokensDetails_ = - java.util.Collections.unmodifiableList(candidatesTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.candidatesTokensDetails_ = candidatesTokensDetails_; - } else { - result.candidatesTokensDetails_ = candidatesTokensDetailsBuilder_.build(); - } - if (toolUsePromptTokensDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - toolUsePromptTokensDetails_ = - java.util.Collections.unmodifiableList(toolUsePromptTokensDetails_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.toolUsePromptTokensDetails_ = toolUsePromptTokensDetails_; - } else { - result.toolUsePromptTokensDetails_ = toolUsePromptTokensDetailsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.UsageMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.promptTokenCount_ = promptTokenCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.candidatesTokenCount_ = candidatesTokenCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.totalTokenCount_ = totalTokenCount_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.toolUsePromptTokenCount_ = toolUsePromptTokenCount_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.thoughtsTokenCount_ = thoughtsTokenCount_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.cachedContentTokenCount_ = cachedContentTokenCount_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.trafficType_ = trafficType_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.UsageMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.UsageMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.UsageMetadata other) { - if (other == com.google.cloud.vertexai.api.UsageMetadata.getDefaultInstance()) return this; - if (other.getPromptTokenCount() != 0) { - setPromptTokenCount(other.getPromptTokenCount()); - } - if (other.getCandidatesTokenCount() != 0) { - setCandidatesTokenCount(other.getCandidatesTokenCount()); - } - if (other.getTotalTokenCount() != 0) { - setTotalTokenCount(other.getTotalTokenCount()); - } - if (other.getToolUsePromptTokenCount() != 0) { - setToolUsePromptTokenCount(other.getToolUsePromptTokenCount()); - } - if (other.getThoughtsTokenCount() != 0) { - setThoughtsTokenCount(other.getThoughtsTokenCount()); - } - if (other.getCachedContentTokenCount() != 0) { - setCachedContentTokenCount(other.getCachedContentTokenCount()); - } - if (promptTokensDetailsBuilder_ == null) { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetails_.isEmpty()) { - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.addAll(other.promptTokensDetails_); - } - onChanged(); - } - } else { - if (!other.promptTokensDetails_.isEmpty()) { - if (promptTokensDetailsBuilder_.isEmpty()) { - promptTokensDetailsBuilder_.dispose(); - promptTokensDetailsBuilder_ = null; - promptTokensDetails_ = other.promptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000040); - promptTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetPromptTokensDetailsFieldBuilder() - : null; - } else { - promptTokensDetailsBuilder_.addAllMessages(other.promptTokensDetails_); - } - } - } - if (cacheTokensDetailsBuilder_ == null) { - if (!other.cacheTokensDetails_.isEmpty()) { - if (cacheTokensDetails_.isEmpty()) { - cacheTokensDetails_ = other.cacheTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.addAll(other.cacheTokensDetails_); - } - onChanged(); - } - } else { - if (!other.cacheTokensDetails_.isEmpty()) { - if (cacheTokensDetailsBuilder_.isEmpty()) { - cacheTokensDetailsBuilder_.dispose(); - cacheTokensDetailsBuilder_ = null; - cacheTokensDetails_ = other.cacheTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000080); - cacheTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCacheTokensDetailsFieldBuilder() - : null; - } else { - cacheTokensDetailsBuilder_.addAllMessages(other.cacheTokensDetails_); - } - } - } - if (candidatesTokensDetailsBuilder_ == null) { - if (!other.candidatesTokensDetails_.isEmpty()) { - if (candidatesTokensDetails_.isEmpty()) { - candidatesTokensDetails_ = other.candidatesTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.addAll(other.candidatesTokensDetails_); - } - onChanged(); - } - } else { - if (!other.candidatesTokensDetails_.isEmpty()) { - if (candidatesTokensDetailsBuilder_.isEmpty()) { - candidatesTokensDetailsBuilder_.dispose(); - candidatesTokensDetailsBuilder_ = null; - candidatesTokensDetails_ = other.candidatesTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000100); - candidatesTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCandidatesTokensDetailsFieldBuilder() - : null; - } else { - candidatesTokensDetailsBuilder_.addAllMessages(other.candidatesTokensDetails_); - } - } - } - if (toolUsePromptTokensDetailsBuilder_ == null) { - if (!other.toolUsePromptTokensDetails_.isEmpty()) { - if (toolUsePromptTokensDetails_.isEmpty()) { - toolUsePromptTokensDetails_ = other.toolUsePromptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.addAll(other.toolUsePromptTokensDetails_); - } - onChanged(); - } - } else { - if (!other.toolUsePromptTokensDetails_.isEmpty()) { - if (toolUsePromptTokensDetailsBuilder_.isEmpty()) { - toolUsePromptTokensDetailsBuilder_.dispose(); - toolUsePromptTokensDetailsBuilder_ = null; - toolUsePromptTokensDetails_ = other.toolUsePromptTokensDetails_; - bitField0_ = (bitField0_ & ~0x00000200); - toolUsePromptTokensDetailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetToolUsePromptTokensDetailsFieldBuilder() - : null; - } else { - toolUsePromptTokensDetailsBuilder_.addAllMessages(other.toolUsePromptTokensDetails_); - } - } - } - if (other.trafficType_ != 0) { - setTrafficTypeValue(other.getTrafficTypeValue()); - } - 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: - { - promptTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - candidatesTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - totalTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 40: - { - cachedContentTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000020; - break; - } // case 40 - case 64: - { - trafficType_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 64 - case 74: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(m); - } else { - promptTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 74 - case 82: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(m); - } else { - cacheTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 82 - case 90: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(m); - } else { - candidatesTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 90 - case 98: - { - com.google.cloud.vertexai.api.ModalityTokenCount m = - input.readMessage( - com.google.cloud.vertexai.api.ModalityTokenCount.parser(), - extensionRegistry); - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.add(m); - } else { - toolUsePromptTokensDetailsBuilder_.addMessage(m); - } - break; - } // case 98 - case 104: - { - toolUsePromptTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000008; - break; - } // case 104 - case 112: - { - thoughtsTokenCount_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 112 - 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 promptTokenCount_; - - /** - * - * - *
-     * The total number of tokens in the prompt. This includes any text, images,
-     * or other media provided in the request. When `cached_content` is set,
-     * this also includes the number of tokens in the cached content.
-     * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - @java.lang.Override - public int getPromptTokenCount() { - return promptTokenCount_; - } - - /** - * - * - *
-     * The total number of tokens in the prompt. This includes any text, images,
-     * or other media provided in the request. When `cached_content` is set,
-     * this also includes the number of tokens in the cached content.
-     * 
- * - * int32 prompt_token_count = 1; - * - * @param value The promptTokenCount to set. - * @return This builder for chaining. - */ - public Builder setPromptTokenCount(int value) { - - promptTokenCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * The total number of tokens in the prompt. This includes any text, images,
-     * or other media provided in the request. When `cached_content` is set,
-     * this also includes the number of tokens in the cached content.
-     * 
- * - * int32 prompt_token_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearPromptTokenCount() { - bitField0_ = (bitField0_ & ~0x00000001); - promptTokenCount_ = 0; - onChanged(); - return this; - } - - private int candidatesTokenCount_; - - /** - * - * - *
-     * The total number of tokens in the generated candidates.
-     * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - @java.lang.Override - public int getCandidatesTokenCount() { - return candidatesTokenCount_; - } - - /** - * - * - *
-     * The total number of tokens in the generated candidates.
-     * 
- * - * int32 candidates_token_count = 2; - * - * @param value The candidatesTokenCount to set. - * @return This builder for chaining. - */ - public Builder setCandidatesTokenCount(int value) { - - candidatesTokenCount_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * The total number of tokens in the generated candidates.
-     * 
- * - * int32 candidates_token_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearCandidatesTokenCount() { - bitField0_ = (bitField0_ & ~0x00000002); - candidatesTokenCount_ = 0; - onChanged(); - return this; - } - - private int totalTokenCount_; - - /** - * - * - *
-     * The total number of tokens for the entire request. This is the sum of
-     * `prompt_token_count`, `candidates_token_count`,
-     * `tool_use_prompt_token_count`, and `thoughts_token_count`.
-     * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - @java.lang.Override - public int getTotalTokenCount() { - return totalTokenCount_; - } - - /** - * - * - *
-     * The total number of tokens for the entire request. This is the sum of
-     * `prompt_token_count`, `candidates_token_count`,
-     * `tool_use_prompt_token_count`, and `thoughts_token_count`.
-     * 
- * - * int32 total_token_count = 3; - * - * @param value The totalTokenCount to set. - * @return This builder for chaining. - */ - public Builder setTotalTokenCount(int value) { - - totalTokenCount_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * The total number of tokens for the entire request. This is the sum of
-     * `prompt_token_count`, `candidates_token_count`,
-     * `tool_use_prompt_token_count`, and `thoughts_token_count`.
-     * 
- * - * int32 total_token_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearTotalTokenCount() { - bitField0_ = (bitField0_ & ~0x00000004); - totalTokenCount_ = 0; - onChanged(); - return this; - } - - private int toolUsePromptTokenCount_; - - /** - * - * - *
-     * Output only. The number of tokens in the results from tool executions,
-     * which are provided back to the model as input, if applicable.
-     * 
- * - * int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The toolUsePromptTokenCount. - */ - @java.lang.Override - public int getToolUsePromptTokenCount() { - return toolUsePromptTokenCount_; - } - - /** - * - * - *
-     * Output only. The number of tokens in the results from tool executions,
-     * which are provided back to the model as input, if applicable.
-     * 
- * - * int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The toolUsePromptTokenCount to set. - * @return This builder for chaining. - */ - public Builder setToolUsePromptTokenCount(int value) { - - toolUsePromptTokenCount_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The number of tokens in the results from tool executions,
-     * which are provided back to the model as input, if applicable.
-     * 
- * - * int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearToolUsePromptTokenCount() { - bitField0_ = (bitField0_ & ~0x00000008); - toolUsePromptTokenCount_ = 0; - onChanged(); - return this; - } - - private int thoughtsTokenCount_; - - /** - * - * - *
-     * Output only. The number of tokens that were part of the model's generated
-     * "thoughts" output, if applicable.
-     * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - @java.lang.Override - public int getThoughtsTokenCount() { - return thoughtsTokenCount_; - } - - /** - * - * - *
-     * Output only. The number of tokens that were part of the model's generated
-     * "thoughts" output, if applicable.
-     * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The thoughtsTokenCount to set. - * @return This builder for chaining. - */ - public Builder setThoughtsTokenCount(int value) { - - thoughtsTokenCount_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The number of tokens that were part of the model's generated
-     * "thoughts" output, if applicable.
-     * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearThoughtsTokenCount() { - bitField0_ = (bitField0_ & ~0x00000010); - thoughtsTokenCount_ = 0; - onChanged(); - return this; - } - - private int cachedContentTokenCount_; - - /** - * - * - *
-     * Output only. The number of tokens in the cached content that was used for
-     * this request.
-     * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The cachedContentTokenCount. - */ - @java.lang.Override - public int getCachedContentTokenCount() { - return cachedContentTokenCount_; - } - - /** - * - * - *
-     * Output only. The number of tokens in the cached content that was used for
-     * this request.
-     * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The cachedContentTokenCount to set. - * @return This builder for chaining. - */ - public Builder setCachedContentTokenCount(int value) { - - cachedContentTokenCount_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The number of tokens in the cached content that was used for
-     * this request.
-     * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearCachedContentTokenCount() { - bitField0_ = (bitField0_ & ~0x00000020); - cachedContentTokenCount_ = 0; - onChanged(); - return this; - } - - private java.util.List promptTokensDetails_ = - java.util.Collections.emptyList(); - - private void ensurePromptTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - promptTokensDetails_ = - new java.util.ArrayList( - promptTokensDetails_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - promptTokensDetailsBuilder_; - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsList() { - if (promptTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } else { - return promptTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getPromptTokensDetailsCount() { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.size(); - } else { - return promptTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails(com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (promptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, value); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - promptTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllPromptTokensDetails( - java.lang.Iterable values) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTokensDetails_); - onChanged(); - } else { - promptTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPromptTokensDetails() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - promptTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removePromptTokensDetails(int index) { - if (promptTokensDetailsBuilder_ == null) { - ensurePromptTokensDetailsIsMutable(); - promptTokensDetails_.remove(index); - onChanged(); - } else { - promptTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder getPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getPromptTokensDetailsOrBuilder(int index) { - if (promptTokensDetailsBuilder_ == null) { - return promptTokensDetails_.get(index); - } else { - return promptTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsOrBuilderList() { - if (promptTokensDetailsBuilder_ != null) { - return promptTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(promptTokensDetails_); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addPromptTokensDetailsBuilder() { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addPromptTokensDetailsBuilder( - int index) { - return internalGetPromptTokensDetailsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the prompt.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPromptTokensDetailsBuilderList() { - return internalGetPromptTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetPromptTokensDetailsFieldBuilder() { - if (promptTokensDetailsBuilder_ == null) { - promptTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - promptTokensDetails_, - ((bitField0_ & 0x00000040) != 0), - getParentForChildren(), - isClean()); - promptTokensDetails_ = null; - } - return promptTokensDetailsBuilder_; - } - - private java.util.List cacheTokensDetails_ = - java.util.Collections.emptyList(); - - private void ensureCacheTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - cacheTokensDetails_ = - new java.util.ArrayList( - cacheTokensDetails_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - cacheTokensDetailsBuilder_; - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsList() { - if (cacheTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cacheTokensDetails_); - } else { - return cacheTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCacheTokensDetailsCount() { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.size(); - } else { - return cacheTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index) { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.get(index); - } else { - return cacheTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.set(index, value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails(com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (cacheTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(index, value); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCacheTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCacheTokensDetails( - java.lang.Iterable values) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cacheTokensDetails_); - onChanged(); - } else { - cacheTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCacheTokensDetails() { - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - cacheTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCacheTokensDetails(int index) { - if (cacheTokensDetailsBuilder_ == null) { - ensureCacheTokensDetailsIsMutable(); - cacheTokensDetails_.remove(index); - onChanged(); - } else { - cacheTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder getCacheTokensDetailsBuilder( - int index) { - return internalGetCacheTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder( - int index) { - if (cacheTokensDetailsBuilder_ == null) { - return cacheTokensDetails_.get(index); - } else { - return cacheTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsOrBuilderList() { - if (cacheTokensDetailsBuilder_ != null) { - return cacheTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cacheTokensDetails_); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addCacheTokensDetailsBuilder() { - return internalGetCacheTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder addCacheTokensDetailsBuilder( - int index) { - return internalGetCacheTokensDetailsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the cached content.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCacheTokensDetailsBuilderList() { - return internalGetCacheTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetCacheTokensDetailsFieldBuilder() { - if (cacheTokensDetailsBuilder_ == null) { - cacheTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - cacheTokensDetails_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - cacheTokensDetails_ = null; - } - return cacheTokensDetailsBuilder_; - } - - private java.util.List - candidatesTokensDetails_ = java.util.Collections.emptyList(); - - private void ensureCandidatesTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - candidatesTokensDetails_ = - new java.util.ArrayList( - candidatesTokensDetails_); - bitField0_ |= 0x00000100; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - candidatesTokensDetailsBuilder_; - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsList() { - if (candidatesTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(candidatesTokensDetails_); - } else { - return candidatesTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getCandidatesTokensDetailsCount() { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.size(); - } else { - return candidatesTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails(int index) { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.get(index); - } else { - return candidatesTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.set(index, value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (candidatesTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(index, value); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addCandidatesTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllCandidatesTokensDetails( - java.lang.Iterable values) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, candidatesTokensDetails_); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCandidatesTokensDetails() { - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeCandidatesTokensDetails(int index) { - if (candidatesTokensDetailsBuilder_ == null) { - ensureCandidatesTokensDetailsIsMutable(); - candidatesTokensDetails_.remove(index); - onChanged(); - } else { - candidatesTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - getCandidatesTokensDetailsBuilder(int index) { - return internalGetCandidatesTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getCandidatesTokensDetailsOrBuilder(int index) { - if (candidatesTokensDetailsBuilder_ == null) { - return candidatesTokensDetails_.get(index); - } else { - return candidatesTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsOrBuilderList() { - if (candidatesTokensDetailsBuilder_ != null) { - return candidatesTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(candidatesTokensDetails_); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addCandidatesTokensDetailsBuilder() { - return internalGetCandidatesTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addCandidatesTokensDetailsBuilder(int index) { - return internalGetCandidatesTokensDetailsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown of the token count for each modality in
-     * the generated candidates.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getCandidatesTokensDetailsBuilderList() { - return internalGetCandidatesTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetCandidatesTokensDetailsFieldBuilder() { - if (candidatesTokensDetailsBuilder_ == null) { - candidatesTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - candidatesTokensDetails_, - ((bitField0_ & 0x00000100) != 0), - getParentForChildren(), - isClean()); - candidatesTokensDetails_ = null; - } - return candidatesTokensDetailsBuilder_; - } - - private java.util.List - toolUsePromptTokensDetails_ = java.util.Collections.emptyList(); - - private void ensureToolUsePromptTokensDetailsIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - toolUsePromptTokensDetails_ = - new java.util.ArrayList( - toolUsePromptTokensDetails_); - bitField0_ |= 0x00000200; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - toolUsePromptTokensDetailsBuilder_; - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getToolUsePromptTokensDetailsList() { - if (toolUsePromptTokensDetailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(toolUsePromptTokensDetails_); - } else { - return toolUsePromptTokensDetailsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getToolUsePromptTokensDetailsCount() { - if (toolUsePromptTokensDetailsBuilder_ == null) { - return toolUsePromptTokensDetails_.size(); - } else { - return toolUsePromptTokensDetailsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount getToolUsePromptTokensDetails( - int index) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - return toolUsePromptTokensDetails_.get(index); - } else { - return toolUsePromptTokensDetailsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setToolUsePromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.set(index, value); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setToolUsePromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.set(index, builderForValue.build()); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addToolUsePromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.add(value); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addToolUsePromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount value) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.add(index, value); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addToolUsePromptTokensDetails( - com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.add(builderForValue.build()); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addToolUsePromptTokensDetails( - int index, com.google.cloud.vertexai.api.ModalityTokenCount.Builder builderForValue) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.add(index, builderForValue.build()); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllToolUsePromptTokensDetails( - java.lang.Iterable values) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, toolUsePromptTokensDetails_); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearToolUsePromptTokensDetails() { - if (toolUsePromptTokensDetailsBuilder_ == null) { - toolUsePromptTokensDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeToolUsePromptTokensDetails(int index) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - ensureToolUsePromptTokensDetailsIsMutable(); - toolUsePromptTokensDetails_.remove(index); - onChanged(); - } else { - toolUsePromptTokensDetailsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - getToolUsePromptTokensDetailsBuilder(int index) { - return internalGetToolUsePromptTokensDetailsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder - getToolUsePromptTokensDetailsOrBuilder(int index) { - if (toolUsePromptTokensDetailsBuilder_ == null) { - return toolUsePromptTokensDetails_.get(index); - } else { - return toolUsePromptTokensDetailsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getToolUsePromptTokensDetailsOrBuilderList() { - if (toolUsePromptTokensDetailsBuilder_ != null) { - return toolUsePromptTokensDetailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(toolUsePromptTokensDetails_); - } - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addToolUsePromptTokensDetailsBuilder() { - return internalGetToolUsePromptTokensDetailsFieldBuilder() - .addBuilder(com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.vertexai.api.ModalityTokenCount.Builder - addToolUsePromptTokensDetailsBuilder(int index) { - return internalGetToolUsePromptTokensDetailsFieldBuilder() - .addBuilder(index, com.google.cloud.vertexai.api.ModalityTokenCount.getDefaultInstance()); - } - - /** - * - * - *
-     * Output only. A detailed breakdown by modality of the token counts from the
-     * results of tool executions, which are provided back to the model as input.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getToolUsePromptTokensDetailsBuilderList() { - return internalGetToolUsePromptTokensDetailsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder> - internalGetToolUsePromptTokensDetailsFieldBuilder() { - if (toolUsePromptTokensDetailsBuilder_ == null) { - toolUsePromptTokensDetailsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.ModalityTokenCount, - com.google.cloud.vertexai.api.ModalityTokenCount.Builder, - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>( - toolUsePromptTokensDetails_, - ((bitField0_ & 0x00000200) != 0), - getParentForChildren(), - isClean()); - toolUsePromptTokensDetails_ = null; - } - return toolUsePromptTokensDetailsBuilder_; - } - - private int trafficType_ = 0; - - /** - * - * - *
-     * Output only. The traffic type for this request.
-     * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for trafficType. - */ - @java.lang.Override - public int getTrafficTypeValue() { - return trafficType_; - } - - /** - * - * - *
-     * Output only. The traffic type for this request.
-     * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for trafficType to set. - * @return This builder for chaining. - */ - public Builder setTrafficTypeValue(int value) { - trafficType_ = value; - bitField0_ |= 0x00000400; - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The traffic type for this request.
-     * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The trafficType. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.UsageMetadata.TrafficType getTrafficType() { - com.google.cloud.vertexai.api.UsageMetadata.TrafficType result = - com.google.cloud.vertexai.api.UsageMetadata.TrafficType.forNumber(trafficType_); - return result == null - ? com.google.cloud.vertexai.api.UsageMetadata.TrafficType.UNRECOGNIZED - : result; - } - - /** - * - * - *
-     * Output only. The traffic type for this request.
-     * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The trafficType to set. - * @return This builder for chaining. - */ - public Builder setTrafficType(com.google.cloud.vertexai.api.UsageMetadata.TrafficType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - trafficType_ = value.getNumber(); - onChanged(); - return this; - } - - /** - * - * - *
-     * Output only. The traffic type for this request.
-     * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearTrafficType() { - bitField0_ = (bitField0_ & ~0x00000400); - trafficType_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.UsageMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.UsageMetadata) - private static final com.google.cloud.vertexai.api.UsageMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.UsageMetadata(); - } - - public static com.google.cloud.vertexai.api.UsageMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UsageMetadata 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.vertexai.api.UsageMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataOrBuilder.java deleted file mode 100644 index 4b05bfce5231..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataOrBuilder.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/usage_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface UsageMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.UsageMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The total number of tokens in the prompt. This includes any text, images,
-   * or other media provided in the request. When `cached_content` is set,
-   * this also includes the number of tokens in the cached content.
-   * 
- * - * int32 prompt_token_count = 1; - * - * @return The promptTokenCount. - */ - int getPromptTokenCount(); - - /** - * - * - *
-   * The total number of tokens in the generated candidates.
-   * 
- * - * int32 candidates_token_count = 2; - * - * @return The candidatesTokenCount. - */ - int getCandidatesTokenCount(); - - /** - * - * - *
-   * The total number of tokens for the entire request. This is the sum of
-   * `prompt_token_count`, `candidates_token_count`,
-   * `tool_use_prompt_token_count`, and `thoughts_token_count`.
-   * 
- * - * int32 total_token_count = 3; - * - * @return The totalTokenCount. - */ - int getTotalTokenCount(); - - /** - * - * - *
-   * Output only. The number of tokens in the results from tool executions,
-   * which are provided back to the model as input, if applicable.
-   * 
- * - * int32 tool_use_prompt_token_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The toolUsePromptTokenCount. - */ - int getToolUsePromptTokenCount(); - - /** - * - * - *
-   * Output only. The number of tokens that were part of the model's generated
-   * "thoughts" output, if applicable.
-   * 
- * - * int32 thoughts_token_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The thoughtsTokenCount. - */ - int getThoughtsTokenCount(); - - /** - * - * - *
-   * Output only. The number of tokens in the cached content that was used for
-   * this request.
-   * 
- * - * int32 cached_content_token_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The cachedContentTokenCount. - */ - int getCachedContentTokenCount(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPromptTokensDetailsList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getPromptTokensDetails(int index); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPromptTokensDetailsCount(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getPromptTokensDetailsOrBuilderList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the prompt.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getCacheTokensDetailsList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getCacheTokensDetails(int index); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCacheTokensDetailsCount(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCacheTokensDetailsOrBuilderList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the cached content.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount cache_tokens_details = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCacheTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getCandidatesTokensDetailsList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getCandidatesTokensDetails(int index); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getCandidatesTokensDetailsCount(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getCandidatesTokensDetailsOrBuilderList(); - - /** - * - * - *
-   * Output only. A detailed breakdown of the token count for each modality in
-   * the generated candidates.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount candidates_tokens_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getCandidatesTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getToolUsePromptTokensDetailsList(); - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCount getToolUsePromptTokensDetails(int index); - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getToolUsePromptTokensDetailsCount(); - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getToolUsePromptTokensDetailsOrBuilderList(); - - /** - * - * - *
-   * Output only. A detailed breakdown by modality of the token counts from the
-   * results of tool executions, which are provided back to the model as input.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.ModalityTokenCount tool_use_prompt_tokens_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder getToolUsePromptTokensDetailsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. The traffic type for this request.
-   * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for trafficType. - */ - int getTrafficTypeValue(); - - /** - * - * - *
-   * Output only. The traffic type for this request.
-   * 
- * - * - * .google.cloud.vertexai.v1.UsageMetadata.TrafficType traffic_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The trafficType. - */ - com.google.cloud.vertexai.api.UsageMetadata.TrafficType getTrafficType(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataProto.java deleted file mode 100644 index 5fb6dffc7d35..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UsageMetadataProto.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/usage_metadata.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class UsageMetadataProto extends com.google.protobuf.GeneratedFile { - private UsageMetadataProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UsageMetadataProto"); - } - - 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_vertexai_v1_UsageMetadata_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UsageMetadata_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/vertexai/v1/usage_metadat" - + "a.proto\022\030google.cloud.vertexai.v1\032\037googl" - + "e/api/field_behavior.proto\032&google/cloud" - + "/vertexai/v1/content.proto\"\330\005\n\rUsageMeta" - + "data\022\032\n\022prompt_token_count\030\001 \001(\005\022\036\n\026cand" - + "idates_token_count\030\002 \001(\005\022\031\n\021total_token_" - + "count\030\003 \001(\005\022(\n\033tool_use_prompt_token_cou" - + "nt\030\r \001(\005B\003\340A\003\022!\n\024thoughts_token_count\030\016 " - + "\001(\005B\003\340A\003\022\'\n\032cached_content_token_count\030\005" - + " \001(\005B\003\340A\003\022P\n\025prompt_tokens_details\030\t \003(\013" - + "2,.google.cloud.vertexai.v1.ModalityToke" - + "nCountB\003\340A\003\022O\n\024cache_tokens_details\030\n \003(" - + "\0132,.google.cloud.vertexai.v1.ModalityTok" - + "enCountB\003\340A\003\022T\n\031candidates_tokens_detail" - + "s\030\013 \003(\0132,.google.cloud.vertexai.v1.Modal" - + "ityTokenCountB\003\340A\003\022Y\n\036tool_use_prompt_to" - + "kens_details\030\014 \003(\0132,.google.cloud.vertex" - + "ai.v1.ModalityTokenCountB\003\340A\003\022N\n\014traffic" - + "_type\030\010 \001(\01623.google.cloud.vertexai.v1.U" - + "sageMetadata.TrafficTypeB\003\340A\003\"V\n\013Traffic" - + "Type\022\034\n\030TRAFFIC_TYPE_UNSPECIFIED\020\000\022\r\n\tON" - + "_DEMAND\020\001\022\032\n\026PROVISIONED_THROUGHPUT\020\002B\317\001" - + "\n\035com.google.cloud.vertexai.apiB\022UsageMe" - + "tadataProtoP\001Z>cloud.google.com/go/aipla" - + "tform/apiv1/aiplatformpb;aiplatformpb\252\002\032" - + "Google.Cloud.AIPlatform.V1\312\002\032Google\\Clou" - + "d\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatf" - + "orm::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vertexai.api.ContentProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_UsageMetadata_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_UsageMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UsageMetadata_descriptor, - new java.lang.String[] { - "PromptTokenCount", - "CandidatesTokenCount", - "TotalTokenCount", - "ToolUsePromptTokenCount", - "ThoughtsTokenCount", - "CachedContentTokenCount", - "PromptTokensDetails", - "CacheTokensDetails", - "CandidatesTokensDetails", - "ToolUsePromptTokensDetails", - "TrafficType", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vertexai.api.ContentProto.getDescriptor(); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java deleted file mode 100644 index c0347cbdeba5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java +++ /dev/null @@ -1,2609 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Retrieve from Vertex AI Search datastore or engine for grounding.
- * datastore and engine are mutually exclusive.
- * See https://cloud.google.com/products/agent-builder
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAISearch} - */ -@com.google.protobuf.Generated -public final class VertexAISearch extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VertexAISearch) - VertexAISearchOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexAISearch"); - } - - // Use VertexAISearch.newBuilder() to construct. - private VertexAISearch(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VertexAISearch() { - datastore_ = ""; - engine_ = ""; - filter_ = ""; - dataStoreSpecs_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAISearch.class, - com.google.cloud.vertexai.api.VertexAISearch.Builder.class); - } - - public interface DataStoreSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Full resource name of DataStore, such as
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string data_store = 1; - * - * @return The dataStore. - */ - java.lang.String getDataStore(); - - /** - * - * - *
-     * Full resource name of DataStore, such as
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string data_store = 1; - * - * @return The bytes for dataStore. - */ - com.google.protobuf.ByteString getDataStoreBytes(); - - /** - * - * - *
-     * Optional. Filter specification to filter documents in the data store
-     * specified by data_store field. For more information on filtering, see
-     * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - - /** - * - * - *
-     * Optional. Filter specification to filter documents in the data store
-     * specified by data_store field. For more information on filtering, see
-     * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - } - - /** - * - * - *
-   * Define data stores within engine to filter on in a search call and
-   * configurations for those data stores. For more information, see
-   * https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec} - */ - public static final class DataStoreSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec) - DataStoreSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DataStoreSpec"); - } - - // Use DataStoreSpec.newBuilder() to construct. - private DataStoreSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DataStoreSpec() { - dataStore_ = ""; - filter_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.class, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder.class); - } - - public static final int DATA_STORE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object dataStore_ = ""; - - /** - * - * - *
-     * Full resource name of DataStore, such as
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string data_store = 1; - * - * @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; - } - } - - /** - * - * - *
-     * Full resource name of DataStore, such as
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string data_store = 1; - * - * @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 FILTER_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - - /** - * - * - *
-     * Optional. Filter specification to filter documents in the data store
-     * specified by data_store field. For more information on filtering, see
-     * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Filter specification to filter documents in the data store
-     * specified by data_store field. For more information on filtering, see
-     * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-     * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - 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.GeneratedMessage.isStringEmpty(dataStore_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, dataStore_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dataStore_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); - } - 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.vertexai.api.VertexAISearch.DataStoreSpec)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec other = - (com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec) obj; - - if (!getDataStore().equals(other.getDataStore())) return false; - if (!getFilter().equals(other.getFilter())) 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) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec 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.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec 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.vertexai.api.VertexAISearch.DataStoreSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VertexAISearch.DataStoreSpec 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * Define data stores within engine to filter on in a search call and
-     * configurations for those data stores. For more information, see
-     * https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec) - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.class, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dataStore_ = ""; - filter_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_DataStoreSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec - getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec build() { - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec buildPartial() { - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec result = - new com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dataStore_ = dataStore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec) { - return mergeFrom((com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec other) { - if (other - == com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.getDefaultInstance()) - return this; - if (!other.getDataStore().isEmpty()) { - dataStore_ = other.dataStore_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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: - { - dataStore_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - filter_ = 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 dataStore_ = ""; - - /** - * - * - *
-       * Full resource name of DataStore, such as
-       * Format:
-       * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-       * 
- * - * string data_store = 1; - * - * @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; - } - } - - /** - * - * - *
-       * Full resource name of DataStore, such as
-       * Format:
-       * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-       * 
- * - * string data_store = 1; - * - * @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; - } - } - - /** - * - * - *
-       * Full resource name of DataStore, such as
-       * Format:
-       * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-       * 
- * - * string data_store = 1; - * - * @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; - } - - /** - * - * - *
-       * Full resource name of DataStore, such as
-       * Format:
-       * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-       * 
- * - * string data_store = 1; - * - * @return This builder for chaining. - */ - public Builder clearDataStore() { - dataStore_ = getDefaultInstance().getDataStore(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Full resource name of DataStore, such as
-       * Format:
-       * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-       * 
- * - * string data_store = 1; - * - * @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 filter_ = ""; - - /** - * - * - *
-       * Optional. Filter specification to filter documents in the data store
-       * specified by data_store field. For more information on filtering, see
-       * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-       * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-       * Optional. Filter specification to filter documents in the data store
-       * specified by data_store field. For more information on filtering, see
-       * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-       * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-       * Optional. Filter specification to filter documents in the data store
-       * specified by data_store field. For more information on filtering, see
-       * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-       * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - /** - * - * - *
-       * Optional. Filter specification to filter documents in the data store
-       * specified by data_store field. For more information on filtering, see
-       * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-       * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. Filter specification to filter documents in the data store
-       * specified by data_store field. For more information on filtering, see
-       * [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
-       * 
- * - * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec) - private static final com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec(); - } - - public static com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataStoreSpec 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.vertexai.api.VertexAISearch.DataStoreSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int DATASTORE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object datastore_ = ""; - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search data store resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-   * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search data store resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-   * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 ENGINE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object engine_ = ""; - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search engine resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-   * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The engine. - */ - @java.lang.Override - public java.lang.String getEngine() { - java.lang.Object ref = engine_; - 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(); - engine_ = s; - return s; - } - } - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search engine resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-   * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for engine. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEngineBytes() { - java.lang.Object ref = engine_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - engine_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 3; - private int maxResults_ = 0; - - /** - * - * - *
-   * Optional. Number of search results to return per query.
-   * The default value is 10.
-   * The maximumm allowed value is 10.
-   * 
- * - * int32 max_results = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int FILTER_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; - - /** - * - * - *
-   * Optional. Filter strings to be passed to the search API.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-   * Optional. Filter strings to be passed to the search API.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 DATA_STORE_SPECS_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private java.util.List - dataStoreSpecs_; - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - @java.lang.Override - public java.util.List - getDataStoreSpecsList() { - return dataStoreSpecs_; - } - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - return dataStoreSpecs_; - } - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - @java.lang.Override - public int getDataStoreSpecsCount() { - return dataStoreSpecs_.size(); - } - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec getDataStoreSpecs(int index) { - return dataStoreSpecs_.get(index); - } - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - return dataStoreSpecs_.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.GeneratedMessage.isStringEmpty(datastore_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, datastore_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(engine_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, engine_); - } - if (maxResults_ != 0) { - output.writeInt32(3, maxResults_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); - } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - output.writeMessage(5, dataStoreSpecs_.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.GeneratedMessage.isStringEmpty(datastore_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, datastore_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(engine_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, engine_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxResults_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); - } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, dataStoreSpecs_.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.vertexai.api.VertexAISearch)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VertexAISearch other = - (com.google.cloud.vertexai.api.VertexAISearch) obj; - - if (!getDatastore().equals(other.getDatastore())) return false; - if (!getEngine().equals(other.getEngine())) return false; - if (getMaxResults() != other.getMaxResults()) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) 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) + DATASTORE_FIELD_NUMBER; - hash = (53 * hash) + getDatastore().hashCode(); - hash = (37 * hash) + ENGINE_FIELD_NUMBER; - hash = (53 * hash) + getEngine().hashCode(); - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - if (getDataStoreSpecsCount() > 0) { - hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getDataStoreSpecsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch 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.vertexai.api.VertexAISearch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch 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.vertexai.api.VertexAISearch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAISearch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VertexAISearch 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Retrieve from Vertex AI Search datastore or engine for grounding.
-   * datastore and engine are mutually exclusive.
-   * See https://cloud.google.com/products/agent-builder
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAISearch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VertexAISearch) - com.google.cloud.vertexai.api.VertexAISearchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAISearch.class, - com.google.cloud.vertexai.api.VertexAISearch.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VertexAISearch.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - datastore_ = ""; - engine_ = ""; - maxResults_ = 0; - filter_ = ""; - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - } else { - dataStoreSpecs_ = null; - dataStoreSpecsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexAISearch_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch build() { - com.google.cloud.vertexai.api.VertexAISearch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAISearch buildPartial() { - com.google.cloud.vertexai.api.VertexAISearch result = - new com.google.cloud.vertexai.api.VertexAISearch(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.VertexAISearch result) { - if (dataStoreSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.dataStoreSpecs_ = dataStoreSpecs_; - } else { - result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.VertexAISearch result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.datastore_ = datastore_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.engine_ = engine_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.maxResults_ = maxResults_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.filter_ = filter_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VertexAISearch) { - return mergeFrom((com.google.cloud.vertexai.api.VertexAISearch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VertexAISearch other) { - if (other == com.google.cloud.vertexai.api.VertexAISearch.getDefaultInstance()) return this; - if (!other.getDatastore().isEmpty()) { - datastore_ = other.datastore_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getEngine().isEmpty()) { - engine_ = other.engine_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (dataStoreSpecsBuilder_ == null) { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecs_.isEmpty()) { - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.addAll(other.dataStoreSpecs_); - } - onChanged(); - } - } else { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecsBuilder_.isEmpty()) { - dataStoreSpecsBuilder_.dispose(); - dataStoreSpecsBuilder_ = null; - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000010); - dataStoreSpecsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDataStoreSpecsFieldBuilder() - : null; - } else { - dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); - } - } - } - 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: - { - engine_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - maxResults_ = input.readInt32(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec m = - input.readMessage( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.parser(), - extensionRegistry); - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(m); - } else { - dataStoreSpecsBuilder_.addMessage(m); - } - 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 datastore_ = ""; - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search data store resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search data store resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search data store resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search data store resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDatastore() { - datastore_ = getDefaultInstance().getDatastore(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search data store resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-     * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 engine_ = ""; - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search engine resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-     * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The engine. - */ - public java.lang.String getEngine() { - java.lang.Object ref = engine_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - engine_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search engine resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-     * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for engine. - */ - public com.google.protobuf.ByteString getEngineBytes() { - java.lang.Object ref = engine_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - engine_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search engine resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-     * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The engine to set. - * @return This builder for chaining. - */ - public Builder setEngine(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - engine_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search engine resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-     * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEngine() { - engine_ = getDefaultInstance().getEngine(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Fully-qualified Vertex AI Search engine resource ID.
-     * Format:
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-     * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for engine to set. - * @return This builder for chaining. - */ - public Builder setEngineBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - engine_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int maxResults_; - - /** - * - * - *
-     * Optional. Number of search results to return per query.
-     * The default value is 10.
-     * The maximumm allowed value is 10.
-     * 
- * - * int32 max_results = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - /** - * - * - *
-     * Optional. Number of search results to return per query.
-     * The default value is 10.
-     * The maximumm allowed value is 10.
-     * 
- * - * int32 max_results = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Number of search results to return per query.
-     * The default value is 10.
-     * The maximumm allowed value is 10.
-     * 
- * - * int32 max_results = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - bitField0_ = (bitField0_ & ~0x00000004); - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - - /** - * - * - *
-     * Optional. Filter strings to be passed to the search API.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Filter strings to be passed to the search API.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - /** - * - * - *
-     * Optional. Filter strings to be passed to the search API.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - /** - * - * - *
-     * Optional. Filter strings to be passed to the search API.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Filter strings to be passed to the search API.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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.util.List - dataStoreSpecs_ = java.util.Collections.emptyList(); - - private void ensureDataStoreSpecsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - dataStoreSpecs_ = - new java.util.ArrayList( - dataStoreSpecs_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder> - dataStoreSpecsBuilder_; - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public java.util.List - getDataStoreSpecsList() { - if (dataStoreSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); - } else { - return dataStoreSpecsBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public int getDataStoreSpecsCount() { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.size(); - } else { - return dataStoreSpecsBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec getDataStoreSpecs(int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); - } else { - return dataStoreSpecsBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder setDataStoreSpecs( - int index, com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, value); - onChanged(); - } else { - dataStoreSpecsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder setDataStoreSpecs( - int index, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder addDataStoreSpecs( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(value); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder addDataStoreSpecs( - int index, com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, value); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder addDataStoreSpecs( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder addDataStoreSpecs( - int index, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder addAllDataStoreSpecs( - java.lang.Iterable - values) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); - onChanged(); - } else { - dataStoreSpecsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder clearDataStoreSpecs() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - dataStoreSpecsBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public Builder removeDataStoreSpecs(int index) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.remove(index); - onChanged(); - } else { - dataStoreSpecsBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder - getDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); - } else { - return dataStoreSpecsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - if (dataStoreSpecsBuilder_ != null) { - return dataStoreSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); - } - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder - addDataStoreSpecsBuilder() { - return internalGetDataStoreSpecsFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.getDefaultInstance()); - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder - addDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder() - .addBuilder( - index, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.getDefaultInstance()); - } - - /** - * - * - *
-     * Specifications that define the specific DataStores to be searched, along
-     * with configurations for those data stores. This is only considered for
-     * Engines with multiple data stores.
-     * It should only be set if engine is used.
-     * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - public java.util.List - getDataStoreSpecsBuilderList() { - return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder> - internalGetDataStoreSpecsFieldBuilder() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec.Builder, - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder>( - dataStoreSpecs_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - dataStoreSpecs_ = null; - } - return dataStoreSpecsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VertexAISearch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VertexAISearch) - private static final com.google.cloud.vertexai.api.VertexAISearch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VertexAISearch(); - } - - public static com.google.cloud.vertexai.api.VertexAISearch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VertexAISearch 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.vertexai.api.VertexAISearch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java deleted file mode 100644 index d6438edc3594..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface VertexAISearchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VertexAISearch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search data store resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-   * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The datastore. - */ - java.lang.String getDatastore(); - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search data store resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
-   * 
- * - * string datastore = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for datastore. - */ - com.google.protobuf.ByteString getDatastoreBytes(); - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search engine resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-   * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The engine. - */ - java.lang.String getEngine(); - - /** - * - * - *
-   * Optional. Fully-qualified Vertex AI Search engine resource ID.
-   * Format:
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
-   * 
- * - * string engine = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for engine. - */ - com.google.protobuf.ByteString getEngineBytes(); - - /** - * - * - *
-   * Optional. Number of search results to return per query.
-   * The default value is 10.
-   * The maximumm allowed value is 10.
-   * 
- * - * int32 max_results = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxResults. - */ - int getMaxResults(); - - /** - * - * - *
-   * Optional. Filter strings to be passed to the search API.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - - /** - * - * - *
-   * Optional. Filter strings to be passed to the search API.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - java.util.List - getDataStoreSpecsList(); - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpec getDataStoreSpecs(int index); - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - int getDataStoreSpecsCount(); - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - java.util.List - getDataStoreSpecsOrBuilderList(); - - /** - * - * - *
-   * Specifications that define the specific DataStores to be searched, along
-   * with configurations for those data stores. This is only considered for
-   * Engines with multiple data stores.
-   * It should only be set if engine is used.
-   * 
- * - * repeated .google.cloud.vertexai.v1.VertexAISearch.DataStoreSpec data_store_specs = 5; - * - */ - com.google.cloud.vertexai.api.VertexAISearch.DataStoreSpecOrBuilder getDataStoreSpecsOrBuilder( - int index); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfig.java deleted file mode 100644 index 49c30a78ff38..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfig.java +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Config for the Vertex AI Search.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAiSearchConfig} - */ -@com.google.protobuf.Generated -public final class VertexAiSearchConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VertexAiSearchConfig) - VertexAiSearchConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexAiSearchConfig"); - } - - // Use VertexAiSearchConfig.newBuilder() to construct. - private VertexAiSearchConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VertexAiSearchConfig() { - servingConfig_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAiSearchConfig.class, - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder.class); - } - - public static final int SERVING_CONFIG_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object servingConfig_ = ""; - - /** - * - * - *
-   * Vertex AI Search Serving Config resource full name. For example,
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-   * or
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-   * 
- * - * string serving_config = 1; - * - * @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; - } - } - - /** - * - * - *
-   * Vertex AI Search Serving Config resource full name. For example,
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-   * or
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-   * 
- * - * string serving_config = 1; - * - * @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; - } - } - - 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.GeneratedMessage.isStringEmpty(servingConfig_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, servingConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfig_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, servingConfig_); - } - 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.vertexai.api.VertexAiSearchConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VertexAiSearchConfig other = - (com.google.cloud.vertexai.api.VertexAiSearchConfig) obj; - - if (!getServingConfig().equals(other.getServingConfig())) 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 = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig 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.vertexai.api.VertexAiSearchConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig 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.vertexai.api.VertexAiSearchConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VertexAiSearchConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Config for the Vertex AI Search.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexAiSearchConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VertexAiSearchConfig) - com.google.cloud.vertexai.api.VertexAiSearchConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexAiSearchConfig.class, - com.google.cloud.vertexai.api.VertexAiSearchConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VertexAiSearchConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - servingConfig_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.VertexRagDataProto - .internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfig build() { - com.google.cloud.vertexai.api.VertexAiSearchConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexAiSearchConfig buildPartial() { - com.google.cloud.vertexai.api.VertexAiSearchConfig result = - new com.google.cloud.vertexai.api.VertexAiSearchConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.VertexAiSearchConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.servingConfig_ = servingConfig_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VertexAiSearchConfig) { - return mergeFrom((com.google.cloud.vertexai.api.VertexAiSearchConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VertexAiSearchConfig other) { - if (other == com.google.cloud.vertexai.api.VertexAiSearchConfig.getDefaultInstance()) - return this; - if (!other.getServingConfig().isEmpty()) { - servingConfig_ = other.servingConfig_; - 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: - { - servingConfig_ = 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 servingConfig_ = ""; - - /** - * - * - *
-     * Vertex AI Search Serving Config resource full name. For example,
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-     * or
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-     * 
- * - * string serving_config = 1; - * - * @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; - } - } - - /** - * - * - *
-     * Vertex AI Search Serving Config resource full name. For example,
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-     * or
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-     * 
- * - * string serving_config = 1; - * - * @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; - } - } - - /** - * - * - *
-     * Vertex AI Search Serving Config resource full name. For example,
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-     * or
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-     * 
- * - * string serving_config = 1; - * - * @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; - } - - /** - * - * - *
-     * Vertex AI Search Serving Config resource full name. For example,
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-     * or
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-     * 
- * - * string serving_config = 1; - * - * @return This builder for chaining. - */ - public Builder clearServingConfig() { - servingConfig_ = getDefaultInstance().getServingConfig(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-     * Vertex AI Search Serving Config resource full name. For example,
-     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-     * or
-     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-     * 
- * - * string serving_config = 1; - * - * @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; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VertexAiSearchConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VertexAiSearchConfig) - private static final com.google.cloud.vertexai.api.VertexAiSearchConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VertexAiSearchConfig(); - } - - public static com.google.cloud.vertexai.api.VertexAiSearchConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VertexAiSearchConfig 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.vertexai.api.VertexAiSearchConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfigOrBuilder.java deleted file mode 100644 index 82a8175a643e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAiSearchConfigOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface VertexAiSearchConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VertexAiSearchConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Vertex AI Search Serving Config resource full name. For example,
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-   * or
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-   * 
- * - * string serving_config = 1; - * - * @return The servingConfig. - */ - java.lang.String getServingConfig(); - - /** - * - * - *
-   * Vertex AI Search Serving Config resource full name. For example,
-   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
-   * or
-   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
-   * 
- * - * string serving_config = 1; - * - * @return The bytes for servingConfig. - */ - com.google.protobuf.ByteString getServingConfigBytes(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagDataProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagDataProto.java deleted file mode 100644 index 7baa00c1ddc5..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagDataProto.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/vertex_rag_data.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public final class VertexRagDataProto extends com.google.protobuf.GeneratedFile { - private VertexRagDataProto() {} - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexRagDataProto"); - } - - 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_vertexai_v1_RagEmbeddingModelConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_FileStatus_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_FileStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_CorpusStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagCorpus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFile_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFile_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagChunk_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagChunk_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_vertexai_v1_RagEngineConfig_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/vertexai/v1/vertex_rag_da" - + "ta.proto\022\030google.cloud.vertexai.v1\032\037goog" - + "le/api/field_behavior.proto\032\031google/api/" - + "resource.proto\032\'google/cloud/vertexai/v1" - + "/api_auth.proto\032.google/cloud/vertexai/v1/encryption_spec.proto\032!google/cloud/ve" - + "rtexai/v1/io.proto\032\037google/protobuf/timestamp.proto\"\315\002\n" - + "\027RagEmbeddingModelConfig\022p\n" - + "\032vertex_prediction_endpoint\030\001 \001(\0132J.go" - + "ogle.cloud.vertexai.v1.RagEmbeddingModelConfig.VertexPredictionEndpointH\000\032\257\001\n" - + "\030VertexPredictionEndpoint\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\0226\n" - + "\005model\030\002 \001(\tB\'\340A\003\372A!\n" - + "\037aiplatform.googleapis.com/Model\022\035\n" - + "\020model_version_id\030\003 \001(\tB\003\340A\003B\016\n" - + "\014model_config\"\206\006\n" - + "\021RagVectorDbConfig\022R\n" - + "\016rag_managed_db\030\001 \001(\01328.goog" - + "le.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDbH\000\022H\n" - + "\010pinecone\030\003 \001(\01324.google" - + ".cloud.vertexai.v1.RagVectorDbConfig.PineconeH\000\022^\n" - + "\024vertex_vector_search\030\006 \001(\0132>." - + "google.cloud.vertexai.v1.RagVectorDbConfig.VertexVectorSearchH\000\0223\n" - + "\010api_auth\030\005 \001(\0132!.google.cloud.vertexai.v1.ApiAuth\022]\n" - + "\032rag_embedding_model_config\030\007 \001(\01321.googl" - + "e.cloud.vertexai.v1.RagEmbeddingModelConfigB\006\340A\001\340A\005\032\364\001\n" - + "\014RagManagedDb\022K\n" - + "\003knn\030\001 \001(" - + "\0132<.google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.KNNH\000\022K\n" - + "\003ann\030\002 \001(\0132<" - + ".google.cloud.vertexai.v1.RagVectorDbConfig.RagManagedDb.ANNH\000\032\005\n" - + "\003KNN\032-\n" - + "\003ANN\022\022\n\n" - + "tree_depth\030\001 \001(\005\022\022\n\n" - + "leaf_count\030\002 \001(\005B\024\n" - + "\022retrieval_strategy\032\036\n" - + "\010Pinecone\022\022\n\n" - + "index_name\030\001 \001(\t\032;\n" - + "\022VertexVectorSearch\022\026\n" - + "\016index_endpoint\030\001 \001(\t\022\r\n" - + "\005index\030\002 \001(\tB\013\n" - + "\tvector_db\"\236\001\n\n" - + "FileStatus\022>\n" - + "\005state\030\001 \001(\0162*.goo" - + "gle.cloud.vertexai.v1.FileStatus.StateB\003\340A\003\022\031\n" - + "\014error_status\030\002 \001(\tB\003\340A\003\"5\n" - + "\005State\022\025\n" - + "\021STATE_UNSPECIFIED\020\000\022\n\n" - + "\006ACTIVE\020\001\022\t\n" - + "\005ERROR\020\002\".\n" - + "\024VertexAiSearchConfig\022\026\n" - + "\016serving_config\030\001 \001(\t\"\251\001\n" - + "\014CorpusStatus\022@\n" - + "\005state\030\001" - + " \001(\0162,.google.cloud.vertexai.v1.CorpusStatus.StateB\003\340A\003\022\031\n" - + "\014error_status\030\002 \001(\tB\003\340A\003\"<\n" - + "\005State\022\013\n" - + "\007UNKNOWN\020\000\022\017\n" - + "\013INITIALIZED\020\001\022\n\n" - + "\006ACTIVE\020\002\022\t\n" - + "\005ERROR\020\003\"\217\005\n" - + "\tRagCorpus\022O\n" - + "\020vector_db_config\030\t \001(\0132+.google.cloud" - + ".vertexai.v1.RagVectorDbConfigB\006\340A\001\340A\005H\000\022Y\n" - + "\027vertex_ai_search_config\030\n" - + " \001(\0132..goog" - + "le.cloud.vertexai.v1.VertexAiSearchConfigB\006\340A\001\340A\005H\000\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\003\022\031\n" - + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" - + "\013description\030\003 \001(\tB\003\340A\001\0224\n" - + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\005" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022B\n\r" - + "corpus_status\030\010" - + " \001(\0132&.google.cloud.vertexai.v1.CorpusStatusB\003\340A\003\022I\n" - + "\017encryption_spec\030\014" - + " \001(\0132(.google.cloud.vertexai.v1.EncryptionSpecB\006\340A\005\340A\001:\200\001\352A}\n" - + "#aiplatform.googleapis.com/RagCorpus\022?projects/{project}/lo" - + "cations/{location}/ragCorpora/{rag_corpus}*\n" - + "ragCorpora2\tragCorpusB\020\n" - + "\016backend_config\"\316\006\n" - + "\007RagFile\022>\n\n" - + "gcs_source\030\010 \001(\0132#.go" - + "ogle.cloud.vertexai.v1.GcsSourceB\003\340A\003H\000\022O\n" - + "\023google_drive_source\030\t \001(\0132+.google.cl" - + "oud.vertexai.v1.GoogleDriveSourceB\003\340A\003H\000\022Q\n" - + "\024direct_upload_source\030\n" - + " \001(\0132,.google.cloud.vertexai.v1.DirectUploadSourceB\003\340A\003H\000\022=\n" - + "\014slack_source\030\013 \001(\0132%.google.cloud.vertexai.v1.SlackSourceH\000\022;\n" - + "\013jira_source\030\014 \001(\0132$.google.cloud.vertexai.v1.JiraSourceH\000\022J\n" - + "\023share_point_sources\030\016 \001(\0132+.g" - + "oogle.cloud.vertexai.v1.SharePointSourcesH\000\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\003\022\031\n" - + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n" - + "\013description\030\003 \001(\tB\003\340A\001\0224\n" - + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022>\n" - + "\013file_status\030\r" - + " \001(\0132$.google.cloud.vertexai.v1.FileStatusB\003\340A\003:\217\001\352A\213\001\n" - + "!aiplatform.googleapis.com/RagFile\022Sprojects/{project}/locations/" - + "{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}*\010ragFiles2\007ragFileB\021\n" - + "\017rag_file_source\"\236\001\n" - + "\010RagChunk\022\014\n" - + "\004text\030\001 \001(\t\022C\n" - + "\tpage_span\030\002" - + " \001(\0132+.google.cloud.vertexai.v1.RagChunk.PageSpanH\000\210\001\001\0321\n" - + "\010PageSpan\022\022\n\n" - + "first_page\030\001 \001(\005\022\021\n" - + "\tlast_page\030\002 \001(\005B\014\n\n" - + "_page_span\"\322\001\n" - + "\025RagFileChunkingConfig\022d\n" - + "\025fixed_length_chunking\030\003 \001(\0132C.google." - + "cloud.vertexai.v1.RagFileChunkingConfig.FixedLengthChunkingH\000\032@\n" - + "\023FixedLengthChunking\022\022\n\n" - + "chunk_size\030\001 \001(\005\022\025\n\r" - + "chunk_overlap\030\002 \001(\005B\021\n" - + "\017chunking_config\"p\n" - + "\033RagFileTransformationConfig\022Q\n" - + "\030rag_file_chunking_config\030\001" - + " \001(\0132/.google.cloud.vertexai.v1.RagFileChunkingConfig\"\372\002\n" - + "\024RagFileParsingConfig\022T\n\r" - + "layout_parser\030\004 \001(\0132;.google.cl" - + "oud.vertexai.v1.RagFileParsingConfig.LayoutParserH\000\022N\n\n" - + "llm_parser\030\005 \001(\01328.google" - + ".cloud.vertexai.v1.RagFileParsingConfig.LlmParserH\000\032L\n" - + "\014LayoutParser\022\026\n" - + "\016processor_name\030\001 \001(\t\022$\n" - + "\034max_parsing_requests_per_min\030\002 \001(\005\032d\n" - + "\tLlmParser\022\022\n\n" - + "model_name\030\001 \001(\t\022$\n" - + "\034max_parsing_requests_per_min\030\002 \001(\005\022\035\n" - + "\025custom_parsing_prompt\030\003 \001(\tB\010\n" - + "\006parser\"t\n" - + "\023UploadRagFileConfig\022]\n" - + "\036rag_file_transformation_config\030\003 \001(\01325.google.cloud." - + "vertexai.v1.RagFileTransformationConfig\"\361\007\n" - + "\024ImportRagFilesConfig\0229\n\n" - + "gcs_source\030\002 \001(\0132#.google.cloud.vertexai.v1.GcsSourceH\000\022J\n" - + "\023google_drive_source\030\003 \001(\0132+.googl" - + "e.cloud.vertexai.v1.GoogleDriveSourceH\000\022=\n" - + "\014slack_source\030\006 \001(\0132%.google.cloud.vertexai.v1.SlackSourceH\000\022;\n" - + "\013jira_source\030\007 \001(\0132$.google.cloud.vertexai.v1.JiraSourceH\000\022J\n" - + "\023share_point_sources\030\r" - + " \001(\0132+.google.cloud.vertexai.v1.SharePointSourcesH\000\022P\n" - + "\030partial_failure_gcs_sink\030\013 \001(\0132(.goog" - + "le.cloud.vertexai.v1.GcsDestinationB\002\030\001H\001\022Z\n" - + "\035partial_failure_bigquery_sink\030\014 \001(\013" - + "2-.google.cloud.vertexai.v1.BigQueryDestinationB\002\030\001H\001\022J\n" - + "\026import_result_gcs_sink\030\016" - + " \001(\0132(.google.cloud.vertexai.v1.GcsDestinationH\002\022T\n" - + "\033import_result_bigquery_sink\030\017" - + " \001(\0132-.google.cloud.vertexai.v1.BigQueryDestinationH\002\022]\n" - + "\036rag_file_transformation_config\030\020" - + " \001(\01325.google.cloud.vertexai.v1.RagFileTransformationConfig\022T\n" - + "\027rag_file_parsing_config\030\010" - + " \001(\0132..google.cloud.vertexai.v1.RagFileParsingConfigB\003\340A\001\022+\n" - + "\036max_embedding_requests_per_min\030\005 \001(\005B\003\340A\001\022\031\n" - + "\021rebuild_ann_index\030\023 \001(\010B\017\n\r" - + "import_sourceB\026\n" - + "\024partial_failure_sinkB\024\n" - + "\022import_result_sink\"\241\002\n" - + "\022RagManagedDbConfig\022E\n" - + "\006scaled\030\004" - + " \001(\01323.google.cloud.vertexai.v1.RagManagedDbConfig.ScaledH\000\022C\n" - + "\005basic\030\002 \001(\013" - + "22.google.cloud.vertexai.v1.RagManagedDbConfig.BasicH\000\022S\n\r" - + "unprovisioned\030\003 \001(\0132:." - + "google.cloud.vertexai.v1.RagManagedDbConfig.UnprovisionedH\000\032\010\n" - + "\006Scaled\032\007\n" - + "\005Basic\032\017\n\r" - + "UnprovisionedB\006\n" - + "\004tier\"\377\001\n" - + "\017RagEngineConfig\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\010\022K\n" - + "\025rag_managed_db_config\030\002" - + " \001(\0132,.google.cloud.vertexai.v1.RagManagedDbConfig:\213\001\352A\207\001\n" - + ")aiplatform.googleapis.com/RagEngineConfig\0227projects/" - + "{project}/locations/{location}/ragEngine" - + "Config*\020ragEngineConfigs2\017ragEngineConfigB\317\001\n" - + "\035com.google.cloud.vertexai.apiB\022VertexRagDataProtoP\001Z>cloud.google.com/go/a" - + "iplatform/apiv1/aiplatformpb;aiplatformp" - + "b\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\" - + "Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\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.vertexai.api.ApiAuthProto.getDescriptor(), - com.google.cloud.vertexai.api.EncryptionSpecProto.getDescriptor(), - com.google.cloud.vertexai.api.IoProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor = - getDescriptor().getMessageType(0); - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor, - new java.lang.String[] { - "VertexPredictionEndpoint", "ModelConfig", - }); - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor = - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_descriptor.getNestedType( - 0); - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagEmbeddingModelConfig_VertexPredictionEndpoint_descriptor, - new java.lang.String[] { - "Endpoint", "Model", "ModelVersionId", - }); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor, - new java.lang.String[] { - "RagManagedDb", - "Pinecone", - "VertexVectorSearch", - "ApiAuth", - "RagEmbeddingModelConfig", - "VectorDb", - }); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor = - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor, - new java.lang.String[] { - "Knn", "Ann", "RetrievalStrategy", - }); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor = - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor - .getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_KNN_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor = - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_descriptor - .getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_RagManagedDb_ANN_descriptor, - new java.lang.String[] { - "TreeDepth", "LeafCount", - }); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor = - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_Pinecone_descriptor, - new java.lang.String[] { - "IndexName", - }); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor = - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_descriptor.getNestedType(2); - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagVectorDbConfig_VertexVectorSearch_descriptor, - new java.lang.String[] { - "IndexEndpoint", "Index", - }); - internal_static_google_cloud_vertexai_v1_FileStatus_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_vertexai_v1_FileStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_FileStatus_descriptor, - new java.lang.String[] { - "State", "ErrorStatus", - }); - internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor = - getDescriptor().getMessageType(3); - internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_VertexAiSearchConfig_descriptor, - new java.lang.String[] { - "ServingConfig", - }); - internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor = - getDescriptor().getMessageType(4); - internal_static_google_cloud_vertexai_v1_CorpusStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_CorpusStatus_descriptor, - new java.lang.String[] { - "State", "ErrorStatus", - }); - internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor = - getDescriptor().getMessageType(5); - internal_static_google_cloud_vertexai_v1_RagCorpus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagCorpus_descriptor, - new java.lang.String[] { - "VectorDbConfig", - "VertexAiSearchConfig", - "Name", - "DisplayName", - "Description", - "CreateTime", - "UpdateTime", - "CorpusStatus", - "EncryptionSpec", - "BackendConfig", - }); - internal_static_google_cloud_vertexai_v1_RagFile_descriptor = getDescriptor().getMessageType(6); - internal_static_google_cloud_vertexai_v1_RagFile_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFile_descriptor, - new java.lang.String[] { - "GcsSource", - "GoogleDriveSource", - "DirectUploadSource", - "SlackSource", - "JiraSource", - "SharePointSources", - "Name", - "DisplayName", - "Description", - "CreateTime", - "UpdateTime", - "FileStatus", - "RagFileSource", - }); - internal_static_google_cloud_vertexai_v1_RagChunk_descriptor = - getDescriptor().getMessageType(7); - internal_static_google_cloud_vertexai_v1_RagChunk_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagChunk_descriptor, - new java.lang.String[] { - "Text", "PageSpan", - }); - internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor = - internal_static_google_cloud_vertexai_v1_RagChunk_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagChunk_PageSpan_descriptor, - new java.lang.String[] { - "FirstPage", "LastPage", - }); - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor = - getDescriptor().getMessageType(8); - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor, - new java.lang.String[] { - "FixedLengthChunking", "ChunkingConfig", - }); - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor = - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileChunkingConfig_FixedLengthChunking_descriptor, - new java.lang.String[] { - "ChunkSize", "ChunkOverlap", - }); - internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor = - getDescriptor().getMessageType(9); - internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileTransformationConfig_descriptor, - new java.lang.String[] { - "RagFileChunkingConfig", - }); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor = - getDescriptor().getMessageType(10); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor, - new java.lang.String[] { - "LayoutParser", "LlmParser", "Parser", - }); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor = - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LayoutParser_descriptor, - new java.lang.String[] { - "ProcessorName", "MaxParsingRequestsPerMin", - }); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor = - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagFileParsingConfig_LlmParser_descriptor, - new java.lang.String[] { - "ModelName", "MaxParsingRequestsPerMin", "CustomParsingPrompt", - }); - internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor = - getDescriptor().getMessageType(11); - internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_UploadRagFileConfig_descriptor, - new java.lang.String[] { - "RagFileTransformationConfig", - }); - internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor = - getDescriptor().getMessageType(12); - internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_ImportRagFilesConfig_descriptor, - new java.lang.String[] { - "GcsSource", - "GoogleDriveSource", - "SlackSource", - "JiraSource", - "SharePointSources", - "PartialFailureGcsSink", - "PartialFailureBigquerySink", - "ImportResultGcsSink", - "ImportResultBigquerySink", - "RagFileTransformationConfig", - "RagFileParsingConfig", - "MaxEmbeddingRequestsPerMin", - "RebuildAnnIndex", - "ImportSource", - "PartialFailureSink", - "ImportResultSink", - }); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor = - getDescriptor().getMessageType(13); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor, - new java.lang.String[] { - "Scaled", "Basic", "Unprovisioned", "Tier", - }); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor = - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor.getNestedType(0); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Scaled_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor = - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor.getNestedType(1); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Basic_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor = - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_descriptor.getNestedType(2); - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagManagedDbConfig_Unprovisioned_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor = - getDescriptor().getMessageType(14); - internal_static_google_cloud_vertexai_v1_RagEngineConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_vertexai_v1_RagEngineConfig_descriptor, - new java.lang.String[] { - "Name", "RagManagedDbConfig", - }); - descriptor.resolveAllFeaturesImmutable(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vertexai.api.ApiAuthProto.getDescriptor(); - com.google.cloud.vertexai.api.EncryptionSpecProto.getDescriptor(); - com.google.cloud.vertexai.api.IoProto.getDescriptor(); - com.google.protobuf.TimestampProto.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); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStore.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStore.java deleted file mode 100644 index 76d551c18417..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStore.java +++ /dev/null @@ -1,2723 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Retrieve from Vertex RAG Store for grounding.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexRagStore} - */ -@com.google.protobuf.Generated -public final class VertexRagStore extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VertexRagStore) - VertexRagStoreOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VertexRagStore"); - } - - // Use VertexRagStore.newBuilder() to construct. - private VertexRagStore(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VertexRagStore() { - ragResources_ = java.util.Collections.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexRagStore.class, - com.google.cloud.vertexai.api.VertexRagStore.Builder.class); - } - - public interface RagResourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VertexRagStore.RagResource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. RagCorpora resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-     * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The ragCorpus. - */ - java.lang.String getRagCorpus(); - - /** - * - * - *
-     * Optional. RagCorpora resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-     * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for ragCorpus. - */ - com.google.protobuf.ByteString getRagCorpusBytes(); - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the ragFileIds. - */ - java.util.List getRagFileIdsList(); - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of ragFileIds. - */ - int getRagFileIdsCount(); - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The ragFileIds at the given index. - */ - java.lang.String getRagFileIds(int index); - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the ragFileIds at the given index. - */ - com.google.protobuf.ByteString getRagFileIdsBytes(int index); - } - - /** - * - * - *
-   * The definition of the Rag resource.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexRagStore.RagResource} - */ - public static final class RagResource extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VertexRagStore.RagResource) - RagResourceOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RagResource"); - } - - // Use RagResource.newBuilder() to construct. - private RagResource(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private RagResource() { - ragCorpus_ = ""; - ragFileIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexRagStore.RagResource.class, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder.class); - } - - public static final int RAG_CORPUS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object ragCorpus_ = ""; - - /** - * - * - *
-     * Optional. RagCorpora resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-     * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The ragCorpus. - */ - @java.lang.Override - public java.lang.String getRagCorpus() { - java.lang.Object ref = ragCorpus_; - 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(); - ragCorpus_ = s; - return s; - } - } - - /** - * - * - *
-     * Optional. RagCorpora resource name.
-     * Format:
-     * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-     * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for ragCorpus. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRagCorpusBytes() { - java.lang.Object ref = ragCorpus_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ragCorpus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RAG_FILE_IDS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList ragFileIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the ragFileIds. - */ - public com.google.protobuf.ProtocolStringList getRagFileIdsList() { - return ragFileIds_; - } - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of ragFileIds. - */ - public int getRagFileIdsCount() { - return ragFileIds_.size(); - } - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The ragFileIds at the given index. - */ - public java.lang.String getRagFileIds(int index) { - return ragFileIds_.get(index); - } - - /** - * - * - *
-     * Optional. rag_file_id. The files should be in the same rag_corpus set in
-     * rag_corpus field.
-     * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the ragFileIds at the given index. - */ - public com.google.protobuf.ByteString getRagFileIdsBytes(int index) { - return ragFileIds_.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.GeneratedMessage.isStringEmpty(ragCorpus_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, ragCorpus_); - } - for (int i = 0; i < ragFileIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, ragFileIds_.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.GeneratedMessage.isStringEmpty(ragCorpus_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ragCorpus_); - } - { - int dataSize = 0; - for (int i = 0; i < ragFileIds_.size(); i++) { - dataSize += computeStringSizeNoTag(ragFileIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getRagFileIdsList().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.vertexai.api.VertexRagStore.RagResource)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VertexRagStore.RagResource other = - (com.google.cloud.vertexai.api.VertexRagStore.RagResource) obj; - - if (!getRagCorpus().equals(other.getRagCorpus())) return false; - if (!getRagFileIdsList().equals(other.getRagFileIdsList())) 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) + RAG_CORPUS_FIELD_NUMBER; - hash = (53 * hash) + getRagCorpus().hashCode(); - if (getRagFileIdsCount() > 0) { - hash = (37 * hash) + RAG_FILE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getRagFileIdsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource 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.vertexai.api.VertexRagStore.RagResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource 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.vertexai.api.VertexRagStore.RagResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VertexRagStore.RagResource 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-     * The definition of the Rag resource.
-     * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexRagStore.RagResource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VertexRagStore.RagResource) - com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexRagStore.RagResource.class, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VertexRagStore.RagResource.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - ragCorpus_ = ""; - ragFileIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_RagResource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore.RagResource getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VertexRagStore.RagResource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore.RagResource build() { - com.google.cloud.vertexai.api.VertexRagStore.RagResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore.RagResource buildPartial() { - com.google.cloud.vertexai.api.VertexRagStore.RagResource result = - new com.google.cloud.vertexai.api.VertexRagStore.RagResource(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.VertexRagStore.RagResource result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.ragCorpus_ = ragCorpus_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - ragFileIds_.makeImmutable(); - result.ragFileIds_ = ragFileIds_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VertexRagStore.RagResource) { - return mergeFrom((com.google.cloud.vertexai.api.VertexRagStore.RagResource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VertexRagStore.RagResource other) { - if (other == com.google.cloud.vertexai.api.VertexRagStore.RagResource.getDefaultInstance()) - return this; - if (!other.getRagCorpus().isEmpty()) { - ragCorpus_ = other.ragCorpus_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.ragFileIds_.isEmpty()) { - if (ragFileIds_.isEmpty()) { - ragFileIds_ = other.ragFileIds_; - bitField0_ |= 0x00000002; - } else { - ensureRagFileIdsIsMutable(); - ragFileIds_.addAll(other.ragFileIds_); - } - 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: - { - ragCorpus_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRagFileIdsIsMutable(); - ragFileIds_.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 ragCorpus_ = ""; - - /** - * - * - *
-       * Optional. RagCorpora resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-       * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The ragCorpus. - */ - public java.lang.String getRagCorpus() { - java.lang.Object ref = ragCorpus_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ragCorpus_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
-       * Optional. RagCorpora resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-       * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for ragCorpus. - */ - public com.google.protobuf.ByteString getRagCorpusBytes() { - java.lang.Object ref = ragCorpus_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ragCorpus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
-       * Optional. RagCorpora resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-       * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The ragCorpus to set. - * @return This builder for chaining. - */ - public Builder setRagCorpus(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ragCorpus_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. RagCorpora resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-       * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearRagCorpus() { - ragCorpus_ = getDefaultInstance().getRagCorpus(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. RagCorpora resource name.
-       * Format:
-       * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
-       * 
- * - * - * string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for ragCorpus to set. - * @return This builder for chaining. - */ - public Builder setRagCorpusBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ragCorpus_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList ragFileIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureRagFileIdsIsMutable() { - if (!ragFileIds_.isModifiable()) { - ragFileIds_ = new com.google.protobuf.LazyStringArrayList(ragFileIds_); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the ragFileIds. - */ - public com.google.protobuf.ProtocolStringList getRagFileIdsList() { - ragFileIds_.makeImmutable(); - return ragFileIds_; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of ragFileIds. - */ - public int getRagFileIdsCount() { - return ragFileIds_.size(); - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The ragFileIds at the given index. - */ - public java.lang.String getRagFileIds(int index) { - return ragFileIds_.get(index); - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the ragFileIds at the given index. - */ - public com.google.protobuf.ByteString getRagFileIdsBytes(int index) { - return ragFileIds_.getByteString(index); - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The ragFileIds to set. - * @return This builder for chaining. - */ - public Builder setRagFileIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRagFileIdsIsMutable(); - ragFileIds_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The ragFileIds to add. - * @return This builder for chaining. - */ - public Builder addRagFileIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRagFileIdsIsMutable(); - ragFileIds_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The ragFileIds to add. - * @return This builder for chaining. - */ - public Builder addAllRagFileIds(java.lang.Iterable values) { - ensureRagFileIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragFileIds_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRagFileIds() { - ragFileIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; - } - - /** - * - * - *
-       * Optional. rag_file_id. The files should be in the same rag_corpus set in
-       * rag_corpus field.
-       * 
- * - * repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the ragFileIds to add. - * @return This builder for chaining. - */ - public Builder addRagFileIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRagFileIdsIsMutable(); - ragFileIds_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VertexRagStore.RagResource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VertexRagStore.RagResource) - private static final com.google.cloud.vertexai.api.VertexRagStore.RagResource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VertexRagStore.RagResource(); - } - - public static com.google.cloud.vertexai.api.VertexRagStore.RagResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RagResource 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.vertexai.api.VertexRagStore.RagResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int bitField0_; - public static final int RAG_RESOURCES_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List ragResources_; - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getRagResourcesList() { - return ragResources_; - } - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getRagResourcesOrBuilderList() { - return ragResources_; - } - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getRagResourcesCount() { - return ragResources_.size(); - } - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore.RagResource getRagResources(int index) { - return ragResources_.get(index); - } - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder getRagResourcesOrBuilder( - int index) { - return ragResources_.get(index); - } - - public static final int SIMILARITY_TOP_K_FIELD_NUMBER = 2; - private int similarityTopK_ = 0; - - /** - * - * - *
-   * Optional. Number of top k results to return from the selected corpora.
-   * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return Whether the similarityTopK field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasSimilarityTopK() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. Number of top k results to return from the selected corpora.
-   * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return The similarityTopK. - */ - @java.lang.Override - @java.lang.Deprecated - public int getSimilarityTopK() { - return similarityTopK_; - } - - public static final int VECTOR_DISTANCE_THRESHOLD_FIELD_NUMBER = 3; - private double vectorDistanceThreshold_ = 0D; - - /** - * - * - *
-   * Optional. Only return results with vector distance smaller than the
-   * threshold.
-   * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return Whether the vectorDistanceThreshold field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasVectorDistanceThreshold() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. Only return results with vector distance smaller than the
-   * threshold.
-   * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return The vectorDistanceThreshold. - */ - @java.lang.Override - @java.lang.Deprecated - public double getVectorDistanceThreshold() { - return vectorDistanceThreshold_; - } - - public static final int RAG_RETRIEVAL_CONFIG_FIELD_NUMBER = 6; - private com.google.cloud.vertexai.api.RagRetrievalConfig ragRetrievalConfig_; - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragRetrievalConfig field is set. - */ - @java.lang.Override - public boolean hasRagRetrievalConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragRetrievalConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfig getRagRetrievalConfig() { - return ragRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance() - : ragRetrievalConfig_; - } - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder - getRagRetrievalConfigOrBuilder() { - return ragRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance() - : ragRetrievalConfig_; - } - - 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(2, similarityTopK_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeDouble(3, vectorDistanceThreshold_); - } - for (int i = 0; i < ragResources_.size(); i++) { - output.writeMessage(4, ragResources_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(6, getRagRetrievalConfig()); - } - 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(2, similarityTopK_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, vectorDistanceThreshold_); - } - for (int i = 0; i < ragResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, ragResources_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRagRetrievalConfig()); - } - 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.vertexai.api.VertexRagStore)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VertexRagStore other = - (com.google.cloud.vertexai.api.VertexRagStore) obj; - - if (!getRagResourcesList().equals(other.getRagResourcesList())) return false; - if (hasSimilarityTopK() != other.hasSimilarityTopK()) return false; - if (hasSimilarityTopK()) { - if (getSimilarityTopK() != other.getSimilarityTopK()) return false; - } - if (hasVectorDistanceThreshold() != other.hasVectorDistanceThreshold()) return false; - if (hasVectorDistanceThreshold()) { - if (java.lang.Double.doubleToLongBits(getVectorDistanceThreshold()) - != java.lang.Double.doubleToLongBits(other.getVectorDistanceThreshold())) return false; - } - if (hasRagRetrievalConfig() != other.hasRagRetrievalConfig()) return false; - if (hasRagRetrievalConfig()) { - if (!getRagRetrievalConfig().equals(other.getRagRetrievalConfig())) 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 (getRagResourcesCount() > 0) { - hash = (37 * hash) + RAG_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getRagResourcesList().hashCode(); - } - if (hasSimilarityTopK()) { - hash = (37 * hash) + SIMILARITY_TOP_K_FIELD_NUMBER; - hash = (53 * hash) + getSimilarityTopK(); - } - if (hasVectorDistanceThreshold()) { - hash = (37 * hash) + VECTOR_DISTANCE_THRESHOLD_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getVectorDistanceThreshold())); - } - if (hasRagRetrievalConfig()) { - hash = (37 * hash) + RAG_RETRIEVAL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRagRetrievalConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore 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.vertexai.api.VertexRagStore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore 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.vertexai.api.VertexRagStore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VertexRagStore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VertexRagStore 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Retrieve from Vertex RAG Store for grounding.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VertexRagStore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VertexRagStore) - com.google.cloud.vertexai.api.VertexRagStoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VertexRagStore.class, - com.google.cloud.vertexai.api.VertexRagStore.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VertexRagStore.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRagResourcesFieldBuilder(); - internalGetRagRetrievalConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (ragResourcesBuilder_ == null) { - ragResources_ = java.util.Collections.emptyList(); - } else { - ragResources_ = null; - ragResourcesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - similarityTopK_ = 0; - vectorDistanceThreshold_ = 0D; - ragRetrievalConfig_ = null; - if (ragRetrievalConfigBuilder_ != null) { - ragRetrievalConfigBuilder_.dispose(); - ragRetrievalConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ToolProto - .internal_static_google_cloud_vertexai_v1_VertexRagStore_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore build() { - com.google.cloud.vertexai.api.VertexRagStore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VertexRagStore buildPartial() { - com.google.cloud.vertexai.api.VertexRagStore result = - new com.google.cloud.vertexai.api.VertexRagStore(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.VertexRagStore result) { - if (ragResourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - ragResources_ = java.util.Collections.unmodifiableList(ragResources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ragResources_ = ragResources_; - } else { - result.ragResources_ = ragResourcesBuilder_.build(); - } - } - - private void buildPartial0(com.google.cloud.vertexai.api.VertexRagStore result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.similarityTopK_ = similarityTopK_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.vectorDistanceThreshold_ = vectorDistanceThreshold_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.ragRetrievalConfig_ = - ragRetrievalConfigBuilder_ == null - ? ragRetrievalConfig_ - : ragRetrievalConfigBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VertexRagStore) { - return mergeFrom((com.google.cloud.vertexai.api.VertexRagStore) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VertexRagStore other) { - if (other == com.google.cloud.vertexai.api.VertexRagStore.getDefaultInstance()) return this; - if (ragResourcesBuilder_ == null) { - if (!other.ragResources_.isEmpty()) { - if (ragResources_.isEmpty()) { - ragResources_ = other.ragResources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRagResourcesIsMutable(); - ragResources_.addAll(other.ragResources_); - } - onChanged(); - } - } else { - if (!other.ragResources_.isEmpty()) { - if (ragResourcesBuilder_.isEmpty()) { - ragResourcesBuilder_.dispose(); - ragResourcesBuilder_ = null; - ragResources_ = other.ragResources_; - bitField0_ = (bitField0_ & ~0x00000001); - ragResourcesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetRagResourcesFieldBuilder() - : null; - } else { - ragResourcesBuilder_.addAllMessages(other.ragResources_); - } - } - } - if (other.hasSimilarityTopK()) { - setSimilarityTopK(other.getSimilarityTopK()); - } - if (other.hasVectorDistanceThreshold()) { - setVectorDistanceThreshold(other.getVectorDistanceThreshold()); - } - if (other.hasRagRetrievalConfig()) { - mergeRagRetrievalConfig(other.getRagRetrievalConfig()); - } - 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: - { - similarityTopK_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 25: - { - vectorDistanceThreshold_ = input.readDouble(); - bitField0_ |= 0x00000004; - break; - } // case 25 - case 34: - { - com.google.cloud.vertexai.api.VertexRagStore.RagResource m = - input.readMessage( - com.google.cloud.vertexai.api.VertexRagStore.RagResource.parser(), - extensionRegistry); - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - ragResources_.add(m); - } else { - ragResourcesBuilder_.addMessage(m); - } - break; - } // case 34 - case 50: - { - input.readMessage( - internalGetRagRetrievalConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - 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.util.List ragResources_ = - java.util.Collections.emptyList(); - - private void ensureRagResourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ragResources_ = - new java.util.ArrayList( - ragResources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore.RagResource, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder, - com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder> - ragResourcesBuilder_; - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getRagResourcesList() { - if (ragResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(ragResources_); - } else { - return ragResourcesBuilder_.getMessageList(); - } - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getRagResourcesCount() { - if (ragResourcesBuilder_ == null) { - return ragResources_.size(); - } else { - return ragResourcesBuilder_.getCount(); - } - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VertexRagStore.RagResource getRagResources(int index) { - if (ragResourcesBuilder_ == null) { - return ragResources_.get(index); - } else { - return ragResourcesBuilder_.getMessage(index); - } - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagResources( - int index, com.google.cloud.vertexai.api.VertexRagStore.RagResource value) { - if (ragResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRagResourcesIsMutable(); - ragResources_.set(index, value); - onChanged(); - } else { - ragResourcesBuilder_.setMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagResources( - int index, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder builderForValue) { - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - ragResources_.set(index, builderForValue.build()); - onChanged(); - } else { - ragResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addRagResources(com.google.cloud.vertexai.api.VertexRagStore.RagResource value) { - if (ragResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRagResourcesIsMutable(); - ragResources_.add(value); - onChanged(); - } else { - ragResourcesBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addRagResources( - int index, com.google.cloud.vertexai.api.VertexRagStore.RagResource value) { - if (ragResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRagResourcesIsMutable(); - ragResources_.add(index, value); - onChanged(); - } else { - ragResourcesBuilder_.addMessage(index, value); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addRagResources( - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder builderForValue) { - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - ragResources_.add(builderForValue.build()); - onChanged(); - } else { - ragResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addRagResources( - int index, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder builderForValue) { - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - ragResources_.add(index, builderForValue.build()); - onChanged(); - } else { - ragResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllRagResources( - java.lang.Iterable - values) { - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ragResources_); - onChanged(); - } else { - ragResourcesBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRagResources() { - if (ragResourcesBuilder_ == null) { - ragResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - ragResourcesBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeRagResources(int index) { - if (ragResourcesBuilder_ == null) { - ensureRagResourcesIsMutable(); - ragResources_.remove(index); - onChanged(); - } else { - ragResourcesBuilder_.remove(index); - } - return this; - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder getRagResourcesBuilder( - int index) { - return internalGetRagResourcesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder - getRagResourcesOrBuilder(int index) { - if (ragResourcesBuilder_ == null) { - return ragResources_.get(index); - } else { - return ragResourcesBuilder_.getMessageOrBuilder(index); - } - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder> - getRagResourcesOrBuilderList() { - if (ragResourcesBuilder_ != null) { - return ragResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(ragResources_); - } - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder - addRagResourcesBuilder() { - return internalGetRagResourcesFieldBuilder() - .addBuilder( - com.google.cloud.vertexai.api.VertexRagStore.RagResource.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder addRagResourcesBuilder( - int index) { - return internalGetRagResourcesFieldBuilder() - .addBuilder( - index, com.google.cloud.vertexai.api.VertexRagStore.RagResource.getDefaultInstance()); - } - - /** - * - * - *
-     * Optional. The representation of the rag source. It can be used to specify
-     * corpus only or ragfiles. Currently only support one corpus or multiple
-     * files from one corpus. In the future we may open up multiple corpora
-     * support.
-     * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getRagResourcesBuilderList() { - return internalGetRagResourcesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore.RagResource, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder, - com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder> - internalGetRagResourcesFieldBuilder() { - if (ragResourcesBuilder_ == null) { - ragResourcesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.vertexai.api.VertexRagStore.RagResource, - com.google.cloud.vertexai.api.VertexRagStore.RagResource.Builder, - com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder>( - ragResources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - ragResources_ = null; - } - return ragResourcesBuilder_; - } - - private int similarityTopK_; - - /** - * - * - *
-     * Optional. Number of top k results to return from the selected corpora.
-     * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return Whether the similarityTopK field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasSimilarityTopK() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. Number of top k results to return from the selected corpora.
-     * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return The similarityTopK. - */ - @java.lang.Override - @java.lang.Deprecated - public int getSimilarityTopK() { - return similarityTopK_; - } - - /** - * - * - *
-     * Optional. Number of top k results to return from the selected corpora.
-     * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @param value The similarityTopK to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setSimilarityTopK(int value) { - - similarityTopK_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Number of top k results to return from the selected corpora.
-     * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearSimilarityTopK() { - bitField0_ = (bitField0_ & ~0x00000002); - similarityTopK_ = 0; - onChanged(); - return this; - } - - private double vectorDistanceThreshold_; - - /** - * - * - *
-     * Optional. Only return results with vector distance smaller than the
-     * threshold.
-     * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return Whether the vectorDistanceThreshold field is set. - */ - @java.lang.Override - @java.lang.Deprecated - public boolean hasVectorDistanceThreshold() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Optional. Only return results with vector distance smaller than the
-     * threshold.
-     * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return The vectorDistanceThreshold. - */ - @java.lang.Override - @java.lang.Deprecated - public double getVectorDistanceThreshold() { - return vectorDistanceThreshold_; - } - - /** - * - * - *
-     * Optional. Only return results with vector distance smaller than the
-     * threshold.
-     * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @param value The vectorDistanceThreshold to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setVectorDistanceThreshold(double value) { - - vectorDistanceThreshold_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Only return results with vector distance smaller than the
-     * threshold.
-     * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearVectorDistanceThreshold() { - bitField0_ = (bitField0_ & ~0x00000004); - vectorDistanceThreshold_ = 0D; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.RagRetrievalConfig ragRetrievalConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig, - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder> - ragRetrievalConfigBuilder_; - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragRetrievalConfig field is set. - */ - public boolean hasRagRetrievalConfig() { - return ((bitField0_ & 0x00000008) != 0); - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragRetrievalConfig. - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig getRagRetrievalConfig() { - if (ragRetrievalConfigBuilder_ == null) { - return ragRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance() - : ragRetrievalConfig_; - } else { - return ragRetrievalConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagRetrievalConfig(com.google.cloud.vertexai.api.RagRetrievalConfig value) { - if (ragRetrievalConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ragRetrievalConfig_ = value; - } else { - ragRetrievalConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRagRetrievalConfig( - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder builderForValue) { - if (ragRetrievalConfigBuilder_ == null) { - ragRetrievalConfig_ = builderForValue.build(); - } else { - ragRetrievalConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRagRetrievalConfig(com.google.cloud.vertexai.api.RagRetrievalConfig value) { - if (ragRetrievalConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && ragRetrievalConfig_ != null - && ragRetrievalConfig_ - != com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance()) { - getRagRetrievalConfigBuilder().mergeFrom(value); - } else { - ragRetrievalConfig_ = value; - } - } else { - ragRetrievalConfigBuilder_.mergeFrom(value); - } - if (ragRetrievalConfig_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRagRetrievalConfig() { - bitField0_ = (bitField0_ & ~0x00000008); - ragRetrievalConfig_ = null; - if (ragRetrievalConfigBuilder_ != null) { - ragRetrievalConfigBuilder_.dispose(); - ragRetrievalConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfig.Builder getRagRetrievalConfigBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetRagRetrievalConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder - getRagRetrievalConfigOrBuilder() { - if (ragRetrievalConfigBuilder_ != null) { - return ragRetrievalConfigBuilder_.getMessageOrBuilder(); - } else { - return ragRetrievalConfig_ == null - ? com.google.cloud.vertexai.api.RagRetrievalConfig.getDefaultInstance() - : ragRetrievalConfig_; - } - } - - /** - * - * - *
-     * Optional. The retrieval config for the Rag query.
-     * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig, - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder> - internalGetRagRetrievalConfigFieldBuilder() { - if (ragRetrievalConfigBuilder_ == null) { - ragRetrievalConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.RagRetrievalConfig, - com.google.cloud.vertexai.api.RagRetrievalConfig.Builder, - com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder>( - getRagRetrievalConfig(), getParentForChildren(), isClean()); - ragRetrievalConfig_ = null; - } - return ragRetrievalConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VertexRagStore) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VertexRagStore) - private static final com.google.cloud.vertexai.api.VertexRagStore DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VertexRagStore(); - } - - public static com.google.cloud.vertexai.api.VertexRagStore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VertexRagStore 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.vertexai.api.VertexRagStore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStoreOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStoreOrBuilder.java deleted file mode 100644 index b285ab35a01c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexRagStoreOrBuilder.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/tool.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface VertexRagStoreOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VertexRagStore) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getRagResourcesList(); - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.VertexRagStore.RagResource getRagResources(int index); - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getRagResourcesCount(); - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getRagResourcesOrBuilderList(); - - /** - * - * - *
-   * Optional. The representation of the rag source. It can be used to specify
-   * corpus only or ragfiles. Currently only support one corpus or multiple
-   * files from one corpus. In the future we may open up multiple corpora
-   * support.
-   * 
- * - * - * repeated .google.cloud.vertexai.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.VertexRagStore.RagResourceOrBuilder getRagResourcesOrBuilder( - int index); - - /** - * - * - *
-   * Optional. Number of top k results to return from the selected corpora.
-   * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return Whether the similarityTopK field is set. - */ - @java.lang.Deprecated - boolean hasSimilarityTopK(); - - /** - * - * - *
-   * Optional. Number of top k results to return from the selected corpora.
-   * 
- * - * - * optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.similarity_top_k is deprecated. See - * google/cloud/vertexai/v1/tool.proto;l=457 - * @return The similarityTopK. - */ - @java.lang.Deprecated - int getSimilarityTopK(); - - /** - * - * - *
-   * Optional. Only return results with vector distance smaller than the
-   * threshold.
-   * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return Whether the vectorDistanceThreshold field is set. - */ - @java.lang.Deprecated - boolean hasVectorDistanceThreshold(); - - /** - * - * - *
-   * Optional. Only return results with vector distance smaller than the
-   * threshold.
-   * 
- * - * - * optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @deprecated google.cloud.vertexai.v1.VertexRagStore.vector_distance_threshold is deprecated. - * See google/cloud/vertexai/v1/tool.proto;l=462 - * @return The vectorDistanceThreshold. - */ - @java.lang.Deprecated - double getVectorDistanceThreshold(); - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the ragRetrievalConfig field is set. - */ - boolean hasRagRetrievalConfig(); - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ragRetrievalConfig. - */ - com.google.cloud.vertexai.api.RagRetrievalConfig getRagRetrievalConfig(); - - /** - * - * - *
-   * Optional. The retrieval config for the Rag query.
-   * 
- * - * - * .google.cloud.vertexai.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.RagRetrievalConfigOrBuilder getRagRetrievalConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java deleted file mode 100644 index 30e2ee04ac40..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java +++ /dev/null @@ -1,991 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Metadata describes the input video content.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VideoMetadata} - */ -@com.google.protobuf.Generated -public final class VideoMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VideoMetadata) - VideoMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VideoMetadata"); - } - - // Use VideoMetadata.newBuilder() to construct. - private VideoMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VideoMetadata() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VideoMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VideoMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VideoMetadata.class, - com.google.cloud.vertexai.api.VideoMetadata.Builder.class); - } - - private int bitField0_; - public static final int START_OFFSET_FIELD_NUMBER = 1; - private com.google.protobuf.Duration startOffset_; - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startOffset field is set. - */ - @java.lang.Override - public boolean hasStartOffset() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The startOffset. - */ - @java.lang.Override - public com.google.protobuf.Duration getStartOffset() { - return startOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : startOffset_; - } - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { - return startOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : startOffset_; - } - - public static final int END_OFFSET_FIELD_NUMBER = 2; - private com.google.protobuf.Duration endOffset_; - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endOffset field is set. - */ - @java.lang.Override - public boolean hasEndOffset() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endOffset. - */ - @java.lang.Override - public com.google.protobuf.Duration getEndOffset() { - return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; - } - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { - return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; - } - - 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.writeMessage(1, getStartOffset()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getEndOffset()); - } - 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.computeMessageSize(1, getStartOffset()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndOffset()); - } - 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.vertexai.api.VideoMetadata)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VideoMetadata other = - (com.google.cloud.vertexai.api.VideoMetadata) obj; - - if (hasStartOffset() != other.hasStartOffset()) return false; - if (hasStartOffset()) { - if (!getStartOffset().equals(other.getStartOffset())) return false; - } - if (hasEndOffset() != other.hasEndOffset()) return false; - if (hasEndOffset()) { - if (!getEndOffset().equals(other.getEndOffset())) 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 (hasStartOffset()) { - hash = (37 * hash) + START_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getStartOffset().hashCode(); - } - if (hasEndOffset()) { - hash = (37 * hash) + END_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getEndOffset().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VideoMetadata 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.vertexai.api.VideoMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VideoMetadata 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.vertexai.api.VideoMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VideoMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VideoMetadata 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Metadata describes the input video content.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VideoMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VideoMetadata) - com.google.cloud.vertexai.api.VideoMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VideoMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VideoMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VideoMetadata.class, - com.google.cloud.vertexai.api.VideoMetadata.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VideoMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetStartOffsetFieldBuilder(); - internalGetEndOffsetFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - startOffset_ = null; - if (startOffsetBuilder_ != null) { - startOffsetBuilder_.dispose(); - startOffsetBuilder_ = null; - } - endOffset_ = null; - if (endOffsetBuilder_ != null) { - endOffsetBuilder_.dispose(); - endOffsetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VideoMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadata getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadata build() { - com.google.cloud.vertexai.api.VideoMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VideoMetadata buildPartial() { - com.google.cloud.vertexai.api.VideoMetadata result = - new com.google.cloud.vertexai.api.VideoMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.VideoMetadata result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.startOffset_ = - startOffsetBuilder_ == null ? startOffset_ : startOffsetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.endOffset_ = endOffsetBuilder_ == null ? endOffset_ : endOffsetBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VideoMetadata) { - return mergeFrom((com.google.cloud.vertexai.api.VideoMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VideoMetadata other) { - if (other == com.google.cloud.vertexai.api.VideoMetadata.getDefaultInstance()) return this; - if (other.hasStartOffset()) { - mergeStartOffset(other.getStartOffset()); - } - if (other.hasEndOffset()) { - mergeEndOffset(other.getEndOffset()); - } - 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( - internalGetStartOffsetFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetEndOffsetFieldBuilder().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.Duration startOffset_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - startOffsetBuilder_; - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startOffset field is set. - */ - public boolean hasStartOffset() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The startOffset. - */ - public com.google.protobuf.Duration getStartOffset() { - if (startOffsetBuilder_ == null) { - return startOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : startOffset_; - } else { - return startOffsetBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setStartOffset(com.google.protobuf.Duration value) { - if (startOffsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startOffset_ = value; - } else { - startOffsetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setStartOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (startOffsetBuilder_ == null) { - startOffset_ = builderForValue.build(); - } else { - startOffsetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeStartOffset(com.google.protobuf.Duration value) { - if (startOffsetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && startOffset_ != null - && startOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { - getStartOffsetBuilder().mergeFrom(value); - } else { - startOffset_ = value; - } - } else { - startOffsetBuilder_.mergeFrom(value); - } - if (startOffset_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearStartOffset() { - bitField0_ = (bitField0_ & ~0x00000001); - startOffset_ = null; - if (startOffsetBuilder_ != null) { - startOffsetBuilder_.dispose(); - startOffsetBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getStartOffsetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetStartOffsetFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { - if (startOffsetBuilder_ != null) { - return startOffsetBuilder_.getMessageOrBuilder(); - } else { - return startOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : startOffset_; - } - } - - /** - * - * - *
-     * Optional. The start offset of the video.
-     * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - internalGetStartOffsetFieldBuilder() { - if (startOffsetBuilder_ == null) { - startOffsetBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getStartOffset(), getParentForChildren(), isClean()); - startOffset_ = null; - } - return startOffsetBuilder_; - } - - private com.google.protobuf.Duration endOffset_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - endOffsetBuilder_; - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endOffset field is set. - */ - public boolean hasEndOffset() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endOffset. - */ - public com.google.protobuf.Duration getEndOffset() { - if (endOffsetBuilder_ == null) { - return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; - } else { - return endOffsetBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndOffset(com.google.protobuf.Duration value) { - if (endOffsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endOffset_ = value; - } else { - endOffsetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (endOffsetBuilder_ == null) { - endOffset_ = builderForValue.build(); - } else { - endOffsetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEndOffset(com.google.protobuf.Duration value) { - if (endOffsetBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && endOffset_ != null - && endOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { - getEndOffsetBuilder().mergeFrom(value); - } else { - endOffset_ = value; - } - } else { - endOffsetBuilder_.mergeFrom(value); - } - if (endOffset_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEndOffset() { - bitField0_ = (bitField0_ & ~0x00000002); - endOffset_ = null; - if (endOffsetBuilder_ != null) { - endOffsetBuilder_.dispose(); - endOffsetBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getEndOffsetBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetEndOffsetFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { - if (endOffsetBuilder_ != null) { - return endOffsetBuilder_.getMessageOrBuilder(); - } else { - return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; - } - } - - /** - * - * - *
-     * Optional. The end offset of the video.
-     * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - internalGetEndOffsetFieldBuilder() { - if (endOffsetBuilder_ == null) { - endOffsetBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getEndOffset(), getParentForChildren(), isClean()); - endOffset_ = null; - } - return endOffsetBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VideoMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VideoMetadata) - private static final com.google.cloud.vertexai.api.VideoMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VideoMetadata(); - } - - public static com.google.cloud.vertexai.api.VideoMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoMetadata 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.vertexai.api.VideoMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java deleted file mode 100644 index cfb25f4fe40c..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface VideoMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VideoMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the startOffset field is set. - */ - boolean hasStartOffset(); - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The startOffset. - */ - com.google.protobuf.Duration getStartOffset(); - - /** - * - * - *
-   * Optional. The start offset of the video.
-   * 
- * - * .google.protobuf.Duration start_offset = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder(); - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endOffset field is set. - */ - boolean hasEndOffset(); - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endOffset. - */ - com.google.protobuf.Duration getEndOffset(); - - /** - * - * - *
-   * Optional. The end offset of the video.
-   * 
- * - * .google.protobuf.Duration end_offset = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfig.java deleted file mode 100644 index dd38975dbfa8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfig.java +++ /dev/null @@ -1,1149 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * Configuration for a voice.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VoiceConfig} - */ -@com.google.protobuf.Generated -public final class VoiceConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.VoiceConfig) - VoiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "VoiceConfig"); - } - - // Use VoiceConfig.newBuilder() to construct. - private VoiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private VoiceConfig() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VoiceConfig.class, - com.google.cloud.vertexai.api.VoiceConfig.Builder.class); - } - - private int voiceConfigCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object voiceConfig_; - - public enum VoiceConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PREBUILT_VOICE_CONFIG(1), - REPLICATED_VOICE_CONFIG(3), - VOICECONFIG_NOT_SET(0); - private final int value; - - private VoiceConfigCase(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 VoiceConfigCase valueOf(int value) { - return forNumber(value); - } - - public static VoiceConfigCase forNumber(int value) { - switch (value) { - case 1: - return PREBUILT_VOICE_CONFIG; - case 3: - return REPLICATED_VOICE_CONFIG; - case 0: - return VOICECONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public VoiceConfigCase getVoiceConfigCase() { - return VoiceConfigCase.forNumber(voiceConfigCase_); - } - - public static final int PREBUILT_VOICE_CONFIG_FIELD_NUMBER = 1; - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return Whether the prebuiltVoiceConfig field is set. - */ - @java.lang.Override - public boolean hasPrebuiltVoiceConfig() { - return voiceConfigCase_ == 1; - } - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return The prebuiltVoiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig getPrebuiltVoiceConfig() { - if (voiceConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder - getPrebuiltVoiceConfigOrBuilder() { - if (voiceConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - - public static final int REPLICATED_VOICE_CONFIG_FIELD_NUMBER = 3; - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the replicatedVoiceConfig field is set. - */ - @java.lang.Override - public boolean hasReplicatedVoiceConfig() { - return voiceConfigCase_ == 3; - } - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The replicatedVoiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig getReplicatedVoiceConfig() { - if (voiceConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder - getReplicatedVoiceConfigOrBuilder() { - if (voiceConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.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 (voiceConfigCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_); - } - if (voiceConfigCase_ == 3) { - output.writeMessage(3, (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (voiceConfigCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_); - } - if (voiceConfigCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_); - } - 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.vertexai.api.VoiceConfig)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.VoiceConfig other = - (com.google.cloud.vertexai.api.VoiceConfig) obj; - - if (!getVoiceConfigCase().equals(other.getVoiceConfigCase())) return false; - switch (voiceConfigCase_) { - case 1: - if (!getPrebuiltVoiceConfig().equals(other.getPrebuiltVoiceConfig())) return false; - break; - case 3: - if (!getReplicatedVoiceConfig().equals(other.getReplicatedVoiceConfig())) 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 (voiceConfigCase_) { - case 1: - hash = (37 * hash) + PREBUILT_VOICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getPrebuiltVoiceConfig().hashCode(); - break; - case 3: - hash = (37 * hash) + REPLICATED_VOICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getReplicatedVoiceConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VoiceConfig 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.vertexai.api.VoiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VoiceConfig 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.vertexai.api.VoiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.VoiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.VoiceConfig 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * Configuration for a voice.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.VoiceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.VoiceConfig) - com.google.cloud.vertexai.api.VoiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VoiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VoiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.VoiceConfig.class, - com.google.cloud.vertexai.api.VoiceConfig.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.VoiceConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (prebuiltVoiceConfigBuilder_ != null) { - prebuiltVoiceConfigBuilder_.clear(); - } - if (replicatedVoiceConfigBuilder_ != null) { - replicatedVoiceConfigBuilder_.clear(); - } - voiceConfigCase_ = 0; - voiceConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ContentProto - .internal_static_google_cloud_vertexai_v1_VoiceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfig getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfig build() { - com.google.cloud.vertexai.api.VoiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.VoiceConfig buildPartial() { - com.google.cloud.vertexai.api.VoiceConfig result = - new com.google.cloud.vertexai.api.VoiceConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.VoiceConfig result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(com.google.cloud.vertexai.api.VoiceConfig result) { - result.voiceConfigCase_ = voiceConfigCase_; - result.voiceConfig_ = this.voiceConfig_; - if (voiceConfigCase_ == 1 && prebuiltVoiceConfigBuilder_ != null) { - result.voiceConfig_ = prebuiltVoiceConfigBuilder_.build(); - } - if (voiceConfigCase_ == 3 && replicatedVoiceConfigBuilder_ != null) { - result.voiceConfig_ = replicatedVoiceConfigBuilder_.build(); - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.VoiceConfig) { - return mergeFrom((com.google.cloud.vertexai.api.VoiceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.VoiceConfig other) { - if (other == com.google.cloud.vertexai.api.VoiceConfig.getDefaultInstance()) return this; - switch (other.getVoiceConfigCase()) { - case PREBUILT_VOICE_CONFIG: - { - mergePrebuiltVoiceConfig(other.getPrebuiltVoiceConfig()); - break; - } - case REPLICATED_VOICE_CONFIG: - { - mergeReplicatedVoiceConfig(other.getReplicatedVoiceConfig()); - break; - } - case VOICECONFIG_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( - internalGetPrebuiltVoiceConfigFieldBuilder().getBuilder(), extensionRegistry); - voiceConfigCase_ = 1; - break; - } // case 10 - case 26: - { - input.readMessage( - internalGetReplicatedVoiceConfigFieldBuilder().getBuilder(), extensionRegistry); - voiceConfigCase_ = 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 voiceConfigCase_ = 0; - private java.lang.Object voiceConfig_; - - public VoiceConfigCase getVoiceConfigCase() { - return VoiceConfigCase.forNumber(voiceConfigCase_); - } - - public Builder clearVoiceConfig() { - voiceConfigCase_ = 0; - voiceConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrebuiltVoiceConfig, - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder, - com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder> - prebuiltVoiceConfigBuilder_; - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return Whether the prebuiltVoiceConfig field is set. - */ - @java.lang.Override - public boolean hasPrebuiltVoiceConfig() { - return voiceConfigCase_ == 1; - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return The prebuiltVoiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig getPrebuiltVoiceConfig() { - if (prebuiltVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } else { - if (voiceConfigCase_ == 1) { - return prebuiltVoiceConfigBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - public Builder setPrebuiltVoiceConfig(com.google.cloud.vertexai.api.PrebuiltVoiceConfig value) { - if (prebuiltVoiceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - voiceConfig_ = value; - onChanged(); - } else { - prebuiltVoiceConfigBuilder_.setMessage(value); - } - voiceConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - public Builder setPrebuiltVoiceConfig( - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder builderForValue) { - if (prebuiltVoiceConfigBuilder_ == null) { - voiceConfig_ = builderForValue.build(); - onChanged(); - } else { - prebuiltVoiceConfigBuilder_.setMessage(builderForValue.build()); - } - voiceConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - public Builder mergePrebuiltVoiceConfig( - com.google.cloud.vertexai.api.PrebuiltVoiceConfig value) { - if (prebuiltVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 1 - && voiceConfig_ - != com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance()) { - voiceConfig_ = - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.newBuilder( - (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - voiceConfig_ = value; - } - onChanged(); - } else { - if (voiceConfigCase_ == 1) { - prebuiltVoiceConfigBuilder_.mergeFrom(value); - } else { - prebuiltVoiceConfigBuilder_.setMessage(value); - } - } - voiceConfigCase_ = 1; - return this; - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - public Builder clearPrebuiltVoiceConfig() { - if (prebuiltVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 1) { - voiceConfigCase_ = 0; - voiceConfig_ = null; - onChanged(); - } - } else { - if (voiceConfigCase_ == 1) { - voiceConfigCase_ = 0; - voiceConfig_ = null; - } - prebuiltVoiceConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - public com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder - getPrebuiltVoiceConfigBuilder() { - return internalGetPrebuiltVoiceConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder - getPrebuiltVoiceConfigOrBuilder() { - if ((voiceConfigCase_ == 1) && (prebuiltVoiceConfigBuilder_ != null)) { - return prebuiltVoiceConfigBuilder_.getMessageOrBuilder(); - } else { - if (voiceConfigCase_ == 1) { - return (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * The configuration for a prebuilt voice.
-     * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrebuiltVoiceConfig, - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder, - com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder> - internalGetPrebuiltVoiceConfigFieldBuilder() { - if (prebuiltVoiceConfigBuilder_ == null) { - if (!(voiceConfigCase_ == 1)) { - voiceConfig_ = com.google.cloud.vertexai.api.PrebuiltVoiceConfig.getDefaultInstance(); - } - prebuiltVoiceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.PrebuiltVoiceConfig, - com.google.cloud.vertexai.api.PrebuiltVoiceConfig.Builder, - com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder>( - (com.google.cloud.vertexai.api.PrebuiltVoiceConfig) voiceConfig_, - getParentForChildren(), - isClean()); - voiceConfig_ = null; - } - voiceConfigCase_ = 1; - onChanged(); - return prebuiltVoiceConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReplicatedVoiceConfig, - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder, - com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder> - replicatedVoiceConfigBuilder_; - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the replicatedVoiceConfig field is set. - */ - @java.lang.Override - public boolean hasReplicatedVoiceConfig() { - return voiceConfigCase_ == 3; - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The replicatedVoiceConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig getReplicatedVoiceConfig() { - if (replicatedVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } else { - if (voiceConfigCase_ == 3) { - return replicatedVoiceConfigBuilder_.getMessage(); - } - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReplicatedVoiceConfig( - com.google.cloud.vertexai.api.ReplicatedVoiceConfig value) { - if (replicatedVoiceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - voiceConfig_ = value; - onChanged(); - } else { - replicatedVoiceConfigBuilder_.setMessage(value); - } - voiceConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReplicatedVoiceConfig( - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder builderForValue) { - if (replicatedVoiceConfigBuilder_ == null) { - voiceConfig_ = builderForValue.build(); - onChanged(); - } else { - replicatedVoiceConfigBuilder_.setMessage(builderForValue.build()); - } - voiceConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReplicatedVoiceConfig( - com.google.cloud.vertexai.api.ReplicatedVoiceConfig value) { - if (replicatedVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 3 - && voiceConfig_ - != com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance()) { - voiceConfig_ = - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.newBuilder( - (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - voiceConfig_ = value; - } - onChanged(); - } else { - if (voiceConfigCase_ == 3) { - replicatedVoiceConfigBuilder_.mergeFrom(value); - } else { - replicatedVoiceConfigBuilder_.setMessage(value); - } - } - voiceConfigCase_ = 3; - return this; - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearReplicatedVoiceConfig() { - if (replicatedVoiceConfigBuilder_ == null) { - if (voiceConfigCase_ == 3) { - voiceConfigCase_ = 0; - voiceConfig_ = null; - onChanged(); - } - } else { - if (voiceConfigCase_ == 3) { - voiceConfigCase_ = 0; - voiceConfig_ = null; - } - replicatedVoiceConfigBuilder_.clear(); - } - return this; - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder - getReplicatedVoiceConfigBuilder() { - return internalGetReplicatedVoiceConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder - getReplicatedVoiceConfigOrBuilder() { - if ((voiceConfigCase_ == 3) && (replicatedVoiceConfigBuilder_ != null)) { - return replicatedVoiceConfigBuilder_.getMessageOrBuilder(); - } else { - if (voiceConfigCase_ == 3) { - return (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_; - } - return com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } - } - - /** - * - * - *
-     * Optional. The configuration for a replicated voice. This enables users to
-     * replicate a voice from an audio sample.
-     * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReplicatedVoiceConfig, - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder, - com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder> - internalGetReplicatedVoiceConfigFieldBuilder() { - if (replicatedVoiceConfigBuilder_ == null) { - if (!(voiceConfigCase_ == 3)) { - voiceConfig_ = com.google.cloud.vertexai.api.ReplicatedVoiceConfig.getDefaultInstance(); - } - replicatedVoiceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.ReplicatedVoiceConfig, - com.google.cloud.vertexai.api.ReplicatedVoiceConfig.Builder, - com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder>( - (com.google.cloud.vertexai.api.ReplicatedVoiceConfig) voiceConfig_, - getParentForChildren(), - isClean()); - voiceConfig_ = null; - } - voiceConfigCase_ = 3; - onChanged(); - return replicatedVoiceConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.VoiceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.VoiceConfig) - private static final com.google.cloud.vertexai.api.VoiceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.VoiceConfig(); - } - - public static com.google.cloud.vertexai.api.VoiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VoiceConfig 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.vertexai.api.VoiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfigOrBuilder.java deleted file mode 100644 index 9a7e0b0485f7..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VoiceConfigOrBuilder.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/content.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface VoiceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.VoiceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return Whether the prebuiltVoiceConfig field is set. - */ - boolean hasPrebuiltVoiceConfig(); - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - * - * @return The prebuiltVoiceConfig. - */ - com.google.cloud.vertexai.api.PrebuiltVoiceConfig getPrebuiltVoiceConfig(); - - /** - * - * - *
-   * The configuration for a prebuilt voice.
-   * 
- * - * .google.cloud.vertexai.v1.PrebuiltVoiceConfig prebuilt_voice_config = 1; - */ - com.google.cloud.vertexai.api.PrebuiltVoiceConfigOrBuilder getPrebuiltVoiceConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the replicatedVoiceConfig field is set. - */ - boolean hasReplicatedVoiceConfig(); - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The replicatedVoiceConfig. - */ - com.google.cloud.vertexai.api.ReplicatedVoiceConfig getReplicatedVoiceConfig(); - - /** - * - * - *
-   * Optional. The configuration for a replicated voice. This enables users to
-   * replicate a voice from an audio sample.
-   * 
- * - * - * .google.cloud.vertexai.v1.ReplicatedVoiceConfig replicated_voice_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.vertexai.api.ReplicatedVoiceConfigOrBuilder getReplicatedVoiceConfigOrBuilder(); - - com.google.cloud.vertexai.api.VoiceConfig.VoiceConfigCase getVoiceConfigCase(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java deleted file mode 100644 index 16c0b5943bd9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java +++ /dev/null @@ -1,1231 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -/** - * - * - *
- * An explanation method that redistributes Integrated Gradients
- * attributions to segmented regions, taking advantage of the model's fully
- * differentiable structure. Refer to this paper for more details:
- * https://arxiv.org/abs/1906.02825
- *
- * Supported only by image Models.
- * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.XraiAttribution} - */ -@com.google.protobuf.Generated -public final class XraiAttribution extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.XraiAttribution) - XraiAttributionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "XraiAttribution"); - } - - // Use XraiAttribution.newBuilder() to construct. - private XraiAttribution(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private XraiAttribution() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_XraiAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.XraiAttribution.class, - com.google.cloud.vertexai.api.XraiAttribution.Builder.class); - } - - private int bitField0_; - public static final int STEP_COUNT_FIELD_NUMBER = 1; - private int stepCount_ = 0; - - /** - * - * - *
-   * Required. The number of steps for approximating the path integral.
-   * A good value to start is 50 and gradually increase until the
-   * sum to diff property is met within the desired error range.
-   *
-   * Valid range of its value is [1, 100], inclusively.
-   * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - @java.lang.Override - public int getStepCount() { - return stepCount_; - } - - public static final int SMOOTH_GRAD_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vertexai.api.SmoothGradConfig smoothGradConfig_; - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - @java.lang.Override - public boolean hasSmoothGradConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig() { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder() { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - - public static final int BLUR_BASELINE_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.vertexai.api.BlurBaselineConfig blurBaselineConfig_; - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - @java.lang.Override - public boolean hasBlurBaselineConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig() { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - @java.lang.Override - public com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder - getBlurBaselineConfigOrBuilder() { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - - 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 (stepCount_ != 0) { - output.writeInt32(1, stepCount_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSmoothGradConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getBlurBaselineConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (stepCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, stepCount_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSmoothGradConfig()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBlurBaselineConfig()); - } - 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.vertexai.api.XraiAttribution)) { - return super.equals(obj); - } - com.google.cloud.vertexai.api.XraiAttribution other = - (com.google.cloud.vertexai.api.XraiAttribution) obj; - - if (getStepCount() != other.getStepCount()) return false; - if (hasSmoothGradConfig() != other.hasSmoothGradConfig()) return false; - if (hasSmoothGradConfig()) { - if (!getSmoothGradConfig().equals(other.getSmoothGradConfig())) return false; - } - if (hasBlurBaselineConfig() != other.hasBlurBaselineConfig()) return false; - if (hasBlurBaselineConfig()) { - if (!getBlurBaselineConfig().equals(other.getBlurBaselineConfig())) 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) + STEP_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getStepCount(); - if (hasSmoothGradConfig()) { - hash = (37 * hash) + SMOOTH_GRAD_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSmoothGradConfig().hashCode(); - } - if (hasBlurBaselineConfig()) { - hash = (37 * hash) + BLUR_BASELINE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBlurBaselineConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.XraiAttribution 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.vertexai.api.XraiAttribution parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.XraiAttribution 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.vertexai.api.XraiAttribution parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.vertexai.api.XraiAttribution parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.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.vertexai.api.XraiAttribution 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.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
-   * An explanation method that redistributes Integrated Gradients
-   * attributions to segmented regions, taking advantage of the model's fully
-   * differentiable structure. Refer to this paper for more details:
-   * https://arxiv.org/abs/1906.02825
-   *
-   * Supported only by image Models.
-   * 
- * - * Protobuf type {@code google.cloud.vertexai.v1.XraiAttribution} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.XraiAttribution) - com.google.cloud.vertexai.api.XraiAttributionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_XraiAttribution_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vertexai.api.XraiAttribution.class, - com.google.cloud.vertexai.api.XraiAttribution.Builder.class); - } - - // Construct using com.google.cloud.vertexai.api.XraiAttribution.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSmoothGradConfigFieldBuilder(); - internalGetBlurBaselineConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - stepCount_ = 0; - smoothGradConfig_ = null; - if (smoothGradConfigBuilder_ != null) { - smoothGradConfigBuilder_.dispose(); - smoothGradConfigBuilder_ = null; - } - blurBaselineConfig_ = null; - if (blurBaselineConfigBuilder_ != null) { - blurBaselineConfigBuilder_.dispose(); - blurBaselineConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.vertexai.api.ExplanationProto - .internal_static_google_cloud_vertexai_v1_XraiAttribution_descriptor; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttribution getDefaultInstanceForType() { - return com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttribution build() { - com.google.cloud.vertexai.api.XraiAttribution result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vertexai.api.XraiAttribution buildPartial() { - com.google.cloud.vertexai.api.XraiAttribution result = - new com.google.cloud.vertexai.api.XraiAttribution(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.cloud.vertexai.api.XraiAttribution result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.stepCount_ = stepCount_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.smoothGradConfig_ = - smoothGradConfigBuilder_ == null ? smoothGradConfig_ : smoothGradConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.blurBaselineConfig_ = - blurBaselineConfigBuilder_ == null - ? blurBaselineConfig_ - : blurBaselineConfigBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vertexai.api.XraiAttribution) { - return mergeFrom((com.google.cloud.vertexai.api.XraiAttribution) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vertexai.api.XraiAttribution other) { - if (other == com.google.cloud.vertexai.api.XraiAttribution.getDefaultInstance()) return this; - if (other.getStepCount() != 0) { - setStepCount(other.getStepCount()); - } - if (other.hasSmoothGradConfig()) { - mergeSmoothGradConfig(other.getSmoothGradConfig()); - } - if (other.hasBlurBaselineConfig()) { - mergeBlurBaselineConfig(other.getBlurBaselineConfig()); - } - 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: - { - stepCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - input.readMessage( - internalGetSmoothGradConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetBlurBaselineConfigFieldBuilder().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 int stepCount_; - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is met within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - @java.lang.Override - public int getStepCount() { - return stepCount_; - } - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is met within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The stepCount to set. - * @return This builder for chaining. - */ - public Builder setStepCount(int value) { - - stepCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
-     * Required. The number of steps for approximating the path integral.
-     * A good value to start is 50 and gradually increase until the
-     * sum to diff property is met within the desired error range.
-     *
-     * Valid range of its value is [1, 100], inclusively.
-     * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearStepCount() { - bitField0_ = (bitField0_ & ~0x00000001); - stepCount_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vertexai.api.SmoothGradConfig smoothGradConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder> - smoothGradConfigBuilder_; - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - public boolean hasSmoothGradConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - public com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig() { - if (smoothGradConfigBuilder_ == null) { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } else { - return smoothGradConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder setSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradConfig value) { - if (smoothGradConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - smoothGradConfig_ = value; - } else { - smoothGradConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder setSmoothGradConfig( - com.google.cloud.vertexai.api.SmoothGradConfig.Builder builderForValue) { - if (smoothGradConfigBuilder_ == null) { - smoothGradConfig_ = builderForValue.build(); - } else { - smoothGradConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder mergeSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradConfig value) { - if (smoothGradConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && smoothGradConfig_ != null - && smoothGradConfig_ - != com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance()) { - getSmoothGradConfigBuilder().mergeFrom(value); - } else { - smoothGradConfig_ = value; - } - } else { - smoothGradConfigBuilder_.mergeFrom(value); - } - if (smoothGradConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public Builder clearSmoothGradConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - smoothGradConfig_ = null; - if (smoothGradConfigBuilder_ != null) { - smoothGradConfigBuilder_.dispose(); - smoothGradConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public com.google.cloud.vertexai.api.SmoothGradConfig.Builder getSmoothGradConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetSmoothGradConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder() { - if (smoothGradConfigBuilder_ != null) { - return smoothGradConfigBuilder_.getMessageOrBuilder(); - } else { - return smoothGradConfig_ == null - ? com.google.cloud.vertexai.api.SmoothGradConfig.getDefaultInstance() - : smoothGradConfig_; - } - } - - /** - * - * - *
-     * Config for SmoothGrad approximation of gradients.
-     *
-     * When enabled, the gradients are approximated by averaging the gradients
-     * from noisy samples in the vicinity of the inputs. Adding
-     * noise can help improve the computed gradients. Refer to this paper for more
-     * details: https://arxiv.org/pdf/1706.03825.pdf
-     * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder> - internalGetSmoothGradConfigFieldBuilder() { - if (smoothGradConfigBuilder_ == null) { - smoothGradConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.SmoothGradConfig, - com.google.cloud.vertexai.api.SmoothGradConfig.Builder, - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder>( - getSmoothGradConfig(), getParentForChildren(), isClean()); - smoothGradConfig_ = null; - } - return smoothGradConfigBuilder_; - } - - private com.google.cloud.vertexai.api.BlurBaselineConfig blurBaselineConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder> - blurBaselineConfigBuilder_; - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - public boolean hasBlurBaselineConfig() { - return ((bitField0_ & 0x00000004) != 0); - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - public com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig() { - if (blurBaselineConfigBuilder_ == null) { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } else { - return blurBaselineConfigBuilder_.getMessage(); - } - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder setBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselineConfig value) { - if (blurBaselineConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - blurBaselineConfig_ = value; - } else { - blurBaselineConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder setBlurBaselineConfig( - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder builderForValue) { - if (blurBaselineConfigBuilder_ == null) { - blurBaselineConfig_ = builderForValue.build(); - } else { - blurBaselineConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder mergeBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselineConfig value) { - if (blurBaselineConfigBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && blurBaselineConfig_ != null - && blurBaselineConfig_ - != com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance()) { - getBlurBaselineConfigBuilder().mergeFrom(value); - } else { - blurBaselineConfig_ = value; - } - } else { - blurBaselineConfigBuilder_.mergeFrom(value); - } - if (blurBaselineConfig_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public Builder clearBlurBaselineConfig() { - bitField0_ = (bitField0_ & ~0x00000004); - blurBaselineConfig_ = null; - if (blurBaselineConfigBuilder_ != null) { - blurBaselineConfigBuilder_.dispose(); - blurBaselineConfigBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public com.google.cloud.vertexai.api.BlurBaselineConfig.Builder getBlurBaselineConfigBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetBlurBaselineConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - public com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder - getBlurBaselineConfigOrBuilder() { - if (blurBaselineConfigBuilder_ != null) { - return blurBaselineConfigBuilder_.getMessageOrBuilder(); - } else { - return blurBaselineConfig_ == null - ? com.google.cloud.vertexai.api.BlurBaselineConfig.getDefaultInstance() - : blurBaselineConfig_; - } - } - - /** - * - * - *
-     * Config for XRAI with blur baseline.
-     *
-     * When enabled, a linear path from the maximally blurred image to the input
-     * image is created. Using a blurred baseline instead of zero (black image) is
-     * motivated by the BlurIG approach explained here:
-     * https://arxiv.org/abs/2004.03383
-     * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder> - internalGetBlurBaselineConfigFieldBuilder() { - if (blurBaselineConfigBuilder_ == null) { - blurBaselineConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.vertexai.api.BlurBaselineConfig, - com.google.cloud.vertexai.api.BlurBaselineConfig.Builder, - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder>( - getBlurBaselineConfig(), getParentForChildren(), isClean()); - blurBaselineConfig_ = null; - } - return blurBaselineConfigBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.XraiAttribution) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.XraiAttribution) - private static final com.google.cloud.vertexai.api.XraiAttribution DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.XraiAttribution(); - } - - public static com.google.cloud.vertexai.api.XraiAttribution getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public XraiAttribution 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.vertexai.api.XraiAttribution getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java deleted file mode 100644 index ee26ebfe372e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2026 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/vertexai/v1/explanation.proto -// Protobuf Java Version: 4.33.2 - -package com.google.cloud.vertexai.api; - -@com.google.protobuf.Generated -public interface XraiAttributionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.XraiAttribution) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The number of steps for approximating the path integral.
-   * A good value to start is 50 and gradually increase until the
-   * sum to diff property is met within the desired error range.
-   *
-   * Valid range of its value is [1, 100], inclusively.
-   * 
- * - * int32 step_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepCount. - */ - int getStepCount(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return Whether the smoothGradConfig field is set. - */ - boolean hasSmoothGradConfig(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - * - * @return The smoothGradConfig. - */ - com.google.cloud.vertexai.api.SmoothGradConfig getSmoothGradConfig(); - - /** - * - * - *
-   * Config for SmoothGrad approximation of gradients.
-   *
-   * When enabled, the gradients are approximated by averaging the gradients
-   * from noisy samples in the vicinity of the inputs. Adding
-   * noise can help improve the computed gradients. Refer to this paper for more
-   * details: https://arxiv.org/pdf/1706.03825.pdf
-   * 
- * - * .google.cloud.vertexai.v1.SmoothGradConfig smooth_grad_config = 2; - */ - com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConfigOrBuilder(); - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return Whether the blurBaselineConfig field is set. - */ - boolean hasBlurBaselineConfig(); - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - * - * @return The blurBaselineConfig. - */ - com.google.cloud.vertexai.api.BlurBaselineConfig getBlurBaselineConfig(); - - /** - * - * - *
-   * Config for XRAI with blur baseline.
-   *
-   * When enabled, a linear path from the maximally blurred image to the input
-   * image is created. Using a blurred baseline instead of zero (black image) is
-   * motivated by the BlurIG approach explained here:
-   * https://arxiv.org/abs/2004.03383
-   * 
- * - * .google.cloud.vertexai.v1.BlurBaselineConfig blur_baseline_config = 3; - */ - com.google.cloud.vertexai.api.BlurBaselineConfigOrBuilder getBlurBaselineConfigOrBuilder(); -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto deleted file mode 100644 index d65c6015795e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "AcceleratorTypeProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Represents a hardware accelerator type. -enum AcceleratorType { - // Unspecified accelerator type, which means no accelerator. - ACCELERATOR_TYPE_UNSPECIFIED = 0; - - // Deprecated: Nvidia Tesla K80 GPU has reached end of support, - // see https://cloud.google.com/compute/docs/eol/k80-eol. - NVIDIA_TESLA_K80 = 1 [deprecated = true]; - - // Nvidia Tesla P100 GPU. - NVIDIA_TESLA_P100 = 2; - - // Nvidia Tesla V100 GPU. - NVIDIA_TESLA_V100 = 3; - - // Nvidia Tesla P4 GPU. - NVIDIA_TESLA_P4 = 4; - - // Nvidia Tesla T4 GPU. - NVIDIA_TESLA_T4 = 5; - - // Nvidia Tesla A100 GPU. - NVIDIA_TESLA_A100 = 8; - - // Nvidia A100 80GB GPU. - NVIDIA_A100_80GB = 9; - - // Nvidia L4 GPU. - NVIDIA_L4 = 11; - - // Nvidia H100 80Gb GPU. - NVIDIA_H100_80GB = 13; - - // Nvidia H100 Mega 80Gb GPU. - NVIDIA_H100_MEGA_80GB = 14; - - // Nvidia H200 141Gb GPU. - NVIDIA_H200_141GB = 15; - - // Nvidia B200 GPU. - NVIDIA_B200 = 16; - - // Nvidia GB200 GPU. - NVIDIA_GB200 = 17; - - // Nvidia RTX Pro 6000 GPU. - NVIDIA_RTX_PRO_6000 = 18; - - // TPU v2. - TPU_V2 = 6; - - // TPU v3. - TPU_V3 = 7; - - // TPU v4. - TPU_V4_POD = 10; - - // TPU v5. - TPU_V5_LITEPOD = 12; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/api_auth.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/api_auth.proto deleted file mode 100644 index 1cd10a196ee0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/api_auth.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ApiAuthProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; -option (google.api.resource_definition) = { - type: "secretmanager.googleapis.com/SecretVersion" - pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" -}; - -// The generic reusable api auth config. -message ApiAuth { - // The API secret. - message ApiKeyConfig { - // Required. The SecretManager secret version resource name storing API key. - // e.g. projects/{project}/secrets/{secret}/versions/{version} - string api_key_secret_version = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "secretmanager.googleapis.com/SecretVersion" - } - ]; - } - - // The auth config. - oneof auth_config { - // The API secret. - ApiKeyConfig api_key_config = 1; - } -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/cached_content.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/cached_content.proto deleted file mode 100644 index 35202e44e08b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/cached_content.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/content.proto"; -import "google/cloud/vertexai/v1/encryption_spec.proto"; -import "google/cloud/vertexai/v1/tool.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "CachedContentProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// A resource used in LLM queries for users to explicitly specify what to cache -// and how to cache. -message CachedContent { - option (google.api.resource) = { - type: "aiplatform.googleapis.com/CachedContent" - pattern: "projects/{project}/locations/{location}/cachedContents/{cached_content}" - plural: "cachedContents" - singular: "cachedContent" - }; - - // Metadata on the usage of the cached content. - message UsageMetadata { - // Total number of tokens that the cached content consumes. - int32 total_token_count = 1; - - // Number of text characters. - int32 text_count = 2; - - // Number of images. - int32 image_count = 3; - - // Duration of video in seconds. - int32 video_duration_seconds = 4; - - // Duration of audio in seconds. - int32 audio_duration_seconds = 5; - } - - // Expiration time of the cached content. - oneof expiration { - // Timestamp of when this resource is considered expired. - // This is *always* provided on output, regardless of what was sent - // on input. - google.protobuf.Timestamp expire_time = 9; - - // Input only. The TTL for this resource. The expiration time is computed: - // now + TTL. - google.protobuf.Duration ttl = 10 - [(google.api.field_behavior) = INPUT_ONLY]; - } - - // Immutable. Identifier. The server-generated resource name of the cached - // content Format: - // projects/{project}/locations/{location}/cachedContents/{cached_content} - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. Immutable. The user-generated meaningful display name of the - // cached content. - string display_name = 11 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Immutable. The name of the `Model` to use for cached content. Currently, - // only the published Gemini base models are supported, in form of - // projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL} - string model = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. Input only. Immutable. Developer set system instruction. - // Currently, text only - Content system_instruction = 3 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // Optional. Input only. Immutable. The content to cache - repeated Content contents = 4 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // Optional. Input only. Immutable. A list of `Tools` the model may use to - // generate the next response - repeated Tool tools = 5 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // Optional. Input only. Immutable. Tool config. This config is shared for all - // tools - ToolConfig tool_config = 6 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = INPUT_ONLY - ]; - - // Output only. Creation time of the cache entry. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. When the cache entry was last updated in UTC time. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata on the usage of the cached content. - UsageMetadata usage_metadata = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Input only. Immutable. Customer-managed encryption key spec for a - // `CachedContent`. If set, this `CachedContent` and all its sub-resources - // will be secured by this key. - EncryptionSpec encryption_spec = 13 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto deleted file mode 100644 index f3480fe29141..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto +++ /dev/null @@ -1,923 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/openapi.proto"; -import "google/cloud/vertexai/v1/tool.proto"; -import "google/cloud/vertexai/v1/vertex_rag_data.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/type/date.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ContentProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; -option (google.api.resource_definition) = { - type: "modelarmor.googleapis.com/Template" - pattern: "projects/{project}/locations/{location}/templates/{template}" -}; - -// Harm categories that will block the content. -enum HarmCategory { - // The harm category is unspecified. - HARM_CATEGORY_UNSPECIFIED = 0; - - // The harm category is hate speech. - HARM_CATEGORY_HATE_SPEECH = 1; - - // The harm category is dangerous content. - HARM_CATEGORY_DANGEROUS_CONTENT = 2; - - // The harm category is harassment. - HARM_CATEGORY_HARASSMENT = 3; - - // The harm category is sexually explicit content. - HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; - - // Deprecated: Election filter is not longer supported. - // The harm category is civic integrity. - HARM_CATEGORY_CIVIC_INTEGRITY = 5 [deprecated = true]; - - // The harm category is for jailbreak prompts. - HARM_CATEGORY_JAILBREAK = 6; -} - -// Content Part modality -enum Modality { - // Unspecified modality. - MODALITY_UNSPECIFIED = 0; - - // Plain text. - TEXT = 1; - - // Image. - IMAGE = 2; - - // Video. - VIDEO = 3; - - // Audio. - AUDIO = 4; - - // Document, e.g. PDF. - DOCUMENT = 5; -} - -// The base structured datatype containing multi-part content of a message. -// -// A `Content` includes a `role` field designating the producer of the `Content` -// and a `parts` field containing multi-part data that contains the content of -// the message turn. -message Content { - // Optional. The producer of the content. Must be either 'user' or 'model'. - // - // Useful to set for multi-turn conversations, otherwise can be left blank - // or unset. - string role = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Ordered `Parts` that constitute a single message. Parts may have - // different IANA MIME types. - repeated Part parts = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A datatype containing media that is part of a multi-part `Content` message. -// -// A `Part` consists of data which has an associated datatype. A `Part` can only -// contain one of the accepted types in `Part.data`. -// -// A `Part` must have a fixed IANA MIME type identifying the type and subtype -// of the media if `inline_data` or `file_data` field is filled with raw bytes. -message Part { - oneof data { - // Optional. Text part (can be code). - string text = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Inlined bytes data. - Blob inline_data = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. URI based data. - FileData file_data = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A predicted [FunctionCall] returned from the model that - // contains a string representing the [FunctionDeclaration.name] with the - // parameters and their values. - FunctionCall function_call = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The result output of a [FunctionCall] that contains a string - // representing the [FunctionDeclaration.name] and a structured JSON object - // containing any output from the function call. It is used as context to - // the model. - FunctionResponse function_response = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Code generated by the model that is meant to be executed. - ExecutableCode executable_code = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Result of executing the [ExecutableCode]. - CodeExecutionResult code_execution_result = 9 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Indicates if the part is thought from the model. - bool thought = 10 [(google.api.field_behavior) = OPTIONAL]; - - // An opaque signature for the thought so it can be reused in subsequent - // requests. - bytes thought_signature = 11 [(google.api.field_behavior) = OPTIONAL]; - - oneof metadata { - // Optional. Video metadata. The metadata should only be specified while the - // video data is presented in inline_data or file_data. - VideoMetadata video_metadata = 4 [(google.api.field_behavior) = OPTIONAL]; - } -} - -// Content blob. -// -// It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text] -// directly rather than raw bytes. -message Blob { - // Required. The IANA standard MIME type of the source data. - string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Raw bytes. - bytes data = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// URI based data. -message FileData { - // Required. The IANA standard MIME type of the source data. - string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. URI. - string file_uri = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Metadata describes the input video content. -message VideoMetadata { - // Optional. The start offset of the video. - google.protobuf.Duration start_offset = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The end offset of the video. - google.protobuf.Duration end_offset = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for a prebuilt voice. -message PrebuiltVoiceConfig { - // The name of the prebuilt voice to use. - optional string voice_name = 1; -} - -// The configuration for the replicated voice to use. -message ReplicatedVoiceConfig { - // Optional. The mimetype of the voice sample. The only currently supported - // value is `audio/wav`. This represents 16-bit signed little-endian wav data, - // with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not - // set. - string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The sample of the custom voice. - bytes voice_sample_audio = 2 [(google.api.field_behavior) = OPTIONAL]; -} - - -// Configuration for a voice. -message VoiceConfig { - // The configuration for the speaker to use. - oneof voice_config { - // The configuration for a prebuilt voice. - PrebuiltVoiceConfig prebuilt_voice_config = 1; - - // Optional. The configuration for a replicated voice. This enables users to - // replicate a voice from an audio sample. - ReplicatedVoiceConfig replicated_voice_config = 3 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// Configuration for a single speaker in a multi-speaker setup. -message SpeakerVoiceConfig { - // Required. The name of the speaker. This should be the same as the speaker - // name used in the prompt. - string speaker = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The configuration for the voice of this speaker. - VoiceConfig voice_config = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration for a multi-speaker text-to-speech request. -message MultiSpeakerVoiceConfig { - // Required. A list of configurations for the voices of the speakers. Exactly - // two speaker voice configurations must be provided. - repeated SpeakerVoiceConfig speaker_voice_configs = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration for speech generation. -message SpeechConfig { - // The configuration for the voice to use. - VoiceConfig voice_config = 1; - - // Optional. The language code (ISO 639-1) for the speech synthesis. - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // The configuration for a multi-speaker text-to-speech request. - // This field is mutually exclusive with `voice_config`. - MultiSpeakerVoiceConfig multi_speaker_voice_config = 3; -} - -// Config for image generation features. -message ImageConfig { - // Optional. The desired aspect ratio for the generated images. The following - // aspect ratios are supported: - // - // "1:1" - // "2:3", "3:2" - // "3:4", "4:3" - // "4:5", "5:4" - // "9:16", "16:9" - // "21:9" - optional string aspect_ratio = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Generation config. -message GenerationConfig { - // The configuration for routing the request to a specific model. - message RoutingConfig { - // When automated routing is specified, the routing will be determined by - // the pretrained routing model and customer provided model routing - // preference. - message AutoRoutingMode { - // The model routing preference. - enum ModelRoutingPreference { - // Unspecified model routing preference. - UNKNOWN = 0; - - // Prefer higher quality over low cost. - PRIORITIZE_QUALITY = 1; - - // Balanced model routing preference. - BALANCED = 2; - - // Prefer lower cost over higher quality. - PRIORITIZE_COST = 3; - } - - // The model routing preference. - optional ModelRoutingPreference model_routing_preference = 1; - } - - // When manual routing is set, the specified model will be used directly. - message ManualRoutingMode { - // The model name to use. Only the public LLM models are accepted. e.g. - // 'gemini-1.5-pro-001'. - optional string model_name = 1; - } - - // Routing mode. - oneof routing_config { - // Automated routing. - AutoRoutingMode auto_mode = 1; - - // Manual routing. - ManualRoutingMode manual_mode = 2; - } - } - - // Config for thinking features. - message ThinkingConfig { - // Indicates whether to include thoughts in the response. - // If true, thoughts are returned only when available. - optional bool include_thoughts = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates the thinking budget in tokens. - // This is only applied when enable_thinking is true. - optional int32 thinking_budget = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Controls the randomness of predictions. - optional float temperature = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If specified, nucleus sampling will be used. - optional float top_p = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If specified, top-k sampling will be used. - optional float top_k = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Number of candidates to generate. - optional int32 candidate_count = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of output tokens to generate per message. - optional int32 max_output_tokens = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Stop sequences. - repeated string stop_sequences = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, export the logprobs results in response. - optional bool response_logprobs = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Logit probabilities. - optional int32 logprobs = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Positive penalties. - optional float presence_penalty = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Frequency penalties. - optional float frequency_penalty = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Seed. - optional int32 seed = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Output response mimetype of the generated candidate text. - // Supported mimetype: - // - `text/plain`: (default) Text output. - // - `application/json`: JSON response in the candidates. - // The model needs to be prompted to output the appropriate response type, - // otherwise the behavior is undefined. - // This is a preview feature. - string response_mime_type = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The `Schema` object allows the definition of input and output - // data types. These types can be objects, but also primitives and arrays. - // Represents a select subset of an [OpenAPI 3.0 schema - // object](https://spec.openapis.org/oas/v3.0.3#schema). - // If set, a compatible response_mime_type must also be set. - // Compatible mimetypes: - // `application/json`: Schema for JSON response. - optional Schema response_schema = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Output schema of the generated response. This is an alternative - // to `response_schema` that accepts [JSON Schema](https://json-schema.org/). - // - // If set, `response_schema` must be omitted, but `response_mime_type` is - // required. - // - // While the full JSON Schema may be sent, not all features are supported. - // Specifically, only the following properties are supported: - // - // - `$id` - // - `$defs` - // - `$ref` - // - `$anchor` - // - `type` - // - `format` - // - `title` - // - `description` - // - `enum` (for strings and numbers) - // - `items` - // - `prefixItems` - // - `minItems` - // - `maxItems` - // - `minimum` - // - `maximum` - // - `anyOf` - // - `oneOf` (interpreted the same as `anyOf`) - // - `properties` - // - `additionalProperties` - // - `required` - // - // The non-standard `propertyOrdering` property may also be set. - // - // Cyclic references are unrolled to a limited degree and, as such, may only - // be used within non-required properties. (Nullable properties are not - // sufficient.) If `$ref` is set on a sub-schema, no other properties, except - // for than those starting as a `$`, may be set. - optional google.protobuf.Value response_json_schema = 28 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Routing configuration. - optional RoutingConfig routing_config = 17 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The speech generation config. - optional SpeechConfig speech_config = 23 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config for thinking features. - // An error will be returned if this field is set for models that don't - // support thinking. - ThinkingConfig thinking_config = 25 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config for image generation features. - optional ImageConfig image_config = 30 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Safety settings. -message SafetySetting { - // Probability based thresholds levels for blocking. - enum HarmBlockThreshold { - // Unspecified harm block threshold. - HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; - - // Block low threshold and above (i.e. block more). - BLOCK_LOW_AND_ABOVE = 1; - - // Block medium threshold and above. - BLOCK_MEDIUM_AND_ABOVE = 2; - - // Block only high threshold (i.e. block less). - BLOCK_ONLY_HIGH = 3; - - // Block none. - BLOCK_NONE = 4; - - // Turn off the safety filter. - OFF = 5; - } - - // Probability vs severity. - enum HarmBlockMethod { - // The harm block method is unspecified. - HARM_BLOCK_METHOD_UNSPECIFIED = 0; - - // The harm block method uses both probability and severity scores. - SEVERITY = 1; - - // The harm block method uses the probability score. - PROBABILITY = 2; - } - - // Required. Harm category. - HarmCategory category = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The harm block threshold. - HarmBlockThreshold threshold = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specify if the threshold is used for probability or severity - // score. If not specified, the threshold is used for probability score. - HarmBlockMethod method = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Safety rating corresponding to the generated content. -message SafetyRating { - // Harm probability levels in the content. - enum HarmProbability { - // Harm probability unspecified. - HARM_PROBABILITY_UNSPECIFIED = 0; - - // Negligible level of harm. - NEGLIGIBLE = 1; - - // Low level of harm. - LOW = 2; - - // Medium level of harm. - MEDIUM = 3; - - // High level of harm. - HIGH = 4; - } - - // Harm severity levels. - enum HarmSeverity { - // Harm severity unspecified. - HARM_SEVERITY_UNSPECIFIED = 0; - - // Negligible level of harm severity. - HARM_SEVERITY_NEGLIGIBLE = 1; - - // Low level of harm severity. - HARM_SEVERITY_LOW = 2; - - // Medium level of harm severity. - HARM_SEVERITY_MEDIUM = 3; - - // High level of harm severity. - HARM_SEVERITY_HIGH = 4; - } - - // Output only. Harm category. - HarmCategory category = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Harm probability levels in the content. - HarmProbability probability = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Harm probability score. - float probability_score = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Harm severity levels in the content. - HarmSeverity severity = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Harm severity score. - float severity_score = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates whether the content was filtered out because of this - // rating. - bool blocked = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A collection of source attributions for a piece of content. -message CitationMetadata { - // Output only. List of citations. - repeated Citation citations = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Source attributions for content. -message Citation { - // Output only. Start index into the content. - int32 start_index = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. End index into the content. - int32 end_index = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Url reference of the attribution. - string uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Title of the attribution. - string title = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. License of the attribution. - string license = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Publication date of the attribution. - google.type.Date publication_date = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A response candidate generated from the model. -message Candidate { - // The reason why the model stopped generating tokens. - // If empty, the model has not stopped generating the tokens. - enum FinishReason { - // The finish reason is unspecified. - FINISH_REASON_UNSPECIFIED = 0; - - // Token generation reached a natural stopping point or a configured stop - // sequence. - STOP = 1; - - // Token generation reached the configured maximum output tokens. - MAX_TOKENS = 2; - - // Token generation stopped because the content potentially contains safety - // violations. NOTE: When streaming, - // [content][google.cloud.aiplatform.v1.Candidate.content] is empty if - // content filters blocks the output. - SAFETY = 3; - - // Token generation stopped because the content potentially contains - // copyright violations. - RECITATION = 4; - - // All other reasons that stopped the token generation. - OTHER = 5; - - // Token generation stopped because the content contains forbidden terms. - BLOCKLIST = 6; - - // Token generation stopped for potentially containing prohibited content. - PROHIBITED_CONTENT = 7; - - // Token generation stopped because the content potentially contains - // Sensitive Personally Identifiable Information (SPII). - SPII = 8; - - // The function call generated by the model is invalid. - MALFORMED_FUNCTION_CALL = 9; - - // The model response was blocked by Model Armor. - MODEL_ARMOR = 10; - } - - // Output only. Index of the candidate. - int32 index = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Content parts of the candidate. - Content content = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Confidence score of the candidate. - double score = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Average log probability score of the candidate. - double avg_logprobs = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Log-likelihood scores for the response tokens and top tokens - LogprobsResult logprobs_result = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reason why the model stopped generating tokens. - // If empty, the model has not stopped generating the tokens. - FinishReason finish_reason = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of ratings for the safety of a response candidate. - // - // There is at most one rating per category. - repeated SafetyRating safety_ratings = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Describes the reason the mode stopped generating tokens in - // more detail. This is only filled when `finish_reason` is set. - optional string finish_message = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Source attribution of the generated content. - CitationMetadata citation_metadata = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata specifies sources used to ground generated content. - GroundingMetadata grounding_metadata = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata related to url context retrieval tool. - UrlContextMetadata url_context_metadata = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata related to url context retrieval tool. -message UrlContextMetadata { - // Output only. List of url context. - repeated UrlMetadata url_metadata = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Context of the a single url retrieval. -message UrlMetadata { - // Status of the url retrieval. - enum UrlRetrievalStatus { - // Default value. This value is unused. - URL_RETRIEVAL_STATUS_UNSPECIFIED = 0; - - // Url retrieval is successful. - URL_RETRIEVAL_STATUS_SUCCESS = 1; - - // Url retrieval is failed due to error. - URL_RETRIEVAL_STATUS_ERROR = 2; - } - - // Retrieved url by the tool. - string retrieved_url = 1; - - // Status of the url retrieval. - UrlRetrievalStatus url_retrieval_status = 2; -} - -// Logprobs Result -message LogprobsResult { - // Candidate for the logprobs token and score. - message Candidate { - // The candidate’s token string value. - optional string token = 1; - - // The candidate’s token id value. - optional int32 token_id = 3; - - // The candidate's log probability. - optional float log_probability = 2; - } - - // Candidates with top log probabilities at each decoding step. - message TopCandidates { - // Sorted by log probability in descending order. - repeated Candidate candidates = 1; - } - - // Length = total number of decoding steps. - repeated TopCandidates top_candidates = 1; - - // Length = total number of decoding steps. - // The chosen candidates may or may not be in top_candidates. - repeated Candidate chosen_candidates = 2; -} - -// Segment of the content. -message Segment { - // Output only. The index of a Part object within its parent Content object. - int32 part_index = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Start index in the given Part, measured in bytes. Offset from - // the start of the Part, inclusive, starting at zero. - int32 start_index = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. End index in the given Part, measured in bytes. Offset from - // the start of the Part, exclusive, starting at zero. - int32 end_index = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The text corresponding to the segment from the response. - string text = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Grounding chunk. -message GroundingChunk { - // Chunk from the web. - message Web { - // URI reference of the chunk. - optional string uri = 1; - - // Title of the chunk. - optional string title = 2; - } - - // Chunk from context retrieved by the retrieval tools. - message RetrievedContext { - // Tool-specific details about the retrieved context. - oneof context_details { - // Additional context for the RAG retrieval result. This is only populated - // when using the RAG retrieval tool. - RagChunk rag_chunk = 4; - } - - // URI reference of the attribution. - optional string uri = 1; - - // Title of the attribution. - optional string title = 2; - - // Text of the attribution. - optional string text = 3; - - // Output only. The full document name for the referenced Vertex AI Search - // document. - optional string document_name = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Chunk from Google Maps. - message Maps { - message PlaceAnswerSources { - // Encapsulates a review snippet. - message ReviewSnippet { - // Id of the review referencing the place. - string review_id = 1; - - // A link to show the review on Google Maps. - string google_maps_uri = 2; - - // Title of the review. - string title = 3; - } - - // Snippets of reviews that are used to generate the answer. - repeated ReviewSnippet review_snippets = 1; - } - // URI reference of the chunk. - optional string uri = 1; - - // Title of the chunk. - optional string title = 2; - - // Text of the chunk. - optional string text = 3; - - // This Place's resource name, in `places/{place_id}` format. Can be used - // to look up the Place. - optional string place_id = 4; - - // Sources used to generate the place answer. - // This includes review snippets and photos that were used to generate the - // answer, as well as uris to flag content. - PlaceAnswerSources place_answer_sources = 5; - } - - // Chunk type. - oneof chunk_type { - // Grounding chunk from the web. - Web web = 1; - - // Grounding chunk from context retrieved by the retrieval tools. - RetrievedContext retrieved_context = 2; - - // Grounding chunk from Google Maps. - Maps maps = 3; - } -} - -// Grounding support. -message GroundingSupport { - // Segment of the content this support belongs to. - optional Segment segment = 1; - - // A list of indices (into 'grounding_chunk') specifying the - // citations associated with the claim. For instance [1,3,4] means - // that grounding_chunk[1], grounding_chunk[3], - // grounding_chunk[4] are the retrieved content attributed to the claim. - repeated int32 grounding_chunk_indices = 2; - - // Confidence score of the support references. Ranges from 0 to 1. 1 is the - // most confident. This list must have the same size as the - // grounding_chunk_indices. - repeated float confidence_scores = 3; -} - -// Metadata returned to client when grounding is enabled. -message GroundingMetadata { - // Optional. Web search queries for the following-up web search. - repeated string web_search_queries = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Google search entry for the following-up web searches. - optional SearchEntryPoint search_entry_point = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // List of supporting references retrieved from specified grounding source. - repeated GroundingChunk grounding_chunks = 5; - - // Optional. List of grounding support. - repeated GroundingSupport grounding_supports = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Output only. Retrieval metadata. - optional RetrievalMetadata retrieval_metadata = 7 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. Output only. Resource name of the Google Maps widget context - // token to be used with the PlacesContextElement widget to render contextual - // data. This is populated only for Google Maps grounding. - optional string google_maps_widget_context_token = 8 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Source content flagging uri for a place or review. This is currently - // populated only for Google Maps grounding. - message SourceFlaggingUri { - // Id of the place or review. - string source_id = 1; - - // A link where users can flag a problem with the source (place or review). - // (-- The link is generated by Google and it does not contain - // information from the user query. It may contain information of the - // content it is flagging, which can be used to identify places. --) - string flag_content_uri = 2; - } - - // List of source flagging uris. This is currently populated only for Google - // Maps grounding. - repeated SourceFlaggingUri source_flagging_uris = 9; -} - -// Google search entry point. -message SearchEntryPoint { - // Optional. Web content snippet that can be embedded in a web page or an app - // webview. - string rendered_content = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Base64 encoded JSON representing array of tuple. - bytes sdk_blob = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Metadata related to retrieval in the grounding flow. -message RetrievalMetadata { - // Optional. Score indicating how likely information from Google Search could - // help answer the prompt. The score is in the range `[0, 1]`, where 0 is the - // least likely and 1 is the most likely. This score is only populated when - // Google Search grounding and dynamic retrieval is enabled. It will be - // compared to the threshold to determine whether to trigger Google Search. - float google_search_dynamic_retrieval_score = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for Model Armor integrations of prompt and responses. -message ModelArmorConfig { - // Optional. The name of the Model Armor template to use for prompt - // sanitization. - string prompt_template_name = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "modelarmor.googleapis.com/Template" - } - ]; - - // Optional. The name of the Model Armor template to use for response - // sanitization. - string response_template_name = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "modelarmor.googleapis.com/Template" - } - ]; -} - -// Represents token counting info for a single modality. -message ModalityTokenCount { - // The modality associated with this token count. - Modality modality = 1; - - // Number of tokens. - int32 token_count = 2; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/deployment_stage.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/deployment_stage.proto deleted file mode 100644 index 32742d04a8f4..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/deployment_stage.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "DeploymentStageProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Stage field indicating the current progress of a deployment. -enum DeploymentStage { - // Default value. This value is unused. - DEPLOYMENT_STAGE_UNSPECIFIED = 0; - - // The deployment is initializing and setting up the environment. - STARTING_DEPLOYMENT = 5; - - // The deployment is preparing the model assets. - PREPARING_MODEL = 6; - - // The deployment is creating the underlying serving cluster. - CREATING_SERVING_CLUSTER = 7; - - // The deployment is adding nodes to the serving cluster. - ADDING_NODES_TO_CLUSTER = 8; - - // The deployment is getting the container image for the model server. - GETTING_CONTAINER_IMAGE = 9; - - // The deployment is starting the model server. - STARTING_MODEL_SERVER = 3; - - // The deployment is performing finalization steps. - FINISHING_UP = 4; - - // The deployment has terminated. - DEPLOYMENT_TERMINATED = 10; - - // The deployment has succeeded. - SUCCESSFULLY_DEPLOYED = 11; - - // The deployment has failed. - FAILED_TO_DEPLOY = 12; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto deleted file mode 100644 index 652acc81212e..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "EncryptionSpecProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Represents a customer-managed encryption key spec that can be applied to -// a top-level resource. -message EncryptionSpec { - // Required. The Cloud KMS resource identifier of the customer managed - // encryption key used to protect a resource. Has the form: - // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. - // The key needs to be in the same region as where the compute resource is - // created. - string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto deleted file mode 100644 index 3c2fd0b6fd50..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/encryption_spec.proto"; -import "google/cloud/vertexai/v1/explanation.proto"; -import "google/cloud/vertexai/v1/io.proto"; -import "google/cloud/vertexai/v1/machine_resources.proto"; -import "google/cloud/vertexai/v1/service_networking.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "EndpointProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Models are deployed into it, and afterwards Endpoint is called to obtain -// predictions and explanations. -message Endpoint { - option (google.api.resource) = { - type: "aiplatform.googleapis.com/Endpoint" - pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}" - pattern: "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}" - }; - - // Output only. The resource name of the Endpoint. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The display name of the Endpoint. - // The name can be up to 128 characters long and can consist of any UTF-8 - // characters. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // The description of the Endpoint. - string description = 3; - - // Output only. The models deployed in this Endpoint. - // To add or remove DeployedModels use - // [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] - // and - // [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] - // respectively. - repeated DeployedModel deployed_models = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A map from a DeployedModel's ID to the percentage of this Endpoint's - // traffic that should be forwarded to that DeployedModel. - // - // If a DeployedModel's ID is not listed in this map, then it receives no - // traffic. - // - // The traffic percentage values must add up to 100, or map must be empty if - // the Endpoint is to not accept any traffic at a moment. - map traffic_split = 5; - - // Used to perform consistent read-modify-write updates. If not set, a blind - // "overwrite" update happens. - string etag = 6; - - // The labels with user-defined metadata to organize your Endpoints. - // - // Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are allowed. - // - // See https://goo.gl/xmQnxf for more information and examples of labels. - map labels = 7; - - // Output only. Timestamp when this Endpoint was created. - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp when this Endpoint was last updated. - google.protobuf.Timestamp update_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Customer-managed encryption key spec for an Endpoint. If set, this - // Endpoint and all sub-resources of this Endpoint will be secured by - // this key. - EncryptionSpec encryption_spec = 10; - - // Optional. The full name of the Google Compute Engine - // [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) - // to which the Endpoint should be peered. - // - // Private services access must already be configured for the network. If left - // unspecified, the Endpoint is not peered with any network. - // - // Only one of the fields, - // [network][google.cloud.aiplatform.v1.Endpoint.network] or - // [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect], - // can be set. - // - // [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): - // `projects/{project}/global/networks/{network}`. - // Where `{project}` is a project number, as in `12345`, and `{network}` is - // network name. - string network = 13 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } - ]; - - // Deprecated: If true, expose the Endpoint via private service connect. - // - // Only one of the fields, - // [network][google.cloud.aiplatform.v1.Endpoint.network] or - // [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect], - // can be set. - bool enable_private_service_connect = 17 [deprecated = true]; - - // Optional. Configuration for private service connect. - // - // [network][google.cloud.aiplatform.v1.Endpoint.network] and - // [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] - // are mutually exclusive. - PrivateServiceConnectConfig private_service_connect_config = 21 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Resource name of the Model Monitoring job associated with this - // Endpoint if monitoring is enabled by - // [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]. - // Format: - // `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` - string model_deployment_monitoring_job = 14 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/ModelDeploymentMonitoringJob" - } - ]; - - // Configures the request-response logging for online prediction. - PredictRequestResponseLoggingConfig predict_request_response_logging_config = - 18; - - // If true, the endpoint will be exposed through a dedicated - // DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS - // will be isolated from other users' traffic and will have better performance - // and reliability. - // Note: Once you enabled dedicated endpoint, you won't be able to send - // request to the shared DNS {region}-aiplatform.googleapis.com. The - // limitation will be removed soon. - bool dedicated_endpoint_enabled = 24; - - // Output only. DNS of the dedicated endpoint. Will only be populated if - // dedicated_endpoint_enabled is true. Depending on the features enabled, uid - // might be a random number or a string. For example, if fast_tryout is - // enabled, uid will be fasttryout. Format: - // `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`. - string dedicated_endpoint_dns = 25 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configurations that are applied to the endpoint for online prediction. - ClientConnectionConfig client_connection_config = 23; - - // Output only. Reserved for future use. - bool satisfies_pzs = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is - // serving GenAI models, advanced features like native RAG integration can be - // configured. Currently, only Model Garden models are supported. - GenAiAdvancedFeaturesConfig gen_ai_advanced_features_config = 29 - [(google.api.field_behavior) = OPTIONAL]; - - // If true, the model server will be isolated from the external internet. - bool private_model_server_enabled = 30; -} - -// A deployment of a Model. Endpoints contain one or more DeployedModels. -message DeployedModel { - // Runtime status of the deployed model. - message Status { - // Output only. The latest deployed model's status message (if any). - string message = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which the status was last updated. - google.protobuf.Timestamp last_update_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of available replicas of the deployed model. - int32 available_replica_count = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The prediction (for example, the machine) resources that the DeployedModel - // uses. The user is billed for the resources (at least their minimal amount) - // even if the DeployedModel receives no traffic. - // Not all Models support all resources types. See - // [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]. - // Required except for Large Model Deploy use cases. - oneof prediction_resources { - // A description of resources that are dedicated to the DeployedModel, and - // that need a higher degree of manual configuration. - DedicatedResources dedicated_resources = 7; - - // A description of resources that to large degree are decided by Vertex - // AI, and require only a modest additional configuration. - AutomaticResources automatic_resources = 8; - - // The resource name of the shared DeploymentResourcePool to deploy on. - // Format: - // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` - string shared_resources = 17 [(google.api.resource_reference) = { - type: "aiplatform.googleapis.com/DeploymentResourcePool" - }]; - } - - // Immutable. The ID of the DeployedModel. If not provided upon deployment, - // Vertex AI will generate a value for this ID. - // - // This value should be 1-10 characters, and valid characters are `/[0-9]/`. - string id = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // The resource name of the Model that this is the deployment of. Note that - // the Model may be in a different location than the DeployedModel's Endpoint. - // - // The resource name may contain version id or version alias to specify the - // version. - // Example: `projects/{project}/locations/{location}/models/{model}@2` - // or - // `projects/{project}/locations/{location}/models/{model}@golden` - // if no version is specified, the default version will be deployed. - string model = 2 [(google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Model" - }]; - - // Output only. The version ID of the model that is deployed. - string model_version_id = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name of the DeployedModel. If not provided upon creation, - // the Model's display_name is used. - string display_name = 3; - - // Output only. Timestamp when the DeployedModel was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Explanation configuration for this DeployedModel. - // - // When deploying a Model using - // [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel], - // this value overrides the value of - // [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]. - // All fields of - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // are optional in the request. If a field of - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // is not populated, the value of the same field of - // [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] - // is inherited. If the corresponding - // [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] - // is not populated, all fields of the - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // will be used for the explanation configuration. - ExplanationSpec explanation_spec = 9; - - // If true, deploy the model without explainable feature, regardless the - // existence of - // [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] - // or - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. - bool disable_explanations = 19; - - // The service account that the DeployedModel's container runs as. Specify the - // email address of the service account. If this service account is not - // specified, the container runs as a service account that doesn't have access - // to the resource project. - // - // Users deploying the Model must have the `iam.serviceAccounts.actAs` - // permission on this service account. - string service_account = 11; - - // For custom-trained Models and AutoML Tabular Models, the container of the - // DeployedModel instances will send `stderr` and `stdout` streams to - // Cloud Logging by default. Please note that the logs incur cost, - // which are subject to [Cloud Logging - // pricing](https://cloud.google.com/logging/pricing). - // - // User can disable container logging by setting this flag to true. - bool disable_container_logging = 15; - - // If true, online prediction access logs are sent to Cloud - // Logging. - // These logs are like standard server access logs, containing - // information like timestamp and latency for each prediction request. - // - // Note that logs may incur a cost, especially if your project - // receives prediction requests at a high queries per second rate (QPS). - // Estimate your costs before enabling this option. - bool enable_access_logging = 13; - - // Output only. Provide paths for users to send predict/explain/health - // requests directly to the deployed model services running on Cloud via - // private services access. This field is populated if - // [network][google.cloud.aiplatform.v1.Endpoint.network] is configured. - PrivateEndpoints private_endpoints = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration for faster model deployment. - FasterDeploymentConfig faster_deployment_config = 23; - - // Output only. Runtime status of the deployed model. - Status status = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // System labels to apply to Model Garden deployments. - // System labels are managed by Google for internal use only. - map system_labels = 28; - - // The checkpoint id of the model. - string checkpoint_id = 29; - - // Optional. Spec for configuring speculative decoding. - SpeculativeDecodingSpec speculative_decoding_spec = 30 - [(google.api.field_behavior) = OPTIONAL]; -} - -// PrivateEndpoints proto is used to provide paths for users to send -// requests privately. -// To send request via private service access, use predict_http_uri, -// explain_http_uri or health_http_uri. To send request via private service -// connect, use service_attachment. -message PrivateEndpoints { - // Output only. Http(s) path to send prediction requests. - string predict_http_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Http(s) path to send explain requests. - string explain_http_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Http(s) path to send health check requests. - string health_http_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the service attachment resource. Populated if - // private service connect is enabled. - string service_attachment = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration for logging request-response to a BigQuery table. -message PredictRequestResponseLoggingConfig { - // If logging is enabled or not. - bool enabled = 1; - - // Percentage of requests to be logged, expressed as a fraction in - // range(0,1]. - double sampling_rate = 2; - - // BigQuery table for logging. - // If only given a project, a new dataset will be created with name - // `logging__` where - // will be made BigQuery-dataset-name compatible (e.g. - // most special characters will become underscores). If no table name is - // given, a new table will be created with name `request_response_logging` - BigQueryDestination bigquery_destination = 3; -} - -// Configurations (e.g. inference timeout) that are applied on your endpoints. -message ClientConnectionConfig { - // Customizable online prediction request timeout. - google.protobuf.Duration inference_timeout = 1; -} - -// Configuration for faster model deployment. -message FasterDeploymentConfig { - // If true, enable fast tryout feature for this deployed model. - bool fast_tryout_enabled = 2; -} - -// Configuration for GenAiAdvancedFeatures. -message GenAiAdvancedFeaturesConfig { - // Configuration for Retrieval Augmented Generation feature. - message RagConfig { - // If true, enable Retrieval Augmented Generation in ChatCompletion request. - // Once enabled, the endpoint will be identified as GenAI endpoint and - // Arthedain router will be used. - bool enable_rag = 1; - } - - // Configuration for Retrieval Augmented Generation feature. - RagConfig rag_config = 1; -} - -// Configuration for Speculative Decoding. -message SpeculativeDecodingSpec { - // Draft model speculation works by using the smaller model to generate - // candidate tokens for speculative decoding. - message DraftModelSpeculation { - // Required. The resource name of the draft model. - string draft_model = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Model" - } - ]; - } - - // N-Gram speculation works by trying to find matching tokens in the - // previous prompt sequence and use those as speculation for generating - // new tokens. - message NgramSpeculation { - // The number of last N input tokens used as ngram to search/match - // against the previous prompt sequence. - // This is equal to the N in N-Gram. - // The default value is 3 if not specified. - int32 ngram_size = 1; - } - - // The type of speculation method to use. - oneof speculation { - // draft model speculation. - DraftModelSpeculation draft_model_speculation = 2; - - // N-Gram speculation. - NgramSpeculation ngram_speculation = 3; - } - - // The number of speculative tokens to generate at each step. - int32 speculative_token_count = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto deleted file mode 100644 index c33c12ff9154..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto +++ /dev/null @@ -1,471 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/deployment_stage.proto"; -import "google/cloud/vertexai/v1/endpoint.proto"; -import "google/cloud/vertexai/v1/operation.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "EndpointServiceProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// A service for managing Vertex AI's Endpoints. -service EndpointService { - option (google.api.default_host) = "aiplatform.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates an Endpoint. - rpc CreateEndpoint(CreateEndpointRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/endpoints" - body: "endpoint" - }; - option (google.api.method_signature) = "parent,endpoint"; - option (google.api.method_signature) = "parent,endpoint,endpoint_id"; - option (google.longrunning.operation_info) = { - response_type: "Endpoint" - metadata_type: "CreateEndpointOperationMetadata" - }; - } - - // Gets an Endpoint. - rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/endpoints/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Endpoints in a Location. - rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/endpoints" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates an Endpoint. - rpc UpdateEndpoint(UpdateEndpointRequest) returns (Endpoint) { - option (google.api.http) = { - patch: "/v1/{endpoint.name=projects/*/locations/*/endpoints/*}" - body: "endpoint" - }; - option (google.api.method_signature) = "endpoint,update_mask"; - } - - // Updates an Endpoint with a long running operation. - rpc UpdateEndpointLongRunning(UpdateEndpointLongRunningRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update" - body: "*" - }; - option (google.api.method_signature) = "endpoint"; - option (google.longrunning.operation_info) = { - response_type: "Endpoint" - metadata_type: "UpdateEndpointOperationMetadata" - }; - } - - // Deletes an Endpoint. - rpc DeleteEndpoint(DeleteEndpointRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/endpoints/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "DeleteOperationMetadata" - }; - } - - // Deploys a Model into this Endpoint, creating a DeployedModel within it. - rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel" - body: "*" - }; - option (google.api.method_signature) = - "endpoint,deployed_model,traffic_split"; - option (google.longrunning.operation_info) = { - response_type: "DeployModelResponse" - metadata_type: "DeployModelOperationMetadata" - }; - } - - // Undeploys a Model from an Endpoint, removing a DeployedModel from it, and - // freeing all resources it's using. - rpc UndeployModel(UndeployModelRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel" - body: "*" - }; - option (google.api.method_signature) = - "endpoint,deployed_model_id,traffic_split"; - option (google.longrunning.operation_info) = { - response_type: "UndeployModelResponse" - metadata_type: "UndeployModelOperationMetadata" - }; - } - - // Updates an existing deployed model. Updatable fields include - // `min_replica_count`, `max_replica_count`, `required_replica_count`, - // `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and - // `enable_container_logging` (v1beta1 only). - rpc MutateDeployedModel(MutateDeployedModelRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel" - body: "*" - }; - option (google.api.method_signature) = - "endpoint,deployed_model,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "MutateDeployedModelResponse" - metadata_type: "MutateDeployedModelOperationMetadata" - }; - } -} - -// Request message for -// [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. -message CreateEndpointRequest { - // Required. The resource name of the Location to create the Endpoint in. - // Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The Endpoint to create. - Endpoint endpoint = 2 [(google.api.field_behavior) = REQUIRED]; - - // Immutable. The ID to use for endpoint, which will become the final - // component of the endpoint resource name. - // If not provided, Vertex AI will generate a value for this ID. - // - // If the first character is a letter, this value may be up to 63 characters, - // and valid characters are `[a-z0-9-]`. The last character must be a letter - // or number. - // - // If the first character is a number, this value may be up to 9 characters, - // and valid characters are `[0-9]` with no leading zeros. - // - // When using HTTP/JSON, this field is populated - // based on a query string argument, such as `?endpoint_id=12345`. This is the - // fallback for fields that are not included in either the URI or the body. - string endpoint_id = 4 [(google.api.field_behavior) = IMMUTABLE]; -} - -// Runtime operation information for -// [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. -message CreateEndpointOperationMetadata { - // The operation generic information. - GenericOperationMetadata generic_metadata = 1; - - // Output only. The deployment stage of the model. Only populated if this - // CreateEndpoint request deploys a model at the same time. - DeploymentStage deployment_stage = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint] -message GetEndpointRequest { - // Required. The name of the Endpoint resource. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; -} - -// Request message for -// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. -message ListEndpointsRequest { - // Required. The resource name of the Location from which to list the - // Endpoints. Format: `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. An expression for filtering the results of the request. For field - // names both snake_case and camelCase are supported. - // - // * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - // ID, i.e. the last segment of the Endpoint's - // [resource name][google.cloud.aiplatform.v1.Endpoint.name]. - // * `display_name` supports `=` and `!=`. - // * `labels` supports general map functions that is: - // * `labels.key=value` - key:value equality - // * `labels.key:*` or `labels:key` - key existence - // * A key including a space must be quoted. `labels."a key"`. - // * `base_model_name` only supports `=`. - // - // Some examples: - // - // * `endpoint=1` - // * `displayName="myDisplayName"` - // * `labels.myKey="myValue"` - // * `baseModelName="text-bison"` - string filter = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The standard list page size. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The standard list page token. - // Typically obtained via - // [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] - // of the previous - // [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] - // call. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Mask specifying which fields to read. - google.protobuf.FieldMask read_mask = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // A comma-separated list of fields to order by, sorted in ascending order. - // Use "desc" after a field name for descending. - // Supported fields: - // - // * `display_name` - // * `create_time` - // * `update_time` - // - // Example: `display_name, create_time desc`. - string order_by = 6; -} - -// Response message for -// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. -message ListEndpointsResponse { - // List of Endpoints in the requested page. - repeated Endpoint endpoints = 1; - - // A token to retrieve the next page of results. - // Pass to - // [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] - // to obtain that page. - string next_page_token = 2; -} - -// Request message for -// [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. -message UpdateEndpointRequest { - // Required. The Endpoint which replaces the resource on the server. - Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The update mask applies to the resource. See - // [google.protobuf.FieldMask][google.protobuf.FieldMask]. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning]. -message UpdateEndpointLongRunningRequest { - // Required. The Endpoint which replaces the resource on the server. Currently - // we only support updating the `client_connection_config` field, all the - // other fields' update will be blocked. - Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Runtime operation information for -// [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning]. -message UpdateEndpointOperationMetadata { - // The operation generic information. - GenericOperationMetadata generic_metadata = 1; -} - -// Request message for -// [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint]. -message DeleteEndpointRequest { - // Required. The name of the Endpoint resource to be deleted. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; -} - -// Request message for -// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. -message DeployModelRequest { - // Required. The name of the Endpoint resource into which to deploy a Model. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Required. The DeployedModel to be created within the Endpoint. Note that - // [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] - // must be updated for the DeployedModel to start receiving traffic, either as - // part of this call, or via - // [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. - DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED]; - - // A map from a DeployedModel's ID to the percentage of this Endpoint's - // traffic that should be forwarded to that DeployedModel. - // - // If this field is non-empty, then the Endpoint's - // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be - // overwritten with it. To refer to the ID of the just being deployed Model, a - // "0" should be used, and the actual ID of the new DeployedModel will be - // filled in its place by this method. The traffic percentage values must add - // up to 100. - // - // If this field is empty, then the Endpoint's - // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not - // updated. - map traffic_split = 3; -} - -// Response message for -// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. -message DeployModelResponse { - // The DeployedModel that had been deployed in the Endpoint. - DeployedModel deployed_model = 1; -} - -// Runtime operation information for -// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. -message DeployModelOperationMetadata { - // The operation generic information. - GenericOperationMetadata generic_metadata = 1; - - // Output only. The deployment stage of the model. - DeploymentStage deployment_stage = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. -message UndeployModelRequest { - // Required. The name of the Endpoint resource from which to undeploy a Model. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Required. The ID of the DeployedModel to be undeployed from the Endpoint. - string deployed_model_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // If this field is provided, then the Endpoint's - // [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be - // overwritten with it. If last DeployedModel is being undeployed from the - // Endpoint, the [Endpoint.traffic_split] will always end up empty when this - // call returns. A DeployedModel will be successfully undeployed only if it - // doesn't have any traffic assigned to it when this method executes, or if - // this field unassigns any traffic to it. - map traffic_split = 3; -} - -// Response message for -// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. -message UndeployModelResponse {} - -// Runtime operation information for -// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. -message UndeployModelOperationMetadata { - // The operation generic information. - GenericOperationMetadata generic_metadata = 1; -} - -// Request message for -// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. -message MutateDeployedModelRequest { - // Required. The name of the Endpoint resource into which to mutate a - // DeployedModel. Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Required. The DeployedModel to be mutated within the Endpoint. Only the - // following fields can be mutated: - // - // * `min_replica_count` in either - // [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - // [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - // * `max_replica_count` in either - // [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or - // [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] - // * `required_replica_count` in - // [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] - // * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs] - // * `disable_container_logging` (v1 only) - // * `enable_container_logging` (v1beta1 only) - DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The update mask applies to the resource. See - // [google.protobuf.FieldMask][google.protobuf.FieldMask]. - google.protobuf.FieldMask update_mask = 4 - [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. -message MutateDeployedModelResponse { - // The DeployedModel that's being mutated. - DeployedModel deployed_model = 1; -} - -// Runtime operation information for -// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. -message MutateDeployedModelOperationMetadata { - // The operation generic information. - GenericOperationMetadata generic_metadata = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto deleted file mode 100644 index 7c0c9d661013..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto +++ /dev/null @@ -1,594 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/vertexai/v1/explanation_metadata.proto"; -import "google/cloud/vertexai/v1/io.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ExplanationProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Explanation of a prediction (provided in -// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]) -// produced by the Model on a given -// [instance][google.cloud.aiplatform.v1.ExplainRequest.instances]. -message Explanation { - // Output only. Feature attributions grouped by predicted outputs. - // - // For Models that predict only one output, such as regression Models that - // predict only one score, there is only one attibution that explains the - // predicted output. For Models that predict multiple outputs, such as - // multiclass Models that predict multiple classes, each element explains one - // specific item. - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // can be used to identify which output this attribution is explaining. - // - // By default, we provide Shapley values for the predicted class. However, - // you can configure the explanation request to generate Shapley values for - // any other classes too. For example, if a model predicts a probability of - // `0.4` for approving a loan application, the model's decision is to reject - // the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default - // Shapley values would be computed for rejection decision and not approval, - // even though the latter might be the positive class. - // - // If users set - // [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], - // the attributions are sorted by - // [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value] - // in descending order. If - // [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices] - // is specified, the attributions are stored by - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // in the same order as they appear in the output_indices. - repeated Attribution attributions = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of the nearest neighbors for example-based explanations. - // - // For models deployed with the examples explanations feature enabled, the - // attributions field is empty and instead the neighbors field is populated. - repeated Neighbor neighbors = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Aggregated explanation metrics for a Model over a set of instances. -message ModelExplanation { - // Output only. Aggregated attributions explaining the Model's prediction - // outputs over the set of instances. The attributions are grouped by outputs. - // - // For Models that predict only one output, such as regression Models that - // predict only one score, there is only one attibution that explains the - // predicted output. For Models that predict multiple outputs, such as - // multiclass Models that predict multiple classes, each element explains one - // specific item. - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // can be used to identify which output this attribution is explaining. - // - // The - // [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value], - // [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value] - // and - // [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] - // fields are averaged over the test data. - // - // NOTE: Currently AutoML tabular classification Models produce only one - // attribution, which averages attributions over all the classes it predicts. - // [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error] - // is not populated. - repeated Attribution mean_attributions = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Attribution that explains a particular prediction output. -message Attribution { - // Output only. Model predicted output if the input instance is constructed - // from the baselines of all the features defined in - // [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. - // The field name of the output is determined by the key in - // [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. - // - // If the Model's predicted output has multiple dimensions (rank > 1), this is - // the value in the output located by - // [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. - // - // If there are multiple baselines, their output values are averaged. - double baseline_output_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Model predicted output on the corresponding [explanation - // instance][ExplainRequest.instances]. The field name of the output is - // determined by the key in - // [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. - // - // If the Model predicted output has multiple dimensions, this is the value in - // the output located by - // [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. - double instance_output_value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Attributions of each explained feature. Features are extracted - // from the [prediction - // instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according - // to [explanation metadata for - // inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. - // - // The value is a struct, whose keys are the name of the feature. The values - // are how much the feature in the - // [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed - // to the predicted result. - // - // The format of the value is determined by the feature's input format: - // - // * If the feature is a scalar value, the attribution value is a - // [floating number][google.protobuf.Value.number_value]. - // - // * If the feature is an array of scalar values, the attribution value is - // an [array][google.protobuf.Value.list_value]. - // - // * If the feature is a struct, the attribution value is a - // [struct][google.protobuf.Value.struct_value]. The keys in the - // attribution value struct are the same as the keys in the feature - // struct. The formats of the values in the attribution struct are - // determined by the formats of the values in the feature struct. - // - // The - // [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri] - // field, pointed to by the - // [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the - // [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] - // object, points to the schema file that describes the features and their - // attribution values (if it is populated). - google.protobuf.Value feature_attributions = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The index that locates the explained prediction output. - // - // If the prediction output is a scalar value, output_index is not populated. - // If the prediction output has multiple dimensions, the length of the - // output_index list is the same as the number of dimensions of the output. - // The i-th element in output_index is the element index of the i-th dimension - // of the output vector. Indices start from 0. - repeated int32 output_index = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The display name of the output identified by - // [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For - // example, the predicted class name by a multi-classification Model. - // - // This field is only populated iff the Model predicts display names as a - // separate field along with the explained output. The predicted display name - // must has the same shape of the explained output, and can be located using - // output_index. - string output_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error of - // [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] - // caused by approximation used in the explanation method. Lower value means - // more precise attributions. - // - // * For Sampled Shapley - // [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution], - // increasing - // [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count] - // might reduce the error. - // * For Integrated Gradients - // [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution], - // increasing - // [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count] - // might reduce the error. - // * For [XRAI - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution], - // increasing - // [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might - // reduce the error. - // - // See [this introduction](/vertex-ai/docs/explainable-ai/overview) - // for more information. - double approximation_error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the explain output. Specified as the key in - // [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. - string output_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Neighbors for example-based explanations. -message Neighbor { - // Output only. The neighbor id. - string neighbor_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The neighbor distance. - double neighbor_distance = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specification of Model explanation. -message ExplanationSpec { - // Required. Parameters that configure explaining of the Model's predictions. - ExplanationParameters parameters = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Metadata describing the Model's input and output for explanation. - ExplanationMetadata metadata = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Parameters to configure explaining for Model's predictions. -message ExplanationParameters { - oneof method { - // An attribution method that approximates Shapley values for features that - // contribute to the label being predicted. A sampling strategy is used to - // approximate the value rather than considering all subsets of features. - // Refer to this paper for model details: https://arxiv.org/abs/1306.4265. - SampledShapleyAttribution sampled_shapley_attribution = 1; - - // An attribution method that computes Aumann-Shapley values taking - // advantage of the model's fully differentiable structure. Refer to this - // paper for more details: https://arxiv.org/abs/1703.01365 - IntegratedGradientsAttribution integrated_gradients_attribution = 2; - - // An attribution method that redistributes Integrated Gradients - // attribution to segmented regions, taking advantage of the model's fully - // differentiable structure. Refer to this paper for - // more details: https://arxiv.org/abs/1906.02825 - // - // XRAI currently performs better on natural images, like a picture of a - // house or an animal. If the images are taken in artificial environments, - // like a lab or manufacturing line, or from diagnostic equipment, like - // x-rays or quality-control cameras, use Integrated Gradients instead. - XraiAttribution xrai_attribution = 3; - - // Example-based explanations that returns the nearest neighbors from the - // provided dataset. - Examples examples = 7; - } - - // If populated, returns attributions for top K indices of outputs - // (defaults to 1). Only applies to Models that predicts more than one outputs - // (e,g, multi-class Models). When set to -1, returns explanations for all - // outputs. - int32 top_k = 4; - - // If populated, only returns attributions that have - // [output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // contained in output_indices. It must be an ndarray of integers, with the - // same shape of the output it's explaining. - // - // If not populated, returns attributions for - // [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of - // outputs. If neither top_k nor output_indices is populated, returns the - // argmax index of the outputs. - // - // Only applicable to Models that predict multiple outputs (e,g, multi-class - // Models that predict multiple classes). - google.protobuf.ListValue output_indices = 5; -} - -// An attribution method that approximates Shapley values for features that -// contribute to the label being predicted. A sampling strategy is used to -// approximate the value rather than considering all subsets of features. -message SampledShapleyAttribution { - // Required. The number of feature permutations to consider when approximating - // the Shapley values. - // - // Valid range of its value is [1, 50], inclusively. - int32 path_count = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// An attribution method that computes the Aumann-Shapley value taking advantage -// of the model's fully differentiable structure. Refer to this paper for -// more details: https://arxiv.org/abs/1703.01365 -message IntegratedGradientsAttribution { - // Required. The number of steps for approximating the path integral. - // A good value to start is 50 and gradually increase until the - // sum to diff property is within the desired error range. - // - // Valid range of its value is [1, 100], inclusively. - int32 step_count = 1 [(google.api.field_behavior) = REQUIRED]; - - // Config for SmoothGrad approximation of gradients. - // - // When enabled, the gradients are approximated by averaging the gradients - // from noisy samples in the vicinity of the inputs. Adding - // noise can help improve the computed gradients. Refer to this paper for more - // details: https://arxiv.org/pdf/1706.03825.pdf - SmoothGradConfig smooth_grad_config = 2; - - // Config for IG with blur baseline. - // - // When enabled, a linear path from the maximally blurred image to the input - // image is created. Using a blurred baseline instead of zero (black image) is - // motivated by the BlurIG approach explained here: - // https://arxiv.org/abs/2004.03383 - BlurBaselineConfig blur_baseline_config = 3; -} - -// An explanation method that redistributes Integrated Gradients -// attributions to segmented regions, taking advantage of the model's fully -// differentiable structure. Refer to this paper for more details: -// https://arxiv.org/abs/1906.02825 -// -// Supported only by image Models. -message XraiAttribution { - // Required. The number of steps for approximating the path integral. - // A good value to start is 50 and gradually increase until the - // sum to diff property is met within the desired error range. - // - // Valid range of its value is [1, 100], inclusively. - int32 step_count = 1 [(google.api.field_behavior) = REQUIRED]; - - // Config for SmoothGrad approximation of gradients. - // - // When enabled, the gradients are approximated by averaging the gradients - // from noisy samples in the vicinity of the inputs. Adding - // noise can help improve the computed gradients. Refer to this paper for more - // details: https://arxiv.org/pdf/1706.03825.pdf - SmoothGradConfig smooth_grad_config = 2; - - // Config for XRAI with blur baseline. - // - // When enabled, a linear path from the maximally blurred image to the input - // image is created. Using a blurred baseline instead of zero (black image) is - // motivated by the BlurIG approach explained here: - // https://arxiv.org/abs/2004.03383 - BlurBaselineConfig blur_baseline_config = 3; -} - -// Config for SmoothGrad approximation of gradients. -// -// When enabled, the gradients are approximated by averaging the gradients from -// noisy samples in the vicinity of the inputs. Adding noise can help improve -// the computed gradients. Refer to this paper for more details: -// https://arxiv.org/pdf/1706.03825.pdf -message SmoothGradConfig { - // Represents the standard deviation of the gaussian kernel - // that will be used to add noise to the interpolated inputs - // prior to computing gradients. - oneof GradientNoiseSigma { - // This is a single float value and will be used to add noise to all the - // features. Use this field when all features are normalized to have the - // same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where - // features are normalized to have 0-mean and 1-variance. Learn more about - // [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization). - // - // For best results the recommended value is about 10% - 20% of the standard - // deviation of the input feature. Refer to section 3.2 of the SmoothGrad - // paper: https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. - // - // If the distribution is different per feature, set - // [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma] - // instead for each feature. - float noise_sigma = 1; - - // This is similar to - // [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], - // but provides additional flexibility. A separate noise sigma can be - // provided for each feature, which is useful if their distributions are - // different. No noise is added to features that are not set. If this field - // is unset, - // [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma] - // will be used for all features. - FeatureNoiseSigma feature_noise_sigma = 2; - } - - // The number of gradient samples to use for - // approximation. The higher this number, the more accurate the gradient - // is, but the runtime complexity increases by this factor as well. - // Valid range of its value is [1, 50]. Defaults to 3. - int32 noisy_sample_count = 3; -} - -// Noise sigma by features. Noise sigma represents the standard deviation of the -// gaussian kernel that will be used to add noise to interpolated inputs prior -// to computing gradients. -message FeatureNoiseSigma { - // Noise sigma for a single feature. - message NoiseSigmaForFeature { - // The name of the input feature for which noise sigma is provided. The - // features are defined in - // [explanation metadata - // inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. - string name = 1; - - // This represents the standard deviation of the Gaussian kernel that will - // be used to add noise to the feature prior to computing gradients. Similar - // to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma] - // but represents the noise added to the current feature. Defaults to 0.1. - float sigma = 2; - } - - // Noise sigma per feature. No noise is added to features that are not set. - repeated NoiseSigmaForFeature noise_sigma = 1; -} - -// Config for blur baseline. -// -// When enabled, a linear path from the maximally blurred image to the input -// image is created. Using a blurred baseline instead of zero (black image) is -// motivated by the BlurIG approach explained here: -// https://arxiv.org/abs/2004.03383 -message BlurBaselineConfig { - // The standard deviation of the blur kernel for the blurred baseline. The - // same blurring parameter is used for both the height and the width - // dimension. If not set, the method defaults to the zero (i.e. black for - // images) baseline. - float max_blur_sigma = 1; -} - -// Example-based explainability that returns the nearest neighbors from the -// provided dataset. -message Examples { - // The Cloud Storage input instances. - message ExampleGcsSource { - // The format of the input example instances. - enum DataFormat { - // Format unspecified, used when unset. - DATA_FORMAT_UNSPECIFIED = 0; - - // Examples are stored in JSONL files. - JSONL = 1; - } - - // The format in which instances are given, if not specified, assume it's - // JSONL format. Currently only JSONL format is supported. - DataFormat data_format = 1; - - // The Cloud Storage location for the input instances. - GcsSource gcs_source = 2; - } - - oneof source { - // The Cloud Storage input instances. - ExampleGcsSource example_gcs_source = 5; - } - - oneof config { - // The full configuration for the generated index, the semantics are the - // same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should - // match - // [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). - google.protobuf.Value nearest_neighbor_search_config = 2; - - // Simplified preset configuration, which automatically sets configuration - // values based on the desired query speed-precision trade-off and modality. - Presets presets = 4; - } - - // The number of neighbors to return when querying for examples. - int32 neighbor_count = 3; -} - -// Preset configuration for example-based explanations -message Presets { - // Preset option controlling parameters for query speed-precision trade-off - enum Query { - // More precise neighbors as a trade-off against slower response. - PRECISE = 0; - - // Faster response as a trade-off against less precise neighbors. - FAST = 1; - } - - // Preset option controlling parameters for different modalities - enum Modality { - // Should not be set. Added as a recommended best practice for enums - MODALITY_UNSPECIFIED = 0; - - // IMAGE modality - IMAGE = 1; - - // TEXT modality - TEXT = 2; - - // TABULAR modality - TABULAR = 3; - } - - // Preset option controlling parameters for speed-precision trade-off when - // querying for examples. If omitted, defaults to `PRECISE`. - optional Query query = 1; - - // The modality of the uploaded model, which automatically configures the - // distance measurement and feature normalization for the underlying example - // index and queries. If your model does not precisely fit one of these types, - // it is okay to choose the closest type. - Modality modality = 2; -} - -// The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries -// that can be overridden at [online -// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time. -message ExplanationSpecOverride { - // The parameters to be overridden. Note that the - // attribution method cannot be changed. If not specified, - // no parameter is overridden. - ExplanationParameters parameters = 1; - - // The metadata to be overridden. If not specified, no metadata is overridden. - ExplanationMetadataOverride metadata = 2; - - // The example-based explanations parameter overrides. - ExamplesOverride examples_override = 3; -} - -// The [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata] -// entries that can be overridden at [online -// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time. -message ExplanationMetadataOverride { - // The [input - // metadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata] - // entries to be overridden. - message InputMetadataOverride { - // Baseline inputs for this feature. - // - // This overrides the `input_baseline` field of the - // [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata] - // object of the corresponding feature's input metadata. If it's not - // specified, the original baselines are not overridden. - repeated google.protobuf.Value input_baselines = 1; - } - - // Required. Overrides the [input - // metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the - // features. The key is the name of the feature to be overridden. The keys - // specified here must exist in the input metadata to be overridden. If a - // feature is not specified here, the corresponding feature's input metadata - // is not overridden. - map inputs = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// Overrides for example-based explanations. -message ExamplesOverride { - // Data format enum. - enum DataFormat { - // Unspecified format. Must not be used. - DATA_FORMAT_UNSPECIFIED = 0; - - // Provided data is a set of model inputs. - INSTANCES = 1; - - // Provided data is a set of embeddings. - EMBEDDINGS = 2; - } - - // The number of neighbors to return. - int32 neighbor_count = 1; - - // The number of neighbors to return that have the same crowding tag. - int32 crowding_count = 2; - - // Restrict the resulting nearest neighbors to respect these constraints. - repeated ExamplesRestrictionsNamespace restrictions = 3; - - // If true, return the embeddings instead of neighbors. - bool return_embeddings = 4; - - // The format of the data being provided with each call. - DataFormat data_format = 5; -} - -// Restrictions namespace for example-based explanations overrides. -message ExamplesRestrictionsNamespace { - // The namespace name. - string namespace_name = 1; - - // The list of allowed tags. - repeated string allow = 2; - - // The list of deny tags. - repeated string deny = 3; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto deleted file mode 100644 index c0078d589eea..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ExplanationMetadataProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Metadata describing the Model's input and output for explanation. -message ExplanationMetadata { - // Metadata of the input of a feature. - // - // Fields other than - // [InputMetadata.input_baselines][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines] - // are applicable only for Models that are using Vertex AI-provided images for - // Tensorflow. - message InputMetadata { - // Domain details of the input feature value. Provides numeric information - // about the feature, such as its range (min, max). If the feature has been - // pre-processed, for example with z-scoring, then it provides information - // about how to recover the original feature. For example, if the input - // feature is an image and it has been pre-processed to obtain 0-mean and - // stddev = 1 values, then original_mean, and original_stddev refer to the - // mean and stddev of the original feature (e.g. image tensor) from which - // input feature (with mean = 0 and stddev = 1) was obtained. - message FeatureValueDomain { - // The minimum permissible value for this feature. - float min_value = 1; - - // The maximum permissible value for this feature. - float max_value = 2; - - // If this input feature has been normalized to a mean value of 0, - // the original_mean specifies the mean value of the domain prior to - // normalization. - float original_mean = 3; - - // If this input feature has been normalized to a standard deviation of - // 1.0, the original_stddev specifies the standard deviation of the domain - // prior to normalization. - float original_stddev = 4; - } - - // Visualization configurations for image explanation. - message Visualization { - // Type of the image visualization. Only applicable to - // [Integrated Gradients - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]. - enum Type { - // Should not be used. - TYPE_UNSPECIFIED = 0; - - // Shows which pixel contributed to the image prediction. - PIXELS = 1; - - // Shows which region contributed to the image prediction by outlining - // the region. - OUTLINES = 2; - } - - // Whether to only highlight pixels with positive contributions, negative - // or both. Defaults to POSITIVE. - enum Polarity { - // Default value. This is the same as POSITIVE. - POLARITY_UNSPECIFIED = 0; - - // Highlights the pixels/outlines that were most influential to the - // model's prediction. - POSITIVE = 1; - - // Setting polarity to negative highlights areas that does not lead to - // the models's current prediction. - NEGATIVE = 2; - - // Shows both positive and negative attributions. - BOTH = 3; - } - - // The color scheme used for highlighting areas. - enum ColorMap { - // Should not be used. - COLOR_MAP_UNSPECIFIED = 0; - - // Positive: green. Negative: pink. - PINK_GREEN = 1; - - // Viridis color map: A perceptually uniform color mapping which is - // easier to see by those with colorblindness and progresses from yellow - // to green to blue. Positive: yellow. Negative: blue. - VIRIDIS = 2; - - // Positive: red. Negative: red. - RED = 3; - - // Positive: green. Negative: green. - GREEN = 4; - - // Positive: green. Negative: red. - RED_GREEN = 6; - - // PiYG palette. - PINK_WHITE_GREEN = 5; - } - - // How the original image is displayed in the visualization. - enum OverlayType { - // Default value. This is the same as NONE. - OVERLAY_TYPE_UNSPECIFIED = 0; - - // No overlay. - NONE = 1; - - // The attributions are shown on top of the original image. - ORIGINAL = 2; - - // The attributions are shown on top of grayscaled version of the - // original image. - GRAYSCALE = 3; - - // The attributions are used as a mask to reveal predictive parts of - // the image and hide the un-predictive parts. - MASK_BLACK = 4; - } - - // Type of the image visualization. Only applicable to - // [Integrated Gradients - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]. - // OUTLINES shows regions of attribution, while PIXELS shows per-pixel - // attribution. Defaults to OUTLINES. - Type type = 1; - - // Whether to only highlight pixels with positive contributions, negative - // or both. Defaults to POSITIVE. - Polarity polarity = 2; - - // The color scheme used for the highlighted areas. - // - // Defaults to PINK_GREEN for - // [Integrated Gradients - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution], - // which shows positive attributions in green and negative in pink. - // - // Defaults to VIRIDIS for - // [XRAI - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution], - // which highlights the most influential regions in yellow and the least - // influential in blue. - ColorMap color_map = 3; - - // Excludes attributions above the specified percentile from the - // highlighted areas. Using the clip_percent_upperbound and - // clip_percent_lowerbound together can be useful for filtering out noise - // and making it easier to see areas of strong attribution. Defaults to - // 99.9. - float clip_percent_upperbound = 4; - - // Excludes attributions below the specified percentile, from the - // highlighted areas. Defaults to 62. - float clip_percent_lowerbound = 5; - - // How the original image is displayed in the visualization. - // Adjusting the overlay can help increase visual clarity if the original - // image makes it difficult to view the visualization. Defaults to NONE. - OverlayType overlay_type = 6; - } - - // Defines how a feature is encoded. Defaults to IDENTITY. - enum Encoding { - // Default value. This is the same as IDENTITY. - ENCODING_UNSPECIFIED = 0; - - // The tensor represents one feature. - IDENTITY = 1; - - // The tensor represents a bag of features where each index maps to - // a feature. - // [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] - // must be provided for this encoding. For example: - // ``` - // input = [27, 6.0, 150] - // index_feature_mapping = ["age", "height", "weight"] - // ``` - BAG_OF_FEATURES = 2; - - // The tensor represents a bag of features where each index maps to a - // feature. Zero values in the tensor indicates feature being - // non-existent. - // [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] - // must be provided for this encoding. For example: - // ``` - // input = [2, 0, 5, 0, 1] - // index_feature_mapping = ["a", "b", "c", "d", "e"] - // ``` - BAG_OF_FEATURES_SPARSE = 3; - - // The tensor is a list of binaries representing whether a feature exists - // or not (1 indicates existence). - // [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] - // must be provided for this encoding. For example: - // ``` - // input = [1, 0, 1, 0, 1] - // index_feature_mapping = ["a", "b", "c", "d", "e"] - // ``` - INDICATOR = 4; - - // The tensor is encoded into a 1-dimensional array represented by an - // encoded tensor. - // [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name] - // must be provided for this encoding. For example: - // ``` - // input = ["This", "is", "a", "test", "."] - // encoded = [0.1, 0.2, 0.3, 0.4, 0.5] - // ``` - COMBINED_EMBEDDING = 5; - - // Select this encoding when the input tensor is encoded into a - // 2-dimensional array represented by an encoded tensor. - // [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name] - // must be provided for this encoding. The first dimension of the encoded - // tensor's shape is the same as the input tensor's shape. For example: - // ``` - // input = ["This", "is", "a", "test", "."] - // encoded = [[0.1, 0.2, 0.3, 0.4, 0.5], - // [0.2, 0.1, 0.4, 0.3, 0.5], - // [0.5, 0.1, 0.3, 0.5, 0.4], - // [0.5, 0.3, 0.1, 0.2, 0.4], - // [0.4, 0.3, 0.2, 0.5, 0.1]] - // ``` - CONCAT_EMBEDDING = 6; - } - - // Baseline inputs for this feature. - // - // If no baseline is specified, Vertex AI chooses the baseline for this - // feature. If multiple baselines are specified, Vertex AI returns the - // average attributions across them in - // [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]. - // - // For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape - // of each baseline must match the shape of the input tensor. If a scalar is - // provided, we broadcast to the same shape as the input tensor. - // - // For custom images, the element of the baselines must be in the same - // format as the feature's input in the - // [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The - // schema of any single instance may be specified via Endpoint's - // DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - repeated google.protobuf.Value input_baselines = 1; - - // Name of the input tensor for this feature. Required and is only - // applicable to Vertex AI-provided images for Tensorflow. - string input_tensor_name = 2; - - // Defines how the feature is encoded into the input tensor. Defaults to - // IDENTITY. - Encoding encoding = 3; - - // Modality of the feature. Valid values are: numeric, image. Defaults to - // numeric. - string modality = 4; - - // The domain details of the input feature value. Like min/max, original - // mean or standard deviation if normalized. - FeatureValueDomain feature_value_domain = 5; - - // Specifies the index of the values of the input tensor. - // Required when the input tensor is a sparse representation. Refer to - // Tensorflow documentation for more details: - // https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor. - string indices_tensor_name = 6; - - // Specifies the shape of the values of the input if the input is a sparse - // representation. Refer to Tensorflow documentation for more details: - // https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor. - string dense_shape_tensor_name = 7; - - // A list of feature names for each index in the input tensor. - // Required when the input - // [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding] - // is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. - repeated string index_feature_mapping = 8; - - // Encoded tensor is a transformation of the input tensor. Must be provided - // if choosing - // [Integrated Gradients - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution] - // or [XRAI - // attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution] - // and the input tensor is not differentiable. - // - // An encoded tensor is generated if the input tensor is encoded by a lookup - // table. - string encoded_tensor_name = 9; - - // A list of baselines for the encoded tensor. - // - // The shape of each baseline should match the shape of the encoded tensor. - // If a scalar is provided, Vertex AI broadcasts to the same shape as the - // encoded tensor. - repeated google.protobuf.Value encoded_baselines = 10; - - // Visualization configurations for image explanation. - Visualization visualization = 11; - - // Name of the group that the input belongs to. Features with the same group - // name will be treated as one feature when computing attributions. Features - // grouped together can have different shapes in value. If provided, there - // will be one single attribution generated in - // [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions], - // keyed by the group name. - string group_name = 12; - } - - // Metadata of the prediction output to be explained. - message OutputMetadata { - // Defines how to map - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // to - // [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]. - // - // If neither of the fields are specified, - // [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name] - // will not be populated. - oneof display_name_mapping { - // Static mapping between the index and display name. - // - // Use this if the outputs are a deterministic n-dimensional array, e.g. a - // list of scores of all the classes in a pre-defined order for a - // multi-classification Model. It's not feasible if the outputs are - // non-deterministic, e.g. the Model produces top-k classes or sort the - // outputs by their values. - // - // The shape of the value must be an n-dimensional array of strings. The - // number of dimensions must match that of the outputs to be explained. - // The - // [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name] - // is populated by locating in the mapping with - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]. - google.protobuf.Value index_display_name_mapping = 1; - - // Specify a field name in the prediction to look for the display name. - // - // Use this if the prediction contains the display names for the outputs. - // - // The display names in the prediction must have the same shape of the - // outputs, so that it can be located by - // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] - // for a specific output. - string display_name_mapping_key = 2; - } - - // Name of the output tensor. Required and is only applicable to Vertex - // AI provided images for Tensorflow. - string output_tensor_name = 3; - } - - // Required. Map from feature names to feature input metadata. Keys are the - // name of the features. Values are the specification of the feature. - // - // An empty InputMetadata is valid. It describes a text feature which has the - // name specified as the key in - // [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. - // The baseline of the empty feature is chosen by Vertex AI. - // - // For Vertex AI-provided Tensorflow images, the key can be any friendly - // name of the feature. Once specified, - // [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] - // are keyed by this key (if not grouped with another feature). - // - // For custom images, the key must match with the key in - // [instance][google.cloud.aiplatform.v1.ExplainRequest.instances]. - map inputs = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Map from output names to output metadata. - // - // For Vertex AI-provided Tensorflow images, keys can be any user defined - // string that consists of any UTF-8 characters. - // - // For custom images, keys are the name of the output field in the prediction - // to be explained. - // - // Currently only one key is allowed. - map outputs = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Points to a YAML file stored on Google Cloud Storage describing the format - // of the [feature - // attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]. - // The schema is defined as an OpenAPI 3.0.2 [Schema - // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). - // AutoML tabular Models always have this field populated by Vertex AI. - // Note: The URI given on output may be different, including the URI scheme, - // than the one given on input. The output URI will point to a location where - // the user only has a read access. - string feature_attributions_schema_uri = 3; - - // Name of the source to generate embeddings for example based explanations. - string latent_space_source = 5; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto deleted file mode 100644 index bbabb838633f..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/vertexai/v1/api_auth.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "IoProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// The storage details for Avro input content. -message AvroSource { - // Required. Google Cloud Storage location. - GcsSource gcs_source = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The storage details for CSV input content. -message CsvSource { - // Required. Google Cloud Storage location. - GcsSource gcs_source = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Google Cloud Storage location for the input content. -message GcsSource { - // Required. Google Cloud Storage URI(-s) to the input file(s). May contain - // wildcards. For more information on wildcards, see - // https://cloud.google.com/storage/docs/wildcards. - repeated string uris = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Google Cloud Storage location where the output is to be written to. -message GcsDestination { - // Required. Google Cloud Storage URI to output directory. If the uri doesn't - // end with - // '/', a '/' will be automatically appended. The directory is created if it - // doesn't exist. - string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The BigQuery location for the input content. -message BigQuerySource { - // Required. BigQuery URI to a table, up to 2000 characters long. - // Accepted forms: - // - // * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. - string input_uri = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The BigQuery location for the output content. -message BigQueryDestination { - // Required. BigQuery URI to a project or table, up to 2000 characters long. - // - // When only the project is specified, the Dataset and Table is created. - // When the full table reference is specified, the Dataset must exist and - // table must not exist. - // - // Accepted forms: - // - // * BigQuery path. For example: - // `bq://projectId` or `bq://projectId.bqDatasetId` or - // `bq://projectId.bqDatasetId.bqTableId`. - string output_uri = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The storage details for CSV output content. -message CsvDestination { - // Required. Google Cloud Storage location. - GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The storage details for TFRecord output content. -message TFRecordDestination { - // Required. Google Cloud Storage location. - GcsDestination gcs_destination = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Container Registry location for the container image. -message ContainerRegistryDestination { - // Required. Container Registry URI of a container image. - // Only Google Container Registry and Artifact Registry are supported now. - // Accepted forms: - // - // * Google Container Registry path. For example: - // `gcr.io/projectId/imageName:tag`. - // - // * Artifact Registry path. For example: - // `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`. - // - // If a tag is not specified, "latest" will be used as the default tag. - string output_uri = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Google Drive location for the input content. -message GoogleDriveSource { - // The type and ID of the Google Drive resource. - message ResourceId { - // The type of the Google Drive resource. - enum ResourceType { - // Unspecified resource type. - RESOURCE_TYPE_UNSPECIFIED = 0; - - // File resource type. - RESOURCE_TYPE_FILE = 1; - - // Folder resource type. - RESOURCE_TYPE_FOLDER = 2; - } - - // Required. The type of the Google Drive resource. - ResourceType resource_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID of the Google Drive resource. - string resource_id = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Google Drive resource IDs. - repeated ResourceId resource_ids = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The input content is encapsulated and uploaded in the request. -message DirectUploadSource {} - -// The Slack source for the ImportRagFilesRequest. -message SlackSource { - // SlackChannels contains the Slack channels and corresponding access token. - message SlackChannels { - // SlackChannel contains the Slack channel ID and the time range to import. - message SlackChannel { - // Required. The Slack channel ID. - string channel_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The starting timestamp for messages to import. - google.protobuf.Timestamp start_time = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The ending timestamp for messages to import. - google.protobuf.Timestamp end_time = 3 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. The Slack channel IDs. - repeated SlackChannel channels = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The SecretManager secret version resource name (e.g. - // projects/{project}/secrets/{secret}/versions/{version}) storing the - // Slack channel access token that has access to the slack channel IDs. - // See: https://api.slack.com/tutorials/tracks/getting-a-token. - ApiAuth.ApiKeyConfig api_key_config = 3 - [(google.api.field_behavior) = REQUIRED]; - } - - // Required. The Slack channels. - repeated SlackChannels channels = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The Jira source for the ImportRagFilesRequest. -message JiraSource { - // JiraQueries contains the Jira queries and corresponding authentication. - message JiraQueries { - // A list of Jira projects to import in their entirety. - repeated string projects = 3; - - // A list of custom Jira queries to import. For information about JQL (Jira - // Query Language), see - // https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ - repeated string custom_queries = 4; - - // Required. The Jira email address. - string email = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Jira server URI. - string server_uri = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. The SecretManager secret version resource name (e.g. - // projects/{project}/secrets/{secret}/versions/{version}) storing the - // Jira API key. See [Manage API tokens for your Atlassian - // account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). - ApiAuth.ApiKeyConfig api_key_config = 7 - [(google.api.field_behavior) = REQUIRED]; - } - - // Required. The Jira queries. - repeated JiraQueries jira_queries = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// The SharePointSources to pass to ImportRagFiles. -message SharePointSources { - // An individual SharePointSource. - message SharePointSource { - // The SharePoint folder source. If not provided, uses "root". - oneof folder_source { - // The path of the SharePoint folder to download from. - string sharepoint_folder_path = 5; - - // The ID of the SharePoint folder to download from. - string sharepoint_folder_id = 6; - } - - // The SharePoint drive source. - oneof drive_source { - // The name of the drive to download from. - string drive_name = 7; - - // The ID of the drive to download from. - string drive_id = 8; - } - - // The Application ID for the app registered in Microsoft Azure Portal. - // The application must also be configured with MS Graph permissions - // "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. - string client_id = 1; - - // The application secret for the app registered in Azure. - ApiAuth.ApiKeyConfig client_secret = 2; - - // Unique identifier of the Azure Active Directory Instance. - string tenant_id = 3; - - // The name of the SharePoint site to download from. This can be the site - // name or the site id. - string sharepoint_site_name = 4; - - // Output only. The SharePoint file id. Output only. - string file_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The SharePoint sources. - repeated SharePointSource share_point_sources = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto deleted file mode 100644 index 50141115432b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/content.proto"; -import "google/cloud/vertexai/v1/prediction_service.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "LlmUtilityServiceProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Service for LLM related utility functions. -service LlmUtilityService { - option (google.api.default_host) = "aiplatform.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Perform a token counting. - rpc CountTokens(CountTokensRequest) returns (CountTokensResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens" - body: "*" - } - additional_bindings { - post: "/v1/{endpoint=endpoints/*}:countTokens" - body: "*" - } - additional_bindings { - post: "/v1/{endpoint=publishers/*/models/*}:countTokens" - body: "*" - } - }; - option (google.api.method_signature) = "endpoint,instances"; - } - - // Return a list of tokens based on the input text. - rpc ComputeTokens(ComputeTokensRequest) returns (ComputeTokensResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens" - body: "*" - } - additional_bindings { - post: "/v1/{endpoint=endpoints/*}:computeTokens" - body: "*" - } - additional_bindings { - post: "/v1/{endpoint=publishers/*/models/*}:computeTokens" - body: "*" - } - }; - option (google.api.method_signature) = "endpoint,instances"; - } -} - -// Request message for ComputeTokens RPC call. -message ComputeTokensRequest { - // Required. The name of the Endpoint requested to get lists of tokens and - // token ids. - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Optional. The instances that are the input to token computing API call. - // Schema is identical to the prediction schema of the text model, even for - // the non-text models, like chat models, or Codey models. - repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the publisher model requested to serve the - // prediction. Format: - // projects/{project}/locations/{location}/publishers/*/models/* - string model = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Input content. - repeated Content contents = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Tokens info with a list of tokens and the corresponding list of token ids. -message TokensInfo { - // A list of tokens from the input. - repeated bytes tokens = 1; - - // A list of token ids from the input. - repeated int64 token_ids = 2; - - // Optional. Optional fields for the role from the corresponding Content. - string role = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for ComputeTokens RPC call. -message ComputeTokensResponse { - // Lists of tokens info from the input. A ComputeTokensRequest could have - // multiple instances with a prompt in each instance. We also need to return - // lists of tokens info for the request with multiple instances. - repeated TokensInfo tokens_info = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto deleted file mode 100644 index aed11106afb9..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/vertexai/v1/accelerator_type.proto"; -import "google/cloud/vertexai/v1/reservation_affinity.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "MachineResourcesProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Specification of a single machine. -message MachineSpec { - // Immutable. The type of the machine. - // - // See the [list of machine types supported for - // prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) - // - // See the [list of machine types supported for custom - // training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). - // - // For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is - // optional, and the default value is `n1-standard-2`. For - // [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as - // part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this - // field is required. - string machine_type = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. The type of accelerator(s) that may be attached to the machine - // as per - // [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]. - AcceleratorType accelerator_type = 2 - [(google.api.field_behavior) = IMMUTABLE]; - - // The number of accelerators to attach to the machine. - int32 accelerator_count = 3; - - // Optional. Immutable. The Nvidia GPU partition size. - // - // When specified, the requested accelerators will be partitioned into - // smaller GPU partitions. For example, if the request is for 8 units of - // NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will - // create 8 * 7 = 56 partitioned MIG instances. - // - // The partition size must be a value supported by the requested accelerator. - // Refer to - // [Nvidia GPU - // Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) - // for the available partition sizes. - // - // If set, the accelerator_count should be set to 1. - string gpu_partition_size = 7 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = OPTIONAL - ]; - - // Immutable. The topology of the TPUs. Corresponds to the TPU topologies - // available from GKE. (Example: tpu_topology: "2x2x1"). - string tpu_topology = 4 [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. Immutable. Configuration controlling how this resource pool - // consumes reservation. - ReservationAffinity reservation_affinity = 5 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// A description of resources that are dedicated to a DeployedModel or -// DeployedIndex, and that need a higher degree of manual configuration. -message DedicatedResources { - // Required. Immutable. The specification of a single machine being used. - MachineSpec machine_spec = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Immutable. The minimum number of machine replicas that will be - // always deployed on. This value must be greater than or equal to 1. - // - // If traffic increases, it may dynamically be deployed onto more replicas, - // and as traffic decreases, some of these extra replicas may be freed. - int32 min_replica_count = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Immutable. The maximum number of replicas that may be deployed on when the - // traffic against it increases. If the requested value is too large, the - // deployment will error, but if deployment succeeds then the ability to scale - // to that many replicas is guaranteed (barring service outages). If traffic - // increases beyond what its replicas at maximum may handle, a portion of the - // traffic will be dropped. If this value is not provided, will use - // [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] - // as the default value. - // - // The value of this field impacts the charge against Vertex CPU and GPU - // quotas. Specifically, you will be charged for (max_replica_count * - // number of cores in the selected machine type) and (max_replica_count * - // number of GPUs per replica in the selected machine type). - int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. Number of required available replicas for the deployment to - // succeed. This field is only needed when partial deployment/mutation is - // desired. If set, the deploy/mutate operation will succeed once - // available_replica_count reaches required_replica_count, and the rest of - // the replicas will be retried. If not set, the default - // required_replica_count will be min_replica_count. - int32 required_replica_count = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Immutable. The metric specifications that overrides a resource - // utilization metric (CPU utilization, accelerator's duty cycle, and so on) - // target value (default to 60 if not set). At most one entry is allowed per - // metric. - // - // If - // [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] - // is above 0, the autoscaling will be based on both CPU utilization and - // accelerator's duty cycle metrics and scale up when either metrics exceeds - // its target value while scale down if both metrics are under their target - // value. The default target value is 60 for both metrics. - // - // If - // [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] - // is 0, the autoscaling will be based on CPU utilization metric only with - // default target value 60 if not explicitly set. - // - // For example, in the case of Online Prediction, if you want to override - // target CPU utilization to 80, you should set - // [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name] - // to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and - // [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target] - // to `80`. - repeated AutoscalingMetricSpec autoscaling_metric_specs = 4 - [(google.api.field_behavior) = IMMUTABLE]; - - // Optional. If true, schedule the deployment workload on [spot - // VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). - bool spot = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A description of resources that to large degree are decided by Vertex AI, -// and require only a modest additional configuration. -// Each Model supporting these resources documents its specific guidelines. -message AutomaticResources { - // Immutable. The minimum number of replicas that will be always deployed on. - // If traffic against it increases, it may dynamically be deployed onto more - // replicas up to - // [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], - // and as traffic decreases, some of these extra replicas may be freed. If the - // requested value is too large, the deployment will error. - int32 min_replica_count = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. The maximum number of replicas that may be deployed on when the - // traffic against it increases. If the requested value is too large, the - // deployment will error, but if deployment succeeds then the ability to scale - // to that many replicas is guaranteed (barring service outages). If traffic - // increases beyond what its replicas at maximum may handle, a portion of the - // traffic will be dropped. If this value is not provided, a no upper bound - // for scaling under heavy traffic will be assume, though Vertex AI may be - // unable to scale beyond certain replica number. - int32 max_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE]; -} - -// A description of resources that are used for performing batch operations, are -// dedicated to a Model, and need manual configuration. -message BatchDedicatedResources { - // Required. Immutable. The specification of a single machine. - MachineSpec machine_spec = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Immutable. The number of machine replicas used at the start of the batch - // operation. If not set, Vertex AI decides starting number, not greater than - // [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count] - int32 starting_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. The maximum number of machine replicas the batch operation may - // be scaled to. The default value is 10. - int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE]; -} - -// Statistics information about resource consumption. -message ResourcesConsumed { - // Output only. The number of replica hours used. Note that many replicas may - // run in parallel, and additionally any given work may be queued for some - // time. Therefore this value is not strictly related to wall time. - double replica_hours = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents the spec of disk options. -message DiskSpec { - // Type of the boot disk. For non-A3U machines, the default value is - // "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced". - // Valid values: "pd-ssd" (Persistent Disk Solid State Drive), - // "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced". - string boot_disk_type = 1; - - // Size in GB of the boot disk (default is 100GB). - int32 boot_disk_size_gb = 2; -} - -// Represents the spec of [persistent -// disk][https://cloud.google.com/compute/docs/disks/persistent-disks] options. -message PersistentDiskSpec { - // Type of the disk (default is "pd-standard"). - // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) - // "pd-standard" (Persistent Disk Hard Disk Drive) - // "pd-balanced" (Balanced Persistent Disk) - // "pd-extreme" (Extreme Persistent Disk) - string disk_type = 1; - - // Size in GB of the disk (default is 100GB). - int64 disk_size_gb = 2; -} - -// Represents a mount configuration for Network File System (NFS) to mount. -message NfsMount { - // Required. IP address of the NFS server. - string server = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Source path exported from NFS server. - // Has to start with '/', and combined with the ip address, it indicates - // the source mount path in the form of `server:path` - string path = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination mount path. The NFS will be mounted for the user - // under /mnt/nfs/ - string mount_point = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Represents a mount configuration for Lustre file system. -message LustreMount { - // Required. IP address of the Lustre instance. - string instance_ip = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The unique identifier of the Lustre volume. - string volume_handle = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the Lustre filesystem. - string filesystem = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination mount path. The Lustre file system will be mounted - // for the user under /mnt/lustre/ - string mount_point = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// The metric specification that defines the target resource utilization -// (CPU utilization, accelerator's duty cycle, and so on) for calculating the -// desired replica count. -message AutoscalingMetricSpec { - // Required. The resource metric name. - // Supported metrics: - // - // * For Online Prediction: - // * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` - // * `aiplatform.googleapis.com/prediction/online/cpu/utilization` - // * `aiplatform.googleapis.com/prediction/online/request_count` - string metric_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // The target resource utilization in percentage (1% - 100%) for the given - // metric; once the real usage deviates from the target by a certain - // percentage, the machine replicas change. The default value is 60 - // (representing 60%) if not provided. - int32 target = 2; -} - -// A set of Shielded Instance options. -// See [Images using supported Shielded VM -// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). -message ShieldedVmConfig { - // Defines whether the instance has [Secure - // Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) - // enabled. - // - // Secure Boot helps ensure that the system only runs authentic software by - // verifying the digital signature of all boot components, and halting the - // boot process if signature verification fails. - bool enable_secure_boot = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto deleted file mode 100644 index 253a3d4a5fd0..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/struct.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "OpenApiProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Type contains the list of OpenAPI data types as defined by -// https://swagger.io/docs/specification/data-models/data-types/ -enum Type { - // Not specified, should not be used. - TYPE_UNSPECIFIED = 0; - - // OpenAPI string type - STRING = 1; - - // OpenAPI number type - NUMBER = 2; - - // OpenAPI integer type - INTEGER = 3; - - // OpenAPI boolean type - BOOLEAN = 4; - - // OpenAPI array type - ARRAY = 5; - - // OpenAPI object type - OBJECT = 6; -} - -// Schema is used to define the format of input/output data. Represents a select -// subset of an [OpenAPI 3.0 schema -// object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may -// be added in the future as needed. -message Schema { - // Optional. The type of the data. - Type type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The format of the data. - // Supported formats: - // for NUMBER type: "float", "double" - // for INTEGER type: "int32", "int64" - // for STRING type: "email", "byte", etc - string format = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The title of the Schema. - string title = 24 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The description of the data. - string description = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates if the value may be null. - bool nullable = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Default value of the data. - google.protobuf.Value default = 23 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SCHEMA FIELDS FOR TYPE ARRAY - // Schema of the elements of Type.ARRAY. - Schema items = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum number of the elements for Type.ARRAY. - int64 min_items = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum number of the elements for Type.ARRAY. - int64 max_items = 22 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Possible values of the element of primitive type with enum - // format. Examples: - // 1. We can define direction as : - // {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} - // 2. We can define apartment number as : - // {type:INTEGER, format:enum, enum:["101", "201", "301"]} - repeated string enum = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SCHEMA FIELDS FOR TYPE OBJECT - // Properties of Type.OBJECT. - map properties = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The order of the properties. - // Not a standard field in open api spec. Only used to support the order of - // the properties. - repeated string property_ordering = 25 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Required properties of Type.OBJECT. - repeated string required = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum number of the properties for Type.OBJECT. - int64 min_properties = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum number of the properties for Type.OBJECT. - int64 max_properties = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER - // Minimum value of the Type.INTEGER and Type.NUMBER - double minimum = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum value of the Type.INTEGER and Type.NUMBER - double maximum = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SCHEMA FIELDS FOR TYPE STRING - // Minimum length of the Type.STRING - int64 min_length = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum length of the Type.STRING - int64 max_length = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Pattern of the Type.STRING to restrict a string to a regular - // expression. - string pattern = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Example of the object. Will only populated when the object is the - // root. - google.protobuf.Value example = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The value should be validated against any (one or more) of the - // subschemas in the list. - repeated Schema any_of = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Can either be a boolean or an object; controls the presence of - // additional properties. - google.protobuf.Value additional_properties = 26 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Allows indirect references between schema nodes. The value should - // be a valid reference to a child of the root `defs`. - // - // For example, the following schema defines a reference to a schema node - // named "Pet": - // - // type: object - // properties: - // pet: - // ref: #/defs/Pet - // defs: - // Pet: - // type: object - // properties: - // name: - // type: string - // - // The value of the "pet" property is a reference to the schema node - // named "Pet". - // See details in - // https://json-schema.org/understanding-json-schema/structuring - string ref = 27 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A map of definitions for use by `ref` - // Only allowed at the root of the schema. - map defs = 28 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto deleted file mode 100644 index a3c6e00c996b..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "OperationProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Generic Metadata shared by all operations. -message GenericOperationMetadata { - // Output only. Partial failures encountered. - // E.g. single files that couldn't be read. - // This field should never exceed 20 entries. - // Status details field will contain standard Google Cloud error details. - repeated google.rpc.Status partial_failures = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the operation was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the operation was updated for the last time. - // If the operation has finished (successfully or not), this is the finish - // time. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Details of operations that perform deletes of any entities. -message DeleteOperationMetadata { - // The common part of the operation metadata. - GenericOperationMetadata generic_metadata = 1; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto deleted file mode 100644 index a94803873ba8..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto +++ /dev/null @@ -1,941 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -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/vertexai/v1/content.proto"; -import "google/cloud/vertexai/v1/explanation.proto"; -import "google/cloud/vertexai/v1/tool.proto"; -import "google/cloud/vertexai/v1/types.proto"; -import "google/cloud/vertexai/v1/usage_metadata.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "PredictionServiceProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// A service for online predictions and explanations. -service PredictionService { - option (google.api.default_host) = "aiplatform.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-platform.read-only"; - - // Perform an online prediction. - rpc Predict(PredictRequest) returns (PredictResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict" - body: "*" - } - }; - option (google.api.method_signature) = "endpoint,instances,parameters"; - } - - // Perform an online prediction with an arbitrary HTTP payload. - // - // The response includes the following HTTP headers: - // - // * `X-Vertex-AI-Endpoint-Id`: ID of the - // [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this - // prediction. - // - // * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's - // [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this - // prediction. - rpc RawPredict(RawPredictRequest) returns (google.api.HttpBody) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict" - body: "*" - } - }; - option (google.api.method_signature) = "endpoint,http_body"; - } - - // Perform a streaming online prediction with an arbitrary HTTP payload. - rpc StreamRawPredict(StreamRawPredictRequest) - returns (stream google.api.HttpBody) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict" - body: "*" - } - }; - option (google.api.method_signature) = "endpoint,http_body"; - } - - // Perform an unary online prediction request to a gRPC model server for - // Vertex first-party products and frameworks. - rpc DirectPredict(DirectPredictRequest) returns (DirectPredictResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict" - body: "*" - }; - } - - // Perform an unary online prediction request to a gRPC model server for - // custom containers. - rpc DirectRawPredict(DirectRawPredictRequest) - returns (DirectRawPredictResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directRawPredict" - body: "*" - }; - } - - // Perform a streaming online prediction request to a gRPC model server for - // Vertex first-party products and frameworks. - rpc StreamDirectPredict(stream StreamDirectPredictRequest) - returns (stream StreamDirectPredictResponse) {} - - // Perform a streaming online prediction request to a gRPC model server for - // custom containers. - rpc StreamDirectRawPredict(stream StreamDirectRawPredictRequest) - returns (stream StreamDirectRawPredictResponse) {} - - // Perform a streaming online prediction request for Vertex first-party - // products and frameworks. - rpc StreamingPredict(stream StreamingPredictRequest) - returns (stream StreamingPredictResponse) {} - - // Perform a server-side streaming online prediction request for Vertex - // LLM streaming. - rpc ServerStreamingPredict(StreamingPredictRequest) - returns (stream StreamingPredictResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:serverStreamingPredict" - body: "*" - additional_bindings { - post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:serverStreamingPredict" - body: "*" - } - }; - } - - // Perform a streaming online prediction request through gRPC. - rpc StreamingRawPredict(stream StreamingRawPredictRequest) - returns (stream StreamingRawPredictResponse) {} - - // Perform an online explanation. - // - // If - // [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] - // is specified, the corresponding DeployModel must have - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // populated. If - // [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] - // is not specified, all DeployedModels must have - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // populated. - rpc Explain(ExplainRequest) returns (ExplainResponse) { - option (google.api.http) = { - post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain" - body: "*" - }; - option (google.api.method_signature) = - "endpoint,instances,parameters,deployed_model_id"; - } - - // Generate content with multimodal inputs. - rpc GenerateContent(GenerateContentRequest) - returns (GenerateContentResponse) { - option (google.api.http) = { - post: "/v1/{model=projects/*/locations/*/endpoints/*}:generateContent" - body: "*" - additional_bindings { - post: "/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent" - body: "*" - } - additional_bindings { - post: "/v1/{model=endpoints/*}:generateContent" - body: "*" - } - additional_bindings { - post: "/v1/{model=publishers/*/models/*}:generateContent" - body: "*" - } - }; - option (google.api.method_signature) = "model,contents"; - } - - // Generate content with multimodal inputs with streaming support. - rpc StreamGenerateContent(GenerateContentRequest) - returns (stream GenerateContentResponse) { - option (google.api.http) = { - post: "/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent" - body: "*" - additional_bindings { - post: "/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent" - body: "*" - } - additional_bindings { - post: "/v1/{model=endpoints/*}:streamGenerateContent" - body: "*" - } - additional_bindings { - post: "/v1/{model=publishers/*/models/*}:streamGenerateContent" - body: "*" - } - }; - option (google.api.method_signature) = "model,contents"; - } - - // Embed content with multimodal inputs. - rpc EmbedContent(EmbedContentRequest) returns (EmbedContentResponse) { - option (google.api.http) = { - post: "/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent" - body: "*" - }; - option (google.api.method_signature) = "model,content"; - } -} - -// Request message for -// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. -message PredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Required. The instances that are the input to the prediction call. - // A DeployedModel may have an upper limit on the number of instances it - // supports per request, and when it is exceeded the prediction call errors - // in case of AutoML Models, or, in case of customer created Models, the - // behaviour is as documented by that Model. - // The schema of any single instance may be specified via Endpoint's - // DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = REQUIRED]; - - // The parameters that govern the prediction. The schema of the parameters may - // be specified via Endpoint's DeployedModels' [Model's - // ][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - google.protobuf.Value parameters = 3; - - // Optional. The user labels for Imagen billing usage only. Only Imagen - // supports labels. For other use cases, it will be ignored. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. -message PredictResponse { - // The predictions that are the output of the predictions call. - // The schema of any single prediction may be specified via Endpoint's - // DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. - repeated google.protobuf.Value predictions = 1; - - // ID of the Endpoint's DeployedModel that served this prediction. - string deployed_model_id = 2; - - // Output only. The resource name of the Model which is deployed as the - // DeployedModel that this prediction hits. - string model = 3 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Model" - } - ]; - - // Output only. The version ID of the Model which is deployed as the - // DeployedModel that this prediction hits. - string model_version_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The [display - // name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is - // deployed as the DeployedModel that this prediction hits. - string model_display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Request-level metadata returned by the model. The metadata - // type will be dependent upon the model implementation. - google.protobuf.Value metadata = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [PredictionService.RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]. -message RawPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // The prediction input. Supports HTTP headers and arbitrary data payload. - // - // A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an - // upper limit on the number of instances it supports per request. When this - // limit it is exceeded for an AutoML model, the - // [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict] - // method returns an error. When this limit is exceeded for a custom-trained - // model, the behavior varies depending on the model. - // - // You can specify the schema for each instance in the - // [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] - // field when you create a [Model][google.cloud.aiplatform.v1.Model]. This - // schema applies when you deploy the `Model` as a `DeployedModel` to an - // [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` - // method. - google.api.HttpBody http_body = 2; -} - -// Request message for -// [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict]. -message StreamRawPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // The prediction input. Supports HTTP headers and arbitrary data payload. - google.api.HttpBody http_body = 2; -} - -// Request message for -// [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict]. -message DirectPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // The prediction input. - repeated Tensor inputs = 2; - - // The parameters that govern the prediction. - Tensor parameters = 3; -} - -// Response message for -// [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict]. -message DirectPredictResponse { - // The prediction output. - repeated Tensor outputs = 1; - - // The parameters that govern the prediction. - Tensor parameters = 2; -} - -// Request message for -// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]. -message DirectRawPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Fully qualified name of the API method being invoked to perform - // predictions. - // - // Format: - // `/namespace.Service/Method/` - // Example: - // `/tensorflow.serving.PredictionService/Predict` - string method_name = 2; - - // The prediction input. - bytes input = 3; -} - -// Response message for -// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]. -message DirectRawPredictResponse { - // The prediction output. - bytes output = 1; -} - -// Request message for -// [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict]. -// -// The first message must contain -// [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint] -// field and optionally [input][]. The subsequent messages must contain -// [input][]. -message StreamDirectPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Optional. The prediction input. - repeated Tensor inputs = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The parameters that govern the prediction. - Tensor parameters = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict]. -message StreamDirectPredictResponse { - // The prediction output. - repeated Tensor outputs = 1; - - // The parameters that govern the prediction. - Tensor parameters = 2; -} - -// Request message for -// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]. -// -// The first message must contain -// [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint] -// and -// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name] -// fields and optionally -// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The -// subsequent messages must contain -// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. -// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name] -// in the subsequent messages have no effect. -message StreamDirectRawPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Optional. Fully qualified name of the API method being invoked to perform - // predictions. - // - // Format: - // `/namespace.Service/Method/` - // Example: - // `/tensorflow.serving.PredictionService/Predict` - string method_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The prediction input. - bytes input = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]. -message StreamDirectRawPredictResponse { - // The prediction output. - bytes output = 1; -} - -// Request message for -// [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict]. -// -// The first message must contain -// [endpoint][google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint] field -// and optionally [input][]. The subsequent messages must contain [input][]. -message StreamingPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // The prediction input. - repeated Tensor inputs = 2; - - // The parameters that govern the prediction. - Tensor parameters = 3; -} - -// Response message for -// [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict]. -message StreamingPredictResponse { - // The prediction output. - repeated Tensor outputs = 1; - - // The parameters that govern the prediction. - Tensor parameters = 2; -} - -// Request message for -// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict]. -// -// The first message must contain -// [endpoint][google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint] -// and -// [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name] -// fields and optionally -// [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. The -// subsequent messages must contain -// [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. -// [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name] -// in the subsequent messages have no effect. -message StreamingRawPredictRequest { - // Required. The name of the Endpoint requested to serve the prediction. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Fully qualified name of the API method being invoked to perform - // predictions. - // - // Format: - // `/namespace.Service/Method/` - // Example: - // `/tensorflow.serving.PredictionService/Predict` - string method_name = 2; - - // The prediction input. - bytes input = 3; -} - -// Response message for -// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict]. -message StreamingRawPredictResponse { - // The prediction output. - bytes output = 1; -} - -// Request message for -// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. -message ExplainRequest { - // Required. The name of the Endpoint requested to serve the explanation. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Required. The instances that are the input to the explanation call. - // A DeployedModel may have an upper limit on the number of instances it - // supports per request, and when it is exceeded the explanation call errors - // in case of AutoML Models, or, in case of customer created Models, the - // behaviour is as documented by that Model. - // The schema of any single instance may be specified via Endpoint's - // DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. - repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = REQUIRED]; - - // The parameters that govern the prediction. The schema of the parameters may - // be specified via Endpoint's DeployedModels' [Model's - // ][google.cloud.aiplatform.v1.DeployedModel.model] - // [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] - // [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. - google.protobuf.Value parameters = 4; - - // If specified, overrides the - // [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] - // of the DeployedModel. Can be used for explaining prediction results with - // different configurations, such as: - // - Explaining top-5 predictions results as opposed to top-1; - // - Increasing path count or step count of the attribution methods to reduce - // approximate errors; - // - Using different baselines for explaining the prediction results. - ExplanationSpecOverride explanation_spec_override = 5; - - // If specified, this ExplainRequest will be served by the chosen - // DeployedModel, overriding - // [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]. - string deployed_model_id = 3; -} - -// Response message for -// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. -message ExplainResponse { - // The explanations of the Model's - // [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]. - // - // It has the same number of elements as - // [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be - // explained. - repeated Explanation explanations = 1; - - // ID of the Endpoint's DeployedModel that served this explanation. - string deployed_model_id = 2; - - // The predictions that are the output of the predictions call. - // Same as - // [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]. - repeated google.protobuf.Value predictions = 3; -} - -// Request message for [PredictionService.CountTokens][]. -message CountTokensRequest { - // Required. The name of the Endpoint requested to perform token counting. - // Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Optional. The name of the publisher model requested to serve the - // prediction. Format: - // `projects/{project}/locations/{location}/publishers/*/models/*` - string model = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The instances that are the input to token counting call. - // Schema is identical to the prediction schema of the underlying model. - repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Input content. - repeated Content contents = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The user provided system instructions for the model. - // Note: only text should be used in parts and content in each part will be in - // a separate paragraph. - optional Content system_instruction = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of `Tools` the model may use to generate the next - // response. - // - // A `Tool` is a piece of code that enables the system to interact with - // external systems to perform an action, or set of actions, outside of - // knowledge and scope of the model. - repeated Tool tools = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Generation config that the model will use to generate the - // response. - optional GenerationConfig generation_config = 7 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [PredictionService.CountTokens][]. -message CountTokensResponse { - // The total number of tokens counted across all instances from the request. - int32 total_tokens = 1; - - // The total number of billable characters counted across all instances from - // the request. - int32 total_billable_characters = 2; - - // Output only. List of modalities that were processed in the request input. - repeated ModalityTokenCount prompt_tokens_details = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for [PredictionService.GenerateContent]. -message GenerateContentRequest { - // Required. The fully qualified name of the publisher model or tuned model - // endpoint to use. - // - // Publisher model format: - // `projects/{project}/locations/{location}/publishers/*/models/*` - // - // Tuned model endpoint format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string model = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The content of the current conversation with the model. - // - // For single-turn queries, this is a single instance. For multi-turn queries, - // this is a repeated field that contains conversation history + latest - // request. - repeated Content contents = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The user provided system instructions for the model. - // Note: only text should be used in parts and content in each part will be in - // a separate paragraph. - optional Content system_instruction = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the cached content used as context to serve the - // prediction. Note: only used in explicit caching, where users can have - // control over caching (e.g. what content to cache) and enjoy guaranteed cost - // savings. Format: - // `projects/{project}/locations/{location}/cachedContents/{cachedContent}` - string cached_content = 9 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/CachedContent" - } - ]; - - // Optional. A list of `Tools` the model may use to generate the next - // response. - // - // A `Tool` is a piece of code that enables the system to interact with - // external systems to perform an action, or set of actions, outside of - // knowledge and scope of the model. - repeated Tool tools = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Tool config. This config is shared for all tools provided in the - // request. - ToolConfig tool_config = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The labels with user-defined metadata for the request. It is used - // for billing and reporting only. - // - // Label keys and values can be no longer than 63 characters - // (Unicode codepoints) and can only contain lowercase letters, numeric - // characters, underscores, and dashes. International characters are allowed. - // Label values are optional. Label keys must start with a letter. - map labels = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per request settings for blocking unsafe content. - // Enforced on GenerateContentResponse.candidates. - repeated SafetySetting safety_settings = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Settings for prompt and response sanitization using the Model - // Armor service. If supplied, safety_settings must not be supplied. - ModelArmorConfig model_armor_config = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Generation config. - GenerationConfig generation_config = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for [PredictionService.GenerateContent]. -message GenerateContentResponse { - // Content filter results for a prompt sent in the request. - message PromptFeedback { - // Blocked reason enumeration. - enum BlockedReason { - // Unspecified blocked reason. - BLOCKED_REASON_UNSPECIFIED = 0; - - // Candidates blocked due to safety. - SAFETY = 1; - - // Candidates blocked due to other reason. - OTHER = 2; - - // Candidates blocked due to the terms which are included from the - // terminology blocklist. - BLOCKLIST = 3; - - // Candidates blocked due to prohibited content. - PROHIBITED_CONTENT = 4; - - // The user prompt was blocked by Model Armor. - MODEL_ARMOR = 5; - - // The user prompt was blocked due to jailbreak. - JAILBREAK = 6; - } - - // Output only. Blocked reason. - BlockedReason block_reason = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Safety ratings. - repeated SafetyRating safety_ratings = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A readable block reason message. - string block_reason_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Usage metadata about response(s). - message UsageMetadata { - // Number of tokens in the request. When `cached_content` is set, this is - // still the total effective prompt size meaning this includes the number of - // tokens in the cached content. - int32 prompt_token_count = 1; - - // Number of tokens in the response(s). - int32 candidates_token_count = 2; - - // Output only. Number of tokens present in thoughts output. - int32 thoughts_token_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Total token count for prompt and response candidates. - int32 total_token_count = 3; - - // Output only. Number of tokens in the cached part in the input (the cached - // content). - int32 cached_content_token_count = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of modalities that were processed in the request input. - repeated ModalityTokenCount prompt_tokens_details = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of modalities of the cached content in the request - // input. - repeated ModalityTokenCount cache_tokens_details = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of modalities that were returned in the response. - repeated ModalityTokenCount candidates_tokens_details = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Generated candidates. - repeated Candidate candidates = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The model version used to generate the response. - string model_version = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp when the request is made to the server. - google.protobuf.Timestamp create_time = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. response_id is used to identify each response. It is the - // encoding of the event_id. - string response_id = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Content filter results for a prompt sent in the request. - // Note: Sent only in the first stream chunk. - // Only happens when no candidates were generated due to content violations. - PromptFeedback prompt_feedback = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Usage metadata about the response(s). - UsageMetadata usage_metadata = 4; -} - -// Request message for -// [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. -message EmbedContentRequest { - // Represents a downstream task the embeddings will be used for. - enum EmbeddingTaskType { - // Unset value, which will default to one of the other enum values. - UNSPECIFIED = 0; - - // Specifies the given text is a query in a search/retrieval setting. - RETRIEVAL_QUERY = 2; - - // Specifies the given text is a document from the corpus being searched. - RETRIEVAL_DOCUMENT = 3; - - // Specifies the given text will be used for STS. - SEMANTIC_SIMILARITY = 4; - - // Specifies that the given text will be classified. - CLASSIFICATION = 5; - - // Specifies that the embeddings will be used for clustering. - CLUSTERING = 6; - - // Specifies that the embeddings will be used for question answering. - QUESTION_ANSWERING = 7; - - // Specifies that the embeddings will be used for fact verification. - FACT_VERIFICATION = 8; - - // Specifies that the embeddings will be used for code retrieval. - CODE_RETRIEVAL_QUERY = 9; - } - - // Required. The name of the publisher model requested to serve the - // prediction. Format: - // `projects/{project}/locations/{location}/publishers/*/models/*` - optional string model = 1 [(google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - }]; - - // Required. Input content to be embedded. Required. - optional Content content = 2; - - // Optional. An optional title for the text. - optional string title = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The task type of the embedding. - optional EmbeddingTaskType task_type = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Optional reduced dimension for the output embedding. If set, - // excessive values in the output embedding are truncated from the end. - optional int32 output_dimensionality = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to silently truncate the input content if it's longer - // than the maximum sequence length. - optional bool auto_truncate = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. -message EmbedContentResponse { - // A list of floats representing an embedding. - message Embedding { - // Embedding vector values. - repeated float values = 1; - } - - // The embedding generated from the input content. - Embedding embedding = 1; - - // Metadata about the response(s). - UsageMetadata usage_metadata = 2; - - // Whether the input content was truncated before generating the embedding. - bool truncated = 4; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/reservation_affinity.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/reservation_affinity.proto deleted file mode 100644 index 519b5b8a7b33..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/reservation_affinity.proto +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ReservationAffinityProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Reservation" - pattern: "projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}" -}; - -// A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a -// DeployedModel) to draw its Compute Engine resources from a Shared -// Reservation, or exclusively from on-demand capacity. -message ReservationAffinity { - // Identifies a type of reservation affinity. - enum Type { - // Default value. This should not be used. - TYPE_UNSPECIFIED = 0; - - // Do not consume from any reserved capacity, only use on-demand. - NO_RESERVATION = 1; - - // Consume any reservation available, falling back to on-demand. - ANY_RESERVATION = 2; - - // Consume from a specific reservation. When chosen, the reservation - // must be identified via the `key` and `values` fields. - SPECIFIC_RESERVATION = 3; - } - - // Required. Specifies the reservation affinity type. - Type reservation_affinity_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Corresponds to the label key of a reservation resource. To target - // a SPECIFIC_RESERVATION by name, use - // `compute.googleapis.com/reservation-name` as the key and specify the name - // of your reservation as its value. - string key = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label values of a reservation resource. This - // must be the full resource name of the reservation. - repeated string values = 3 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Reservation" - } - ]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/service_networking.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/service_networking.proto deleted file mode 100644 index f2732dc2bd63..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/service_networking.proto +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ServiceNetworkingProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/NetworkAttachment" - pattern: "projects/{project}/regions/{region}/networkAttachments/{networkattachment}" -}; - -// The state of the PSC service automation. -enum PSCAutomationState { - // Should not be used. - PSC_AUTOMATION_STATE_UNSPECIFIED = 0; - - // The PSC service automation is successful. - PSC_AUTOMATION_STATE_SUCCESSFUL = 1; - - // The PSC service automation has failed. - PSC_AUTOMATION_STATE_FAILED = 2; -} - -// PSC config that is used to automatically create PSC endpoints in the user -// projects. -message PSCAutomationConfig { - // Required. Project id used to create forwarding rule. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The full name of the Google Compute Engine - // [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). - // [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): - // `projects/{project}/global/networks/{network}`. - string network = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. IP address rule created by the PSC service automation. - string ip_address = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Forwarding rule created by the PSC service automation. - string forwarding_rule = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The state of the PSC service automation. - PSCAutomationState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error message if the PSC service automation failed. - string error_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Represents configuration for private service connect. -message PrivateServiceConnectConfig { - // Required. If true, expose the IndexEndpoint via private service connect. - bool enable_private_service_connect = 1 - [(google.api.field_behavior) = REQUIRED]; - - // A list of Projects from which the forwarding rule will target the service - // attachment. - repeated string project_allowlist = 2; - - // Optional. List of projects and networks where the PSC endpoints will be - // created. This field is used by Online Inference(Prediction) only. - repeated PSCAutomationConfig psc_automation_configs = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The name of the generated service attachment resource. - // This is only populated if the endpoint is deployed with - // PrivateServiceConnect. - string service_attachment = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// PscAutomatedEndpoints defines the output of the forwarding rule -// automatically created by each PscAutomationConfig. -message PscAutomatedEndpoints { - // Corresponding project_id in pscAutomationConfigs - string project_id = 1; - - // Corresponding network in pscAutomationConfigs. - string network = 2; - - // Ip Address created by the automated forwarding rule. - string match_address = 3; -} - -// Configuration for PSC-I. -message PscInterfaceConfig { - // Optional. The name of the Compute Engine - // [network - // attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to - // attach to the resource within the region and user project. - // To specify this field, you must have already [created a network attachment] - // (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). - // This field is only used for resources using PSC-I. - string network_attachment = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "compute.googleapis.com/NetworkAttachment" - } - ]; - - // Optional. DNS peering configurations. When specified, Vertex AI will - // attempt to configure DNS peering zones in the tenant project VPC - // to resolve the specified domains using the target network's Cloud DNS. - // The user must grant the dns.peer role to the Vertex AI Service Agent - // on the target project. - repeated DnsPeeringConfig dns_peering_configs = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// DNS peering configuration. These configurations are used to create -// DNS peering zones in the Vertex tenant project VPC, enabling resolution -// of records within the specified domain hosted in the target network's -// Cloud DNS. -message DnsPeeringConfig { - // Required. The DNS name suffix of the zone being peered to, e.g., - // "my-internal-domain.corp.". Must end with a dot. - string domain = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The project ID hosting the Cloud DNS managed zone that - // contains the 'domain'. The Vertex AI Service Agent requires the - // dns.peer role on this project. - string target_project = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The VPC network name - // in the target_project where the DNS zone specified by 'domain' is - // visible. - string target_network = 3 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto deleted file mode 100644 index 7d2018f52678..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto +++ /dev/null @@ -1,672 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/openapi.proto"; -import "google/protobuf/struct.proto"; -import "google/type/latlng.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "ToolProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Tool details that the model may use to generate response. -// -// A `Tool` is a piece of code that enables the system to interact with -// external systems to perform an action, or set of actions, outside of -// knowledge and scope of the model. A Tool object should contain exactly -// one type of Tool (e.g FunctionDeclaration, Retrieval or -// GoogleSearchRetrieval). -message Tool { - // These are available confidence level user can set to block malicious urls - // with chosen confidence and above. For understanding different confidence of - // webrisk, please refer to - // https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel - enum PhishBlockThreshold { - // Defaults to unspecified. - PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; - - // Blocks Low and above confidence URL that is risky. - BLOCK_LOW_AND_ABOVE = 30; - - // Blocks Medium and above confidence URL that is risky. - BLOCK_MEDIUM_AND_ABOVE = 40; - - // Blocks High and above confidence URL that is risky. - BLOCK_HIGH_AND_ABOVE = 50; - - // Blocks Higher and above confidence URL that is risky. - BLOCK_HIGHER_AND_ABOVE = 55; - - // Blocks Very high and above confidence URL that is risky. - BLOCK_VERY_HIGH_AND_ABOVE = 60; - - // Blocks Extremely high confidence URL that is risky. - BLOCK_ONLY_EXTREMELY_HIGH = 100; - } - // GoogleSearch tool type. - // Tool to support Google Search in Model. Powered by Google. - message GoogleSearch { - // Optional. List of domains to be excluded from the search results. - // The default limit is 2000 domains. - // Example: ["amazon.com", "facebook.com"]. - repeated string exclude_domains = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Sites with confidence level chosen & above this value will be - // blocked from the search results. - optional PhishBlockThreshold blocking_confidence = 4 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Tool that executes code generated by the model, and automatically returns - // the result to the model. - // - // See also [ExecutableCode]and [CodeExecutionResult] which are input and - // output to this tool. - message CodeExecution {} - - // Tool to support computer use. - message ComputerUse { - // Represents the environment being operated, such as a web browser. - enum Environment { - // Defaults to browser. - ENVIRONMENT_UNSPECIFIED = 0; - - // Operates in a web browser. - ENVIRONMENT_BROWSER = 1; - } - - // Required. The environment being operated. - Environment environment = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. By default, [predefined - // functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) - // are included in the final model call. Some of them can be explicitly - // excluded from being automatically included. This can serve two purposes: - // 1. Using a more restricted / different action space. - // 2. Improving the definitions / instructions of predefined functions. - repeated string excluded_predefined_functions = 2 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Function tool type. - // One or more function declarations to be passed to the model along with the - // current user query. Model may decide to call a subset of these functions - // by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call] - // in the response. User should provide a - // [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for - // each function call in the next turn. Based on the function responses, Model - // will generate the final response back to the user. Maximum 128 function - // declarations can be provided. - repeated FunctionDeclaration function_declarations = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Retrieval tool type. - // System will always execute the provided retrieval tool(s) to get external - // knowledge to answer the prompt. Retrieval results are presented to the - // model for generation. - Retrieval retrieval = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. GoogleSearch tool type. - // Tool to support Google Search in Model. Powered by Google. - GoogleSearch google_search = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. GoogleSearchRetrieval tool type. - // Specialized retrieval tool that is powered by Google search. - GoogleSearchRetrieval google_search_retrieval = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. GoogleMaps tool type. - // Tool to support Google Maps in Model. - GoogleMaps google_maps = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Tool to support searching public web data, powered by Vertex AI - // Search and Sec4 compliance. - EnterpriseWebSearch enterprise_web_search = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. CodeExecution tool type. - // Enables the model to execute code as part of generation. - CodeExecution code_execution = 4 [(google.api.field_behavior) = OPTIONAL]; - - reserved 8, 9; - - // Optional. Tool to support URL context retrieval. - UrlContext url_context = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Tool to support the model interacting directly with the computer. - // If enabled, it automatically populates computer-use specific Function - // Declarations. - ComputerUse computer_use = 11 [(google.api.field_behavior) = OPTIONAL]; -} - -// Tool to support URL context. -message UrlContext {} - -// Structured representation of a function declaration as defined by the -// [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included -// in this declaration are the function name, description, parameters and -// response type. This FunctionDeclaration is a representation of a block of -// code that can be used as a `Tool` by the model and executed by the client. -message FunctionDeclaration { - // Required. The name of the function to call. - // Must start with a letter or an underscore. - // Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a - // maximum length of 64. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description and purpose of the function. - // Model uses it to decide how and whether to call the function. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Describes the parameters to this function in JSON Schema Object - // format. Reflects the Open API 3.03 Parameter Object. string Key: the name - // of the parameter. Parameter names are case sensitive. Schema Value: the - // Schema defining the type used for the parameter. For function with no - // parameters, this can be left unset. Parameter names must start with a - // letter or an underscore and must only contain chars a-z, A-Z, 0-9, or - // underscores with a maximum length of 64. Example with 1 required and 1 - // optional parameter: type: OBJECT properties: - // param1: - // type: STRING - // param2: - // type: INTEGER - // required: - // - param1 - Schema parameters = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Describes the parameters to the function in JSON Schema format. - // The schema must describe an object where the properties are the parameters - // to the function. For example: - // - // ``` - // { - // "type": "object", - // "properties": { - // "name": { "type": "string" }, - // "age": { "type": "integer" } - // }, - // "additionalProperties": false, - // "required": ["name", "age"], - // "propertyOrdering": ["name", "age"] - // } - // ``` - // - // This field is mutually exclusive with `parameters`. - google.protobuf.Value parameters_json_schema = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Describes the output from this function in JSON Schema format. - // Reflects the Open API 3.03 Response Object. The Schema defines the type - // used for the response value of the function. - Schema response = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Describes the output from this function in JSON Schema format. - // The value specified by the schema is the response value of the function. - // - // This field is mutually exclusive with `response`. - google.protobuf.Value response_json_schema = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A predicted [FunctionCall] returned from the model that contains a string -// representing the [FunctionDeclaration.name] and a structured JSON object -// containing the parameters and their values. -message FunctionCall { - // Optional. The name of the function to call. - // Matches [FunctionDeclaration.name]. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The function parameters and values in JSON object format. - // See [FunctionDeclaration.parameters] for parameter details. - google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The partial argument value of the function call. - // If provided, represents the arguments/fields that are streamed - // incrementally. - repeated PartialArg partial_args = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether this is the last part of the FunctionCall. - // If true, another partial message for the current FunctionCall is expected - // to follow. - bool will_continue = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Partial argument value of the function call. -message PartialArg { - // The delta of field value being streamed. - oneof delta { - // Optional. Represents a null value. - google.protobuf.NullValue null_value = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Represents a double value. - double number_value = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Represents a string value. - string string_value = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Represents a boolean value. - bool bool_value = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. A JSON Path (RFC 9535) to the argument being streamed. - // https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". - string json_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Whether this is not the last part of the same json_path. - // If true, another PartialArg message for the current json_path is expected - // to follow. - bool will_continue = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A datatype containing media that is part of a `FunctionResponse` message. -// -// A `FunctionResponsePart` consists of data which has an associated datatype. A -// `FunctionResponsePart` can only contain one of the accepted types in -// `FunctionResponsePart.data`. -// -// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the -// type and subtype of the media if the `inline_data` field is filled with raw -// bytes. -message FunctionResponsePart { - // The data of the function response part. - oneof data { - // Inline media bytes. - FunctionResponseBlob inline_data = 1; - - // URI based data. - FunctionResponseFileData file_data = 2; - } -} - -// Raw media bytes for function response. -// -// Text should not be sent as raw bytes, use the 'text' field. -message FunctionResponseBlob { - // Required. The IANA standard MIME type of the source data. - string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Raw bytes. - bytes data = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Display name of the blob. - // - // Used to provide a label or filename to distinguish blobs. - // - // This field is only returned in PromptMessage for prompt management. - // It is currently used in the Gemini GenerateContent calls only when server - // side tools (code_execution, google_search, and url_context) are enabled. - string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// URI based data for function response. -message FunctionResponseFileData { - // Required. The IANA standard MIME type of the source data. - string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. URI. - string file_uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Display name of the file data. - // - // Used to provide a label or filename to distinguish file datas. - // - // This field is only returned in PromptMessage for prompt management. - // It is currently used in the Gemini GenerateContent calls only when server - // side tools (code_execution, google_search, and url_context) are enabled. - string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The result output from a [FunctionCall] that contains a string representing -// the [FunctionDeclaration.name] and a structured JSON object containing any -// output from the function is used as context to the model. This should contain -// the result of a [FunctionCall] made based on model prediction. -message FunctionResponse { - // Required. The name of the function to call. - // Matches [FunctionDeclaration.name] and [FunctionCall.name]. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The function response in JSON object format. - // Use "output" key to specify function output and "error" key to specify - // error details (if any). If "output" and "error" keys are not specified, - // then whole "response" is treated as function output. - google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Ordered `Parts` that constitute a function response. Parts may - // have different IANA MIME types. - repeated FunctionResponsePart parts = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Code generated by the model that is meant to be executed, and the result -// returned to the model. -// -// Generated when using the [FunctionDeclaration] tool and -// [FunctionCallingConfig] mode is set to [Mode.CODE]. -message ExecutableCode { - // Supported programming languages for the generated code. - enum Language { - // Unspecified language. This value should not be used. - LANGUAGE_UNSPECIFIED = 0; - - // Python >= 3.10, with numpy and simpy available. - PYTHON = 1; - } - - // Required. Programming language of the `code`. - Language language = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The code to be executed. - string code = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Result of executing the [ExecutableCode]. -// -// Always follows a `part` containing the [ExecutableCode]. -message CodeExecutionResult { - // Enumeration of possible outcomes of the code execution. - enum Outcome { - // Unspecified status. This value should not be used. - OUTCOME_UNSPECIFIED = 0; - - // Code execution completed successfully. - OUTCOME_OK = 1; - - // Code execution finished but with a failure. `stderr` should contain the - // reason. - OUTCOME_FAILED = 2; - - // Code execution ran for too long, and was cancelled. There may or may not - // be a partial output present. - OUTCOME_DEADLINE_EXCEEDED = 3; - } - - // Required. Outcome of the code execution. - Outcome outcome = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Contains stdout when code execution is successful, stderr or - // other description otherwise. - string output = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Defines a retrieval tool that model can call to access external knowledge. -message Retrieval { - // The source of the retrieval. - oneof source { - // Set to use data source powered by Vertex AI Search. - VertexAISearch vertex_ai_search = 2; - - // Set to use data source powered by Vertex RAG store. - // User data is uploaded via the VertexRagDataService. - VertexRagStore vertex_rag_store = 4; - } - - // Optional. Deprecated. This option is no longer supported. - bool disable_attribution = 3 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; -} - -// Retrieve from Vertex RAG Store for grounding. -message VertexRagStore { - // The definition of the Rag resource. - message RagResource { - // Optional. RagCorpora resource name. - // Format: - // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` - string rag_corpus = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/RagCorpus" - } - ]; - - // Optional. rag_file_id. The files should be in the same rag_corpus set in - // rag_corpus field. - repeated string rag_file_ids = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The representation of the rag source. It can be used to specify - // corpus only or ragfiles. Currently only support one corpus or multiple - // files from one corpus. In the future we may open up multiple corpora - // support. - repeated RagResource rag_resources = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Number of top k results to return from the selected corpora. - optional int32 similarity_top_k = 2 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - - // Optional. Only return results with vector distance smaller than the - // threshold. - optional double vector_distance_threshold = 3 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - - // Optional. The retrieval config for the Rag query. - RagRetrievalConfig rag_retrieval_config = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Retrieve from Vertex AI Search datastore or engine for grounding. -// datastore and engine are mutually exclusive. -// See https://cloud.google.com/products/agent-builder -message VertexAISearch { - // Define data stores within engine to filter on in a search call and - // configurations for those data stores. For more information, see - // https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec - message DataStoreSpec { - // Full resource name of DataStore, such as - // Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` - string data_store = 1; - - // Optional. Filter specification to filter documents in the data store - // specified by data_store field. For more information on filtering, see - // [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - string filter = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Fully-qualified Vertex AI Search data store resource ID. - // Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` - string datastore = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Fully-qualified Vertex AI Search engine resource ID. - // Format: - // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` - string engine = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Number of search results to return per query. - // The default value is 10. - // The maximumm allowed value is 10. - int32 max_results = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter strings to be passed to the search API. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Specifications that define the specific DataStores to be searched, along - // with configurations for those data stores. This is only considered for - // Engines with multiple data stores. - // It should only be set if engine is used. - repeated DataStoreSpec data_store_specs = 5; -} - -// Tool to retrieve public web data for grounding, powered by Google. -message GoogleSearchRetrieval { - // Specifies the dynamic retrieval configuration for the given source. - DynamicRetrievalConfig dynamic_retrieval_config = 2; -} - -// Tool to retrieve public maps data for grounding, powered by Google. -message GoogleMaps { - // If true, include the widget context token in the response. - bool enable_widget = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Tool to search public web data, powered by Vertex AI Search and Sec4 -// compliance. -message EnterpriseWebSearch { - // Optional. List of domains to be excluded from the search results. - // The default limit is 2000 domains. - repeated string exclude_domains = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Sites with confidence level chosen & above this value will be - // blocked from the search results. - optional Tool.PhishBlockThreshold blocking_confidence = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Describes the options to customize dynamic retrieval. -message DynamicRetrievalConfig { - // The mode of the predictor to be used in dynamic retrieval. - enum Mode { - // Always trigger retrieval. - MODE_UNSPECIFIED = 0; - - // Run retrieval only when system decides it is necessary. - MODE_DYNAMIC = 1; - } - - // The mode of the predictor to be used in dynamic retrieval. - Mode mode = 1; - - // Optional. The threshold to be used in dynamic retrieval. - // If not set, a system default value is used. - optional float dynamic_threshold = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Tool config. This config is shared for all tools provided in the request. -message ToolConfig { - // Optional. Function calling config. - FunctionCallingConfig function_calling_config = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Retrieval config. - RetrievalConfig retrieval_config = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Function calling config. -message FunctionCallingConfig { - // Function calling mode. - enum Mode { - // Unspecified function calling mode. This value should not be used. - MODE_UNSPECIFIED = 0; - - // Default model behavior, model decides to predict either function calls - // or natural language response. - AUTO = 1; - - // Model is constrained to always predicting function calls only. - // If "allowed_function_names" are set, the predicted function calls will be - // limited to any one of "allowed_function_names", else the predicted - // function calls will be any one of the provided "function_declarations". - ANY = 2; - - // Model will not predict any function calls. Model behavior is same as when - // not passing any function declarations. - NONE = 3; - } - - // Optional. Function calling mode. - Mode mode = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Function names to call. Only set when the Mode is ANY. Function - // names should match [FunctionDeclaration.name]. With mode set to ANY, model - // will predict a function call from the set of function names provided. - repeated string allowed_function_names = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When set to true, arguments of a single function call will be - // streamed out in multiple parts/contents/responses. Partial parameter - // results will be returned in the [FunctionCall.partial_args] field. - bool stream_function_call_arguments = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Retrieval config. -message RetrievalConfig { - // The location of the user. - optional google.type.LatLng lat_lng = 1; - - // The language code of the user. - optional string language_code = 2; -} - -// Specifies the context retrieval config. -message RagRetrievalConfig { - // Config for filters. - message Filter { - // Filter contexts retrieved from the vector DB based on either vector - // distance or vector similarity. - oneof vector_db_threshold { - // Optional. Only returns contexts with vector distance smaller than the - // threshold. - double vector_distance_threshold = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only returns contexts with vector similarity larger than the - // threshold. - double vector_similarity_threshold = 4 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. String for metadata filtering. - string metadata_filter = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Config for ranking and reranking. - message Ranking { - // Config for Rank Service. - message RankService { - // Optional. The model name of the rank service. - // Format: `semantic-ranker-512@latest` - optional string model_name = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Config for LlmRanker. - message LlmRanker { - // Optional. The model name used for ranking. - // Format: `gemini-1.5-pro` - optional string model_name = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Config options for ranking. Currently only Rank Service is supported. - oneof ranking_config { - // Optional. Config for Rank Service. - RankService rank_service = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config for LlmRanker. - LlmRanker llm_ranker = 3 [(google.api.field_behavior) = OPTIONAL]; - } - } - - // Optional. The number of contexts to retrieve. - int32 top_k = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config for filters. - Filter filter = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Config for ranking and reranking. - Ranking ranking = 4 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto deleted file mode 100644 index 65dad0224662..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "TypesProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// A list of boolean values. -message BoolArray { - // A list of bool values. - repeated bool values = 1; -} - -// A list of double values. -message DoubleArray { - // A list of double values. - repeated double values = 1; -} - -// A list of int64 values. -message Int64Array { - // A list of int64 values. - repeated int64 values = 1; -} - -// A list of string values. -message StringArray { - // A list of string values. - repeated string values = 1; -} - -// A tensor value type. -message Tensor { - // Data type of the tensor. - enum DataType { - // Not a legal value for DataType. Used to indicate a DataType field has not - // been set. - DATA_TYPE_UNSPECIFIED = 0; - - // Data types that all computation devices are expected to be - // capable to support. - BOOL = 1; - - STRING = 2; - - FLOAT = 3; - - DOUBLE = 4; - - INT8 = 5; - - INT16 = 6; - - INT32 = 7; - - INT64 = 8; - - UINT8 = 9; - - UINT16 = 10; - - UINT32 = 11; - - UINT64 = 12; - } - - // The data type of tensor. - DataType dtype = 1; - - // Shape of the tensor. - repeated int64 shape = 2; - - // Type specific representations that make it easy to create tensor protos in - // all languages. Only the representation corresponding to "dtype" can - // be set. The values hold the flattened representation of the tensor in - // row major order. - // - // [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL] - repeated bool bool_val = 3; - - // [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING] - repeated string string_val = 14; - - // [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING] - repeated bytes bytes_val = 15; - - // [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT] - repeated float float_val = 5; - - // [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE] - repeated double double_val = 6; - - // [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8] - // [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16] - // [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32] - repeated int32 int_val = 7; - - // [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64] - repeated int64 int64_val = 8; - - // [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8] - // [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16] - // [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32] - repeated uint32 uint_val = 9; - - // [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64] - repeated uint64 uint64_val = 10; - - // A list of tensor values. - repeated Tensor list_val = 11; - - // A map of string to tensor. - map struct_val = 12; - - // Serialized raw tensor content. - bytes tensor_val = 13; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/usage_metadata.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/usage_metadata.proto deleted file mode 100644 index d365f65db5da..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/usage_metadata.proto +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/vertexai/v1/content.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "UsageMetadataProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Usage metadata about the content generation request and response. -// This message provides a detailed breakdown of token usage and other -// relevant metrics. -message UsageMetadata { - // The type of traffic that this request was processed with, indicating which - // quota gets consumed. - enum TrafficType { - // Unspecified request traffic type. - TRAFFIC_TYPE_UNSPECIFIED = 0; - - // Type for Pay-As-You-Go traffic. - ON_DEMAND = 1; - - // Type for Provisioned Throughput traffic. - PROVISIONED_THROUGHPUT = 2; - } - - // The total number of tokens in the prompt. This includes any text, images, - // or other media provided in the request. When `cached_content` is set, - // this also includes the number of tokens in the cached content. - int32 prompt_token_count = 1; - - // The total number of tokens in the generated candidates. - int32 candidates_token_count = 2; - - // The total number of tokens for the entire request. This is the sum of - // `prompt_token_count`, `candidates_token_count`, - // `tool_use_prompt_token_count`, and `thoughts_token_count`. - int32 total_token_count = 3; - - // Output only. The number of tokens in the results from tool executions, - // which are provided back to the model as input, if applicable. - int32 tool_use_prompt_token_count = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of tokens that were part of the model's generated - // "thoughts" output, if applicable. - int32 thoughts_token_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of tokens in the cached content that was used for - // this request. - int32 cached_content_token_count = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A detailed breakdown of the token count for each modality in - // the prompt. - repeated ModalityTokenCount prompt_tokens_details = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A detailed breakdown of the token count for each modality in - // the cached content. - repeated ModalityTokenCount cache_tokens_details = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A detailed breakdown of the token count for each modality in - // the generated candidates. - repeated ModalityTokenCount candidates_tokens_details = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A detailed breakdown by modality of the token counts from the - // results of tool executions, which are provided back to the model as input. - repeated ModalityTokenCount tool_use_prompt_tokens_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The traffic type for this request. - TrafficType traffic_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/vertex_rag_data.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/vertex_rag_data.proto deleted file mode 100644 index 39884955aafe..000000000000 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/vertex_rag_data.proto +++ /dev/null @@ -1,571 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.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.vertexai.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vertexai/v1/api_auth.proto"; -import "google/cloud/vertexai/v1/encryption_spec.proto"; -import "google/cloud/vertexai/v1/io.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.AIPlatform.V1"; -option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; -option java_multiple_files = true; -option java_outer_classname = "VertexRagDataProto"; -option java_package = "com.google.cloud.vertexai.api"; -option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; -option ruby_package = "Google::Cloud::AIPlatform::V1"; - -// Config for the embedding model to use for RAG. -message RagEmbeddingModelConfig { - // Config representing a model hosted on Vertex Prediction Endpoint. - message VertexPredictionEndpoint { - // Required. The endpoint resource name. - // Format: - // `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` - // or - // `projects/{project}/locations/{location}/endpoints/{endpoint}` - string endpoint = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Endpoint" - } - ]; - - // Output only. The resource name of the model that is deployed on the - // endpoint. Present only when the endpoint is not a publisher model. - // Pattern: - // `projects/{project}/locations/{location}/models/{model}` - string model = 2 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Model" - } - ]; - - // Output only. Version ID of the model that is deployed on the endpoint. - // Present only when the endpoint is not a publisher model. - string model_version_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The model config to use. - oneof model_config { - // The Vertex AI Prediction Endpoint that either refers to a publisher model - // or an endpoint that is hosting a 1P fine-tuned text embedding model. - // Endpoints hosting non-1P fine-tuned text embedding models are - // currently not supported. - // This is used for dense vector search. - VertexPredictionEndpoint vertex_prediction_endpoint = 1; - } -} - -// Config for the Vector DB to use for RAG. -message RagVectorDbConfig { - // The config for the default RAG-managed Vector DB. - message RagManagedDb { - // Config for KNN search. - message KNN {} - - // Config for ANN search. - // - // RagManagedDb uses a tree-based structure to partition data and - // facilitate faster searches. As a tradeoff, it requires longer indexing - // time and manual triggering of index rebuild via the ImportRagFiles and - // UpdateRagCorpus API. - message ANN { - // The depth of the tree-based structure. Only depth values of 2 and 3 are - // supported. - // - // Recommended value is 2 if you have if you have O(10K) files in the - // RagCorpus and set this to 3 if more than that. - // - // Default value is 2. - int32 tree_depth = 1; - - // Number of leaf nodes in the tree-based structure. Each leaf node - // contains groups of closely related vectors along with their - // corresponding centroid. - // - // Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus). - // - // Default value is 500. - int32 leaf_count = 2; - } - - // Choice of retrieval strategy. - oneof retrieval_strategy { - // Performs a KNN search on RagCorpus. - // Default choice if not specified. - KNN knn = 1; - - // Performs an ANN search on RagCorpus. Use this if you have a lot of - // files (> 10K) in your RagCorpus and want to reduce the search latency. - ANN ann = 2; - } - } - - // The config for the Pinecone. - message Pinecone { - // Pinecone index name. - // This value cannot be changed after it's set. - string index_name = 1; - } - - // The config for the Vertex Vector Search. - message VertexVectorSearch { - // The resource name of the Index Endpoint. - // Format: - // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - string index_endpoint = 1; - - // The resource name of the Index. - // Format: - // `projects/{project}/locations/{location}/indexes/{index}` - string index = 2; - } - - // The config for the Vector DB. - oneof vector_db { - // The config for the RAG-managed Vector DB. - RagManagedDb rag_managed_db = 1; - - // The config for the Pinecone. - Pinecone pinecone = 3; - - // The config for the Vertex Vector Search. - VertexVectorSearch vertex_vector_search = 6; - } - - // Authentication config for the chosen Vector DB. - ApiAuth api_auth = 5; - - // Optional. Immutable. The embedding model config of the Vector DB. - RagEmbeddingModelConfig rag_embedding_model_config = 7 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; -} - -// RagFile status. -message FileStatus { - // RagFile state. - enum State { - // RagFile state is unspecified. - STATE_UNSPECIFIED = 0; - - // RagFile resource has been created and indexed successfully. - ACTIVE = 1; - - // RagFile resource is in a problematic state. - // See `error_message` field for details. - ERROR = 2; - } - - // Output only. RagFile state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Only when the `state` field is ERROR. - string error_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Config for the Vertex AI Search. -message VertexAiSearchConfig { - // Vertex AI Search Serving Config resource full name. For example, - // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` - // or - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`. - string serving_config = 1; -} - -// RagCorpus status. -message CorpusStatus { - // RagCorpus life state. - enum State { - // This state is not supposed to happen. - UNKNOWN = 0; - - // RagCorpus resource entry is initialized, but hasn't done validation. - INITIALIZED = 1; - - // RagCorpus is provisioned successfully and is ready to serve. - ACTIVE = 2; - - // RagCorpus is in a problematic situation. - // See `error_message` field for details. - ERROR = 3; - } - - // Output only. RagCorpus life state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Only when the `state` field is ERROR. - string error_status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A RagCorpus is a RagFile container and a project can have multiple -// RagCorpora. -message RagCorpus { - option (google.api.resource) = { - type: "aiplatform.googleapis.com/RagCorpus" - pattern: "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}" - plural: "ragCorpora" - singular: "ragCorpus" - }; - - // The backend config of the RagCorpus. - // It can be data store and/or retrieval engine. - oneof backend_config { - // Optional. Immutable. The config for the Vector DBs. - RagVectorDbConfig vector_db_config = 9 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. Immutable. The config for the Vertex AI Search. - VertexAiSearchConfig vertex_ai_search_config = 10 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; - } - - // Output only. The resource name of the RagCorpus. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The display name of the RagCorpus. - // The name can be up to 128 characters long and can consist of any UTF-8 - // characters. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The description of the RagCorpus. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Timestamp when this RagCorpus was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp when this RagCorpus was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. RagCorpus state. - CorpusStatus corpus_status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Immutable. The CMEK key name used to encrypt at-rest data related - // to this Corpus. Only applicable to RagManagedDb option for Vector DB. This - // field can only be set at corpus creation time, and cannot be updated or - // deleted. - EncryptionSpec encryption_spec = 12 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// A RagFile contains user data for chunking, embedding and indexing. -message RagFile { - option (google.api.resource) = { - type: "aiplatform.googleapis.com/RagFile" - pattern: "projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}" - plural: "ragFiles" - singular: "ragFile" - }; - - // The origin location of the RagFile if it is imported from Google Cloud - // Storage or Google Drive. - oneof rag_file_source { - // Output only. Google Cloud Storage location of the RagFile. - // It does not support wildcards in the Cloud Storage uri for now. - GcsSource gcs_source = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Google Drive location. Supports importing individual files - // as well as Google Drive folders. - GoogleDriveSource google_drive_source = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The RagFile is encapsulated and uploaded in the - // UploadRagFile request. - DirectUploadSource direct_upload_source = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The RagFile is imported from a Slack channel. - SlackSource slack_source = 11; - - // The RagFile is imported from a Jira query. - JiraSource jira_source = 12; - - // The RagFile is imported from a SharePoint source. - SharePointSources share_point_sources = 14; - } - - // Output only. The resource name of the RagFile. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The display name of the RagFile. - // The name can be up to 128 characters long and can consist of any UTF-8 - // characters. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The description of the RagFile. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Timestamp when this RagFile was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp when this RagFile was last updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State of the RagFile. - FileStatus file_status = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A RagChunk includes the content of a chunk of a RagFile, and associated -// metadata. -message RagChunk { - // Represents where the chunk starts and ends in the document. - message PageSpan { - // Page where chunk starts in the document. Inclusive. 1-indexed. - int32 first_page = 1; - - // Page where chunk ends in the document. Inclusive. 1-indexed. - int32 last_page = 2; - } - - // The content of the chunk. - string text = 1; - - // If populated, represents where the chunk starts and ends in the document. - optional PageSpan page_span = 2; -} - -// Specifies the size and overlap of chunks for RagFiles. -message RagFileChunkingConfig { - // Specifies the fixed length chunking config. - message FixedLengthChunking { - // The size of the chunks. - int32 chunk_size = 1; - - // The overlap between chunks. - int32 chunk_overlap = 2; - } - - // Specifies the chunking config for RagFiles. - oneof chunking_config { - // Specifies the fixed length chunking config. - FixedLengthChunking fixed_length_chunking = 3; - } -} - -// Specifies the transformation config for RagFiles. -message RagFileTransformationConfig { - // Specifies the chunking config for RagFiles. - RagFileChunkingConfig rag_file_chunking_config = 1; -} - -// Specifies the parsing config for RagFiles. -message RagFileParsingConfig { - // Document AI Layout Parser config. - message LayoutParser { - // The full resource name of a Document AI processor or processor version. - // The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the - // `additional_config.parse_as_scanned_pdf` field must be false. - // Format: - // * `projects/{project_id}/locations/{location}/processors/{processor_id}` - // * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}` - string processor_name = 1; - - // The maximum number of requests the job is allowed to make to the Document - // AI processor per minute. Consult - // https://cloud.google.com/document-ai/quotas and the Quota page for your - // project to set an appropriate value here. If unspecified, a default value - // of 120 QPM would be used. - int32 max_parsing_requests_per_min = 2; - } - - // Specifies the advanced parsing for RagFiles. - message LlmParser { - // The name of a LLM model used for parsing. - // Format: - // * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}` - string model_name = 1; - - // The maximum number of requests the job is allowed to make to the - // LLM model per minute. Consult - // https://cloud.google.com/vertex-ai/generative-ai/docs/quotas - // and your document size to set an appropriate value here. If unspecified, - // a default value of 5000 QPM would be used. - int32 max_parsing_requests_per_min = 2; - - // The prompt to use for parsing. If not specified, a default prompt will - // be used. - string custom_parsing_prompt = 3; - } - - // The parser to use for RagFiles. - oneof parser { - // The Layout Parser to use for RagFiles. - LayoutParser layout_parser = 4; - - // The LLM Parser to use for RagFiles. - LlmParser llm_parser = 5; - } -} - -// Config for uploading RagFile. -message UploadRagFileConfig { - // Specifies the transformation config for RagFiles. - RagFileTransformationConfig rag_file_transformation_config = 3; -} - -// Config for importing RagFiles. -message ImportRagFilesConfig { - // The source of the import. - oneof import_source { - // Google Cloud Storage location. Supports importing individual files as - // well as entire Google Cloud Storage directories. Sample formats: - // - `gs://bucket_name/my_directory/object_name/my_file.txt` - // - `gs://bucket_name/my_directory` - GcsSource gcs_source = 2; - - // Google Drive location. Supports importing individual files as - // well as Google Drive folders. - GoogleDriveSource google_drive_source = 3; - - // Slack channels with their corresponding access tokens. - SlackSource slack_source = 6; - - // Jira queries with their corresponding authentication. - JiraSource jira_source = 7; - - // SharePoint sources. - SharePointSources share_point_sources = 13; - } - - // Optional. If provided, all partial failures are written to the sink. - // Deprecated. Prefer to use the `import_result_sink`. - oneof partial_failure_sink { - // The Cloud Storage path to write partial failures to. - // Deprecated. Prefer to use `import_result_gcs_sink`. - GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; - - // The BigQuery destination to write partial failures to. It should be a - // bigquery table resource name (e.g. - // "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the - // table does not exist, it will be created with the expected schema. If the - // table exists, the schema will be validated and data will be added to this - // existing table. - // Deprecated. Prefer to use `import_result_bq_sink`. - BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; - } - - // Optional. If provided, all successfully imported files and all partial - // failures are written to the sink. - oneof import_result_sink { - // The Cloud Storage path to write import result to. - GcsDestination import_result_gcs_sink = 14; - - // The BigQuery destination to write import result to. It should be a - // bigquery table resource name (e.g. - // "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the - // table does not exist, it will be created with the expected schema. If the - // table exists, the schema will be validated and data will be added to this - // existing table. - BigQueryDestination import_result_bigquery_sink = 15; - } - - // Specifies the transformation config for RagFiles. - RagFileTransformationConfig rag_file_transformation_config = 16; - - // Optional. Specifies the parsing config for RagFiles. - // RAG will use the default parser if this field is not set. - RagFileParsingConfig rag_file_parsing_config = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The max number of queries per minute that this job is allowed to - // make to the embedding model specified on the corpus. This value is specific - // to this job and not shared across other import jobs. Consult the Quotas - // page on the project to set an appropriate value here. - // If unspecified, a default value of 1,000 QPM would be used. - int32 max_embedding_requests_per_min = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Rebuilds the ANN index to optimize for recall on the imported data. - // Only applicable for RagCorpora running on RagManagedDb with - // `retrieval_strategy` set to `ANN`. The rebuild will be performed using the - // existing ANN config set on the RagCorpus. To change the ANN config, please - // use the UpdateRagCorpus API. - // - // Default is false, i.e., index is not rebuilt. - bool rebuild_ann_index = 19; -} - -// Configuration message for RagManagedDb used by RagEngine. -message RagManagedDbConfig { - // Scaled tier offers production grade performance along with - // autoscaling functionality. It is suitable for customers with large - // amounts of data or performance sensitive workloads. - message Scaled {} - - // Basic tier is a cost-effective and low compute tier suitable for - // the following cases: - // * Experimenting with RagManagedDb. - // * Small data size. - // * Latency insensitive workload. - // * Only using RAG Engine with external vector DBs. - // - // NOTE: This is the default tier if not explicitly chosen. - message Basic {} - - // Disables the RAG Engine service and deletes all your data held - // within this service. This will halt the billing of the service. - // - // NOTE: Once deleted the data cannot be recovered. To start using - // RAG Engine again, you will need to update the tier by calling the - // UpdateRagEngineConfig API. - message Unprovisioned {} - - // The tier of the RagManagedDb. - oneof tier { - // Sets the RagManagedDb to the Scaled tier. - Scaled scaled = 4; - - // Sets the RagManagedDb to the Basic tier. - Basic basic = 2; - - // Sets the RagManagedDb to the Unprovisioned tier. - Unprovisioned unprovisioned = 3; - } -} - -// Config for RagEngine. -message RagEngineConfig { - option (google.api.resource) = { - type: "aiplatform.googleapis.com/RagEngineConfig" - pattern: "projects/{project}/locations/{location}/ragEngineConfig" - plural: "ragEngineConfigs" - singular: "ragEngineConfig" - }; - - // Identifier. The name of the RagEngineConfig. - // Format: - // `projects/{project}/locations/{location}/ragEngineConfig` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The config of the RagManagedDb used by RagEngine. - RagManagedDbConfig rag_managed_db_config = 2; -} diff --git a/versions.txt b/versions.txt index 1fc327b4bb5b..9344bd8257fd 100644 --- a/versions.txt +++ b/versions.txt @@ -687,11 +687,6 @@ grpc-google-cloud-telcoautomation-v1alpha1:0.58.0:0.59.0-SNAPSHOT google-cloud-securesourcemanager:0.58.0:0.59.0-SNAPSHOT proto-google-cloud-securesourcemanager-v1:0.58.0:0.59.0-SNAPSHOT grpc-google-cloud-securesourcemanager-v1:0.58.0:0.59.0-SNAPSHOT -google-cloud-vertexai:1.48.0:1.49.0-SNAPSHOT -proto-google-cloud-vertexai-v1:1.48.0:1.49.0-SNAPSHOT -proto-google-cloud-vertexai-v1beta1:1.48.0:1.49.0-SNAPSHOT -grpc-google-cloud-vertexai-v1:1.48.0:1.49.0-SNAPSHOT -grpc-google-cloud-vertexai-v1beta1:1.48.0:1.49.0-SNAPSHOT google-cloud-edgenetwork:0.56.0:0.57.0-SNAPSHOT proto-google-cloud-edgenetwork-v1:0.56.0:0.57.0-SNAPSHOT grpc-google-cloud-edgenetwork-v1:0.56.0:0.57.0-SNAPSHOT